[FFmpeg-user] Conversion from WMV to M2V - Lost Frame Problem

Andrew Arthur ikrananka at hotmail.com
Tue Nov 18 20:39:28 CET 2014


I am converting a load of WMV files to M2V (i.e. video conversion only)
using the following basic command line:

 

ffmpeg -i input.wmv -codec:v mpeg2video -b:v 8000k -maxrate 10000k
output.m2v

 

However, it is imperative in my conversion that the number of frames in the
output file be identical to the input file.  However I consistently get one
less frame in the m2v files compared to the wmv files.

 

Is there an alternative command line that will ensure the total number of
frames is honored?

 

To provide a little further info, one example is as follows.  The input.wmv
file has 1037 frames, however the output m2v file only has 1036 frames:

 

D:\ffmpeg -i input.wmv -codec:v mpeg2video -b:v 8000k -maxrate 10000k
output.m2v

ffmpeg version N-67742-g3f07dd6 Copyright (c) 2000-2014 the FFmpeg
developers

  built on Nov 16 2014 22:01:52 with gcc 4.9.2 (GCC)

  configuration: --enable-gpl --enable-version3 --disable-w32threads
--enable-av

isynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls
--enab

le-iconv --enable-libass --enable-libbluray --enable-libbs2b
--enable-libcaca --

enable-libfreetype --enable-libgme --enable-libgsm --enable-libilbc
--enable-lib

modplug --enable-libmp3lame --enable-libopencore-amrnb
--enable-libopencore-amrw

b --enable-libopenjpeg --enable-libopus --enable-librtmp
--enable-libschroedinge

r --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame
--en

able-libvidstab --enable-libvo-aacenc --enable-libvo-amrwbenc
--enable-libvorbis

--enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264
--enable-

libx265 --enable-libxavs --enable-libxvid --enable-zlib

  libavutil      54. 13.100 / 54. 13.100

  libavcodec     56. 12.101 / 56. 12.101

  libavformat    56. 13.100 / 56. 13.100

  libavdevice    56.  3.100 / 56.  3.100

  libavfilter     5.  2.103 /  5.  2.103

  libswscale      3.  1.101 /  3.  1.101

  libswresample   1.  1.100 /  1.  1.100

  libpostproc    53.  3.100 / 53.  3.100

Input #0, asf, from 'input.wmv':

  Metadata:

    VBR Peak        : 10000000

    DeviceConformanceTemplate: MP at HL

    WM/WMADRCPeakReference: 23859

    WM/WMADRCPeakTarget: 23859

    WM/WMADRCAverageReference: 4536

    WM/WMADRCAverageTarget: 4536

    WMFSDKVersion   : 10.00.00.3802

    WMFSDKNeeded    : 0.0.0.0000

    IsVBR           : 1

    Buffer Average  : 2743

  Duration: 00:00:43.21, start: 0.000000, bitrate: 9064 kb/s

    Stream #0:0: Audio: wmapro (b[1][0][0] / 0x0162), 48000 Hz, 5.1, fltp,
423 k

b/s

    Stream #0:1: Video: wmv3 (Main) (WMV3 / 0x33564D57), yuv420p, 1440x1080,
800

0 kb/s, SAR 1:1 DAR 4:3, 24 fps, 24 tbr, 1k tbn, 1k tbc

[mpeg2video @ 041fce80] Automatically choosing VBV buffer size of 224 kbyte

Output #0, mpeg2video, to 'output.m2v':

  Metadata:

    VBR Peak        : 10000000

    DeviceConformanceTemplate: MP at HL

    WM/WMADRCPeakReference: 23859

    WM/WMADRCPeakTarget: 23859

    WM/WMADRCAverageReference: 4536

    WM/WMADRCAverageTarget: 4536

    WMFSDKVersion   : 10.00.00.3802

    WMFSDKNeeded    : 0.0.0.0000

    IsVBR           : 1

    Buffer Average  : 2743

    encoder         : Lavf56.13.100

    Stream #0:0: Video: mpeg2video, yuv420p, 1440x1080 [SAR 1:1 DAR 4:3],
q=2-31

, 8000 kb/s, 24 fps, 24 tbn, 24 tbc

    Metadata:

      encoder         : Lavc56.12.101 mpeg2video

Stream mapping:

  Stream #0:1 -> #0:0 (wmv3 (native) -> mpeg2video (native))

Press [q] to stop, [?] for help

frame=   36 fps=0.0 q=4.3 size=    1531kB time=00:00:01.41
bitrate=8852.0kbits/s

frame=   73 fps= 72 q=4.2 size=    2976kB time=00:00:02.95
bitrate=8241.7kbits/s

frame=  110 fps= 73 q=4.7 size=    4476kB time=00:00:04.50
bitrate=8148.4kbits/s

frame=  146 fps= 73 q=4.7 size=    5934kB time=00:00:06.00
bitrate=8101.6kbits/s

frame=  183 fps= 72 q=4.2 size=    7410kB time=00:00:07.54
bitrate=8048.9kbits/s

frame=  221 fps= 73 q=4.8 size=    8977kB time=00:00:09.12
bitrate=8059.2kbits/s

frame=  259 fps= 73 q=6.5 size=   10510kB time=00:00:10.70
bitrate=8040.6kbits/s

frame=  297 fps= 73 q=5.7 size=   12103kB time=00:00:12.29
bitrate=8066.0kbits/s

frame=  333 fps= 73 q=7.7 size=   13620kB time=00:00:13.79
bitrate=8090.0kbits/s

frame=  370 fps= 73 q=6.0 size=   15050kB time=00:00:15.33
bitrate=8040.7kbits/s

frame=  406 fps= 73 q=7.9 size=   16536kB time=00:00:16.83
bitrate=8047.2kbits/s

frame=  442 fps= 73 q=6.8 size=   17990kB time=00:00:18.33
bitrate=8038.6kbits/s

frame=  479 fps= 73 q=5.4 size=   19394kB time=00:00:19.87
bitrate=7993.6kbits/s

frame=  514 fps= 73 q=7.0 size=   20922kB time=00:00:21.33
bitrate=8033.9kbits/s

frame=  553 fps= 73 q=10.5 size=   22452kB time=00:00:22.95
bitrate=8011.3kbits/

frame=  591 fps= 73 q=7.6 size=   24004kB time=00:00:24.54
bitrate=8012.5kbits/s

frame=  628 fps= 73 q=5.6 size=   25508kB time=00:00:26.08
bitrate=8011.4kbits/s

frame=  668 fps= 73 q=4.1 size=   27105kB time=00:00:27.75
bitrate=8001.5kbits/s

frame=  705 fps= 73 q=6.0 size=   28663kB time=00:00:29.29
bitrate=8016.1kbits/s

frame=  742 fps= 73 q=4.2 size=   30105kB time=00:00:30.83
bitrate=7998.5kbits/s

frame=  776 fps= 73 q=10.2 size=   31641kB time=00:00:32.25
bitrate=8037.3kbits/

frame=  811 fps= 73 q=8.8 size=   33015kB time=00:00:33.70
bitrate=8023.6kbits/s

frame=  847 fps= 73 q=9.7 size=   34539kB time=00:00:35.20
bitrate=8036.3kbits/s

frame=  881 fps= 73 q=9.0 size=   35930kB time=00:00:36.62
bitrate=8036.5kbits/s

frame=  916 fps= 72 q=7.9 size=   37290kB time=00:00:38.08
bitrate=8021.3kbits/s

frame=  952 fps= 72 q=4.8 size=   38672kB time=00:00:39.58
bitrate=8003.4kbits/s

frame=  986 fps= 72 q=3.7 size=   39992kB time=00:00:41.00
bitrate=7990.6kbits/s

frame= 1016 fps= 72 q=3.6 size=   41183kB time=00:00:42.25
bitrate=7985.0kbits/s

frame= 1037 fps= 71 q=3.3 Lsize=   42093kB time=00:00:43.16
bitrate=7988.2kbits/

s

video:42093kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB
muxing

overhead: 0.000000%

 

Thanks for any help.



More information about the ffmpeg-user mailing list