且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

ffmpeg管道:0:找不到编解码器参数

更新时间:2023-09-22 14:01:40

MP4容器不是管道安装的***选择.制作MP4文件的多路复用器可能会将某些信息放在文件末尾.该信息对于正确的脱胶是必需的,但是如果使用管道则无法立即获得.但是,您有一些选择:

MP4 container is not the best choice for piping. The muxer that made the MP4 file may place certain info at the end of the file. This info is required for proper demuxing, but is not immediately available if using a pipe. However, you have a few options:

我不知道为什么首先需要使用管道.只需将文件用作常规输入即可:

I don't know why you need to use a pipe in the first place. Just use the file as a normal input:

ffmpeg -i input.mp4 ...

不要使用MP4

如果必须使用管道,请考虑使用其他容器,例如.mkv.ts作为输入.

如果必须使用MP4,则一种方法是重新排列 moov 原子,使其位于文件的开头:

If you must use MP4 then one method is to re-arrange the moov atom so it is at the beginning of the file:

ffmpeg -i input.mp4 -c copy -movflags +faststart output.mp4