The output file format will be guessed from the file extension. Alternatively, option -f mxf can be used. Due to MXF format limitations, frame rate may need to be specified -r 25. Options -vcodec and -acodec can be omitted to the same result.
You shouldn't need -map with simple input and output files having only one audio and one video stream. These days ffmpeg also knows how to format mxf files and can guess to use that format based on the extension.
I suspect that your problem was a result of specifying mpeg2video ('raw MPEG-2 video'), a format that doesn't appear to include audio.
发布评论
评论(2)
在您的命令中,视频编解码器被指定为输出文件格式。结果,音频被剥离,输出文件是
mpeg
,而不是mxf
。可以使用以下命令完成转换:
将从文件扩展名猜测输出文件格式。或者,可以使用选项
-f mxf
。由于 MXF 格式限制,可能需要指定帧速率 -r 25。可以省略选项-vcodec
和-acodec
以获得相同的结果。In your command, video codec is specified as the output file format. As a result, the audio is stripped, and the output file is
mpeg
, notmxf
.The conversion can be done with the following command:
The output file format will be guessed from the file extension. Alternatively, option
-f mxf
can be used. Due toMXF
format limitations, frame rate may need to be specified-r 25
. Options-vcodec
and-acodec
can be omitted to the same result.我认为你过于具体了。尝试:
您不应该需要
-map
来处理只有一个音频和一个视频流的简单输入和输出文件。如今 ffmpeg 也知道如何格式化 mxf 文件,并且可以根据扩展名猜测使用该格式。我怀疑您的问题是由于指定
mpeg2video
(“原始 MPEG-2 视频”)而导致的,这种格式似乎不包含音频。I think you're overspecifying things. Try:
You shouldn't need
-map
with simple input and output files having only one audio and one video stream. These days ffmpeg also knows how to format mxf files and can guess to use that format based on the extension.I suspect that your problem was a result of specifying
mpeg2video
('raw MPEG-2 video'), a format that doesn't appear to include audio.