[FFmpeg-user] Issues with framerate read for wmv2 file

Mark Huang mmhmmh at gmail.com
Tue Nov 1 22:52:44 EET 2016


Hi,

I ran into an issue when trying to convert wmv file into an mp4. This is
the output from the ffmpeg -i.

>ffmpeg -i Capture.wmv
> ffmpeg version N-82178-g60178e7 Copyright (c) 2000-2016 the FFmpeg
> developers
>   built with gcc 5.4.0 (GCC)
>   configuration: --enable-gpl --enable-version3 --disable-w32threads
> --enable-dxva2 --enable-libmfx --enable-nvenc --enable-avisynth
> --enable-bzlib --enable-libebur128 --enable-fontconfig --enable-fre
> i0r --enable-gnutls --enable-iconv --enable-libass --enable-libbluray
> --enable-libbs2b --enable-libcaca --enable-libfreetype --enable-libgme
> --enable-libgsm --enable-libilbc --enable-libmodplug --enab
> le-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb
> --enable-libopenh264 --enable-libopenjpeg --enable-libopus --enable-librtmp
> --enable-libschroedinger --enable-libsnappy --enable-lib
> soxr --enable-libspeex --enable-libtheora --enable-libtwolame
> --enable-libvidstab --enable-libvo-amrwbenc --enable-libvorbis
> --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --ena
> ble-libx265 --enable-libxavs --enable-libxvid --enable-libzimg
> --enable-lzma --enable-decklink --enable-zlib
>   libavutil      55. 35.100 / 55. 35.100
>   libavcodec     57. 65.100 / 57. 65.100
>   libavformat    57. 57.100 / 57. 57.100
>   libavdevice    57.  2.100 / 57.  2.100
>   libavfilter     6. 66.100 /  6. 66.100
>   libswscale      4.  3.100 /  4.  3.100
>   libswresample   2.  4.100 /  2.  4.100
>   libpostproc    54.  2.100 / 54.  2.100
> Guessed Channel Layout for Input Stream #0.0 : stereo
> Input #0, asf, from 'Capture.wmv':
>   Metadata:
>     WMFSDKNeeded    : 0.0.0.0000
>     DeviceConformanceTemplate: @
>     WMFSDKVersion   : 12.0.7601.17514
>     IsVBR           : 0
>   Duration: 00:01:42.29, start: 0.000000, bitrate: 373 kb/s
>     Stream #0:0(eng): Audio: wmav2 (a[1][0][0] / 0x0161), 44100 Hz,
> stereo, fltp, 128 kb/s
>     Stream #0:1(eng): Video: wmv2 (WMV2 / 0x32564D57), yuv420p, 640x480,
> 800 kb/s, SAR 1:1 DAR 4:3, 1k tbr, 1k tbn, 1k tbc
> At least one output file must be specified


The 1k tbr and 1tbn and 1tbc looks pretty odd. The vlc player reports the
framerate as 30.000030 for comparison.

This is what happens when I tried to convert it.

> >ffmpeg -y -i Capture.wmv testmp4.mp4
> ffmpeg version N-82178-g60178e7 Copyright (c) 2000-2016 the FFmpeg
> developers
>   built with gcc 5.4.0 (GCC)
>   configuration: --enable-gpl --enable-version3 --disable-w32threads
> --enable-dxva2 --enable-libmfx --enable-nvenc --enable-avisynth
> --enable-bzlib --enable-libebur128 --enable-fontconfig --enable-fre
> i0r --enable-gnutls --enable-iconv --enable-libass --enable-libbluray
> --enable-libbs2b --enable-libcaca --enable-libfreetype --enable-libgme
> --enable-libgsm --enable-libilbc --enable-libmodplug --enab
> le-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb
> --enable-libopenh264 --enable-libopenjpeg --enable-libopus --enable-librtmp
> --enable-libschroedinger --enable-libsnappy --enable-lib
> soxr --enable-libspeex --enable-libtheora --enable-libtwolame
> --enable-libvidstab --enable-libvo-amrwbenc --enable-libvorbis
> --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --ena
> ble-libx265 --enable-libxavs --enable-libxvid --enable-libzimg
> --enable-lzma --enable-decklink --enable-zlib
>   libavutil      55. 35.100 / 55. 35.100
>   libavcodec     57. 65.100 / 57. 65.100
>   libavformat    57. 57.100 / 57. 57.100
>   libavdevice    57.  2.100 / 57.  2.100
>   libavfilter     6. 66.100 /  6. 66.100
>   libswscale      4.  3.100 /  4.  3.100
>   libswresample   2.  4.100 /  2.  4.100
>   libpostproc    54.  2.100 / 54.  2.100
> Guessed Channel Layout for Input Stream #0.0 : stereo
> Input #0, asf, from 'Capture.wmv':
>   Metadata:
>     WMFSDKNeeded    : 0.0.0.0000
>     DeviceConformanceTemplate: @
>     WMFSDKVersion   : 12.0.7601.17514
>     IsVBR           : 0
>   Duration: 00:01:42.29, start: 0.000000, bitrate: 373 kb/s
>     Stream #0:0(eng): Audio: wmav2 (a[1][0][0] / 0x0161), 44100 Hz,
> stereo, fltp, 128 kb/s
>     Stream #0:1(eng): Video: wmv2 (WMV2 / 0x32564D57), yuv420p, 640x480,
> 800 kb/s, SAR 1:1 DAR 4:3, 1k tbr, 1k tbn, 1k tbc
> [libx264 @ 000000000002d9c0] using SAR=1/1
> [libx264 @ 000000000002d9c0] using cpu capabilities: MMX2 SSE2Fast SSSE3
> SSE4.2 AVX FMA3 AVX2 LZCNT BMI2
> [libx264 @ 000000000002d9c0] profile High, level 5.2
> [libx264 @ 000000000002d9c0] 264 - core 148 r2721 72d53ab - H.264/MPEG-4
> AVC codec - Copyleft 2003-2016 - 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=12 lookahead_threads=2 sliced_threads=0 nr=0 dec
> imate=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_lookah
> ead=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, mp4, to 'testmp4.mp4':
>   Metadata:
>     WMFSDKNeeded    : 0.0.0.0000
>     DeviceConformanceTemplate: @
>     WMFSDKVersion   : 12.0.7601.17514
>     IsVBR           : 0
>     encoder         : Lavf57.57.100
>     Stream #0:0(eng): Video: h264 (libx264) ([33][0][0][0] / 0x0021),
> yuv420p, 640x480 [SAR 1:1 DAR 4:3], q=-1--1, 1k fps, 16k tbn, 1k tbc
>     Metadata:
>       encoder         : Lavc57.65.100 libx264
>     Side data:
>       cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: -1
>     Stream #0:1(eng): Audio: aac (LC) ([64][0][0][0] / 0x0040), 44100 Hz,
> stereo, fltp, 128 kb/s
>     Metadata:
>       encoder         : Lavc57.65.100 aac
> Stream mapping:
>   Stream #0:1 -> #0:0 (wmv2 (native) -> h264 (libx264))
>   Stream #0:0 -> #0:1 (wmav2 (native) -> aac (native))
> Press [q] to stop, [?] for help
> [aac @ 00000000000286e0] Queue input is backward in time1.60 bitrate=
> 107.6kbits/s dup=1623 drop=0 speed=1.03x
> [mp4 @ 0000000001d0f0a0] Non-monotonous DTS in output stream 0:1;
> previous: 7168, current: 7100; changing to 7169. This may result in
> incorrect timestamps in the output file.
> frame=102305 fps=704 q=-1.0 Lsize=   14412kB time=00:01:42.30
> bitrate=1154.1kbits/s dup=99860 drop=0 speed=0.704x
> video:11538kB audio:1592kB subtitle:0kB other streams:0kB global
> headers:0kB muxing overhead: 9.770040%
> [libx264 @ 000000000002d9c0] frame I:410   Avg QP:17.55  size: 15919
> [libx264 @ 000000000002d9c0] frame P:25781 Avg QP:19.45  size:   133
> [libx264 @ 000000000002d9c0] frame B:76114 Avg QP:28.33  size:    24
> [libx264 @ 000000000002d9c0] consecutive B-frames:  0.8%  0.0%  0.0% 99.2%
> [libx264 @ 000000000002d9c0] mb I  I16..4: 11.2% 80.5%  8.3%
> [libx264 @ 000000000002d9c0] mb P  I16..4:  0.0%  0.0%  0.0%  P16..4:
>  3.4%  0.2%  0.1%  0.0%  0.0%    skip:96.2%
> [libx264 @ 000000000002d9c0] mb B  I16..4:  0.0%  0.0%  0.0%  B16..8:
>  0.5%  0.0%  0.0%  direct: 0.0%  skip:99.5%  L0:48.4% L1:51.6% BI: 0.0%
> [libx264 @ 000000000002d9c0] 8x8 transform intra:80.4% inter:91.4%
> [libx264 @ 000000000002d9c0] coded y,uvDC,uvAC intra: 70.7% 80.2% 35.1%
> inter: 0.1% 0.7% 0.0%
> [libx264 @ 000000000002d9c0] i16 v,h,dc,p: 16% 39% 11% 34%
> [libx264 @ 000000000002d9c0] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 26% 28% 21%
>  3%  4%  5%  4%  5%  4%
> [libx264 @ 000000000002d9c0] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 31% 26%  7%
>  5%  7%  8%  6%  6%  4%
> [libx264 @ 000000000002d9c0] i8c dc,h,v,p: 35% 24% 31% 11%
> [libx264 @ 000000000002d9c0] Weighted P-Frames: Y:0.0% UV:0.0%
> [libx264 @ 000000000002d9c0] ref P L0: 95.0%  2.9%  1.6%  0.5%
> [libx264 @ 000000000002d9c0] ref B L0: 76.6% 23.0%  0.4%
> [libx264 @ 000000000002d9c0] ref B L1: 94.9%  5.1%
> [libx264 @ 000000000002d9c0] kb/s:923.83
> [aac @ 00000000000286e0] Qavg: 766.027


The resulting mp4 is somewhat playable in vlc but it reports having
framerate of 1000.

ffmpeg version N-82178-g60178e7 Copyright (c) 2000-2016 the FFmpeg
> developers
>   built with gcc 5.4.0 (GCC)
>   configuration: --enable-gpl --enable-version3 --disable-w32threads
> --enable-dxva2 --enable-libmfx --enable-nvenc --enable-avisynth
> --enable-bzlib --enable-libebur128 --enable-fontconfig --enable-fre
> i0r --enable-gnutls --enable-iconv --enable-libass --enable-libbluray
> --enable-libbs2b --enable-libcaca --enable-libfreetype --enable-libgme
> --enable-libgsm --enable-libilbc --enable-libmodplug --enab
> le-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb
> --enable-libopenh264 --enable-libopenjpeg --enable-libopus --enable-librtmp
> --enable-libschroedinger --enable-libsnappy --enable-lib
> soxr --enable-libspeex --enable-libtheora --enable-libtwolame
> --enable-libvidstab --enable-libvo-amrwbenc --enable-libvorbis
> --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --ena
> ble-libx265 --enable-libxavs --enable-libxvid --enable-libzimg
> --enable-lzma --enable-decklink --enable-zlib
>   libavutil      55. 35.100 / 55. 35.100
>   libavcodec     57. 65.100 / 57. 65.100
>   libavformat    57. 57.100 / 57. 57.100
>   libavdevice    57.  2.100 / 57.  2.100
>   libavfilter     6. 66.100 /  6. 66.100
>   libswscale      4.  3.100 /  4.  3.100
>   libswresample   2.  4.100 /  2.  4.100
>   libpostproc    54.  2.100 / 54.  2.100
> Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'testmp4.mp4':
>   Metadata:
>     major_brand     : isom
>     minor_version   : 512
>     compatible_brands: isomiso2avc1mp41
>     encoder         : Lavf57.57.100
>   Duration: 00:01:42.31, start: 0.000000, bitrate: 1154 kb/s
>     Stream #0:0(eng): Video: h264 (High) (avc1 / 0x31637661), yuv420p,
> 640x480 [SAR 1:1 DAR 4:3], 923 kb/s, 1k fps, 1k tbr, 16k tbn, 2k tbc
> (default)
>     Metadata:
>       handler_name    : VideoHandler
>     Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz,
> stereo, fltp, 127 kb/s (default)
>     Metadata:
>       handler_name    : SoundHandler
> At least one output file must be specified


Is this a parser issue on wmv2 video format?

Thanks
Mark Huang


More information about the ffmpeg-user mailing list