FFmpeg的“管道"不适用于mp4文件? [英] FFmpeg "piping" doesn't work with mp4 files?
问题描述
I try the answer from this post and works very well for .webm format. I also try this implementation for mp4 file frames extraction and I got no bytes in stdout. Is there any solution to solve this issue?
推荐答案
否,由于mp4文件的结构而无法实现.mp4文件在文件的开头(有时是结尾)有一个帧索引,该索引记录了每个帧的位置和大小.在看不到任何帧之前,不可能生成此索引.
No, its not possible due to the structure of mp4 files. Mp4 files have a frame index at the beginning (sometime the end) of the file that records every frame position and size. Its not possible to generate this index until ever frame has been seen.
通过将片段 -f mp4 -movflags frag_keyframe + empty_moov
添加到ffmpeg命令中,可以使用片段化的m4,但并非所有人都知道如何读取该格式.
It may be possible by using a fragmented m4 by adding the flags -f mp4 -movflags frag_keyframe+empty_moov
to the ffmpeg command, But not everything knows how to read that format.
这篇关于FFmpeg的“管道"不适用于mp4文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!