我只需创建一个简单的图表来记录来自源代码过滤器的视频:
SourceFilter ---> Muxer ---> FileWriter
我可以保存来自SourceFilter的视频到我的本地磁盘。
But when i try to play the recorded video, it play in "slow motion" :-).
这是肯定有fps (帧秒)问题。我怎么才能修好它?有什么想法吗?
PS:
为了检查我的SourceFilter是否给出了righ fps,我只需创建另一个图:
SourceFilter ---> Video Decoder
我正在试图覆盖一个基本的视频图像。这是我目前的代码:
clip = VideoFileClip("base_video.mp4")
cat = (ImageClip("title.png")
.set_start(0) #which second to start displaying image
.set_duration(4) #how long to display image
.set_position(("center", "center")))
c
我试图播放流视频使用,AVPlayerViewController,所有其他扩展工作良好的“3gp MP4 . ",但".avi”视频开始于空白屏幕。
if let videoURL = URL(string: "http://techslides.com/demos/samples/sample.avi"){
let player = AVPlayer(url: videoURL)
let playerViewController = AVPlayerView
下面要从avi文件转换为mp4文件的ffmpeg命令确实创建了mp4文件,但是它的质量并不好。首先,文件的大小不同,mp4要小得多,大约是avi文件的1/10。其次,新创建的mp4的播放时间很短,大约为0.1秒,其中avi文件持续约60秒。
有人能帮我从下面的目录下用ffmpeg命令从avi创建mp4文件吗?
for i in /xxxxxxx/xxxxxxx/*.avi; do
ffmpeg -i "$i" -frames:v 1 "/xxxxxxx/xxxxxxx/$(basename "$i" .avi).mp4"
done