ffmpeg找不到编解码器来剪掉10秒的电影

时间:2017-11-19 13:37:34

标签: ffmpeg

我试图从电影中剪掉10秒并转换为MP4。但有时我会遇到如下错误:

Duration: 00:08:52.40, start: 0.000000, bitrate: 1126 kb/s
    Stream #0:0: Audio: wmav2 (a[1][0][0] / 0x0161), 44100 Hz, stereo, fltp, 96 kb/s
    Stream #0:1: Video: wmv3 (Main) (WMV3 / 0x33564D57), yuv420p, 640x480, 1000 kb/s, SAR 1:1 DAR 4:3, 29.97 tbr, 1k tbn, 1k tbc
[mp4 @ 0x5614bbea1300] Could not find tag for codec wmv3 in stream #0, codec not currently supported in container
Could not write header for output file #0 (incorrect codec parameters ?): Invalid argumentStream mapping:

这个错误是什么意思?我应该安装一些额外的编解码器吗?

我的exec行看起来像:

ffmpeg -i input.wmv -ss 00:00:00 -to 0 -c copy 0:00:10 output.mp4

1 个答案:

答案 0 :(得分:1)

Could not find tag for codec wmv3 in stream #0, codec not currently supported in container

您无需重新压缩即可恢复文件,并且ffmpeg不会将Windows Media 9流写入MP4,因此要么重新压缩:

ffmpeg -i input.wmv -ss 00:00:00 -to 00:00:10 output.mp4

或输出到另一个容器,如Matroska:

ffmpeg -i input.wmv -ss 00:00:00 -to 00:00:10 -c copy output.mkv