При преобразовании файла WMV в файл MP4, он говорит
[mp4 @ 0x989c160] дорожка 1: не удалось найти тег, кодек в настоящее время не поддерживается в контейнере
а также
Не удалось записать заголовок для выходного файла # 0 (неверные параметры кодека?): Операция не разрешена.
Но преобразование файла WMV в файл MKV - это хорошо. Интересно, почему?
Ниже приведены результаты обоих случаев.
Преобразование из файла WMV в файл MP4 не работает
$ ffmpeg -i "1.wmv" -c:v libx264 -crf 23 -c:a copy "1.mp4" ffmpeg version git-2012-06-03-169dae8 Copyright (c) 2000-2012 the FFmpeg developers built on Jun 3 2012 09:14:54 with gcc 4.6.3 configuration: --enable-gpl --enable-libfaac --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-nonfree --enable-version3 --enable-x11grab libavutil 51. 56.100 / 51. 56.100 libavcodec 54. 23.100 / 54. 23.100 libavformat 54. 6.101 / 54. 6.101 libavdevice 54. 0.100 / 54. 0.100 libavfilter 2. 77.100 / 2. 77.100 libswscale 2. 1.100 / 2. 1.100 libswresample 0. 15.100 / 0. 15.100 libpostproc 52. 0.100 / 52. 0.100 Guessed Channel Layout for Input Stream #0.0 : stereo Input #0, asf, from '1.wmv': Metadata: WMFSDKVersion : 9.00.00.3267 WMFSDKNeeded : 0.0.0.0000 IsVBR : 0 Duration: 01:40:50.70, start: 0.000000, bitrate: 2100 kb/s Stream #0:0(eng): Audio: wmav2 (a[1][0][0] / 0x0161), 44100 Hz, stereo, s16, 128 kb/s Stream #0:1(eng): Video: wmv3 (Main) (WMV3 / 0x33564D57), yuv420p, 640x480, 1974 kb/s, 29.97 tbr, 1k tbn, 1k tbc [buffer @ 0x98c28c0] w:640 h:480 pixfmt:yuv420p tb:1/1000 sar:0/1 sws_param:flags=2 [buffersink @ 0x9894320] No opaque field provided [libx264 @ 0x98b0ec0] using cpu capabilities: MMX2 SSE2Fast SSSE3 FastShuffle SSE4.1 Cache64 [libx264 @ 0x98b0ec0] profile High, level 3.0 [libx264 @ 0x98b0ec0] 264 - core 125 r2200 999b753 - H.264/MPEG-4 AVC codec - Copyleft 2003-2012 - http://www.videolan.org/x264.html - options: cabac=1 ref=3 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=7 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=3 lookahead_threads=1 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=1 b_bias=0 direct=1 weightb=1 open_gop=0 weightp=2 keyint=250 keyint_min=25 scenecut=40 intra_refresh=0 rc_lookahead=40 rc=crf mbtree=1 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00 [mp4 @ 0x989c160] track 1: could not find tag, codec not currently supported in container Output #0, mp4, to '1.mp4': Metadata: WMFSDKVersion : 9.00.00.3267 WMFSDKNeeded : 0.0.0.0000 IsVBR : 0 encoder : Lavf54.6.101 Stream #0:0(eng): Video: h264 ([33][0][0][0] / 0x0021), yuv420p, 640x480, q=-1--1, 30k tbn, 29.97 tbc Stream #0:1(eng): Audio: wmav2 (a[1][0][0] / 0x0161), 44100 Hz, stereo, 128 kb/s Stream mapping: Stream #0:1 -> #0:0 (wmv3 -> libx264) Stream #0:0 -> #0:1 (copy) Could not write header for output file #0 (incorrect codec parameters ?): Operation not permitted
Преобразование из файла WMV в файл MKV хорошо:
$ ffmpeg -i "1.wmv" -c:v libx264 -crf 23 -c:a copy "1.mkv" ffmpeg version git-2012-06-03-169dae8 Copyright (c) 2000-2012 the FFmpeg developers built on Jun 3 2012 09:14:54 with gcc 4.6.3 configuration: --enable-gpl --enable-libfaac --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-nonfree --enable-version3 --enable-x11grab libavutil 51. 56.100 / 51. 56.100 libavcodec 54. 23.100 / 54. 23.100 libavformat 54. 6.101 / 54. 6.101 libavdevice 54. 0.100 / 54. 0.100 libavfilter 2. 77.100 / 2. 77.100 libswscale 2. 1.100 / 2. 1.100 libswresample 0. 15.100 / 0. 15.100 libpostproc 52. 0.100 / 52. 0.100 Guessed Channel Layout for Input Stream #0.0 : stereo Input #0, asf, from '1.wmv': Metadata: WMFSDKVersion : 9.00.00.3267 WMFSDKNeeded : 0.0.0.0000 IsVBR : 0 Duration: 01:40:50.70, start: 0.000000, bitrate: 2100 kb/s Stream #0:0(eng): Audio: wmav2 (a[1][0][0] / 0x0161), 44100 Hz, stereo, s16, 128 kb/s Stream #0:1(eng): Video: wmv3 (Main) (WMV3 / 0x33564D57), yuv420p, 640x480, 1974 kb/s, 29.97 tbr, 1k tbn, 1k tbc File '1.mkv' already exists. Overwrite ? [y/N] y w:640 h:480 pixfmt:yuv420p tb:1/1000 sar:0/1 sws_param:flags=2 [buffersink @ 0xa0a2760] No opaque field provided [libx264 @ 0xa0b6ec0] using cpu capabilities: MMX2 SSE2Fast SSSE3 FastShuffle SSE4.1 Cache64 [libx264 @ 0xa0b6ec0] profile High, level 3.0 [libx264 @ 0xa0b6ec0] 264 - core 125 r2200 999b753 - H.264/MPEG-4 AVC codec - Copyleft 2003-2012 - http://www.videolan.org/x264.html - options: cabac=1 ref=3 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=7 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=3 lookahead_threads=1 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=1 b_bias=0 direct=1 weightb=1 open_gop=0 weightp=2 keyint=250 keyint_min=25 scenecut=40 intra_refresh=0 rc_lookahead=40 rc=crf mbtree=1 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00 Output #0, matroska, to '1.mkv': Metadata: WMFSDKVersion : 9.00.00.3267 WMFSDKNeeded : 0.0.0.0000 IsVBR : 0 encoder : Lavf54.6.101 Stream #0:0(eng): Video: h264, yuv420p, 640x480, q=-1--1, 1k tbn, 29.97 tbc Stream #0:1(eng): Audio: wmav2 (a[1][0][0] / 0x0161), 44100 Hz, stereo, 128 kb/s Stream mapping: Stream #0:1 -> #0:0 (wmv3 -> libx264) Stream #0:0 -> #0:1 (copy) Press [q] to stop, [?] for help frame= 325 fps=106 q=29.0 size= 411kB time=00:00:09.20 bitrate= 366.0kbits/s