[FFmpeg-user] WMV to x264 => non monotone timestamps error

James O. houndeyex at gmail.com
Thu May 5 21:39:34 CEST 2011


Hello all,

This is my first time posting to this list, so please forgive me if I break
etiquette.

I have a few "problem" WMVs that come through our system from time to time
that I am trying to get resolved. I've tried everything I can think of at
this point, and been all over the internet looking for solutions. We run two
transcodes on the files that come in: one preparing it for the web (flash
streaming media server), another preparing it for mobile (iPhone, Android,
etc). The odd thing is that the mobile works fine, while the web has
problems.

I'm going to list a few things down here now. Hopefully, some of it will
help make sense of what's happening.

   1. MediaInfo dump from the offending WMV file
   2. Complete web transcode log
   3. Complete mobile transcode log

Thank you in advance for any help you may be able to provide. If I can do
anything else to help, please let me know.

James



--- MEDIA INFO DUMP ---

General
Complete name                    : C:\Users\jocull\Desktop\dt_test\dsp.wmv
Format                           : Windows Media
File size                        : 46.3 MiB
Duration                         : 1mn 33s
Overall bit rate mode            : Variable
Overall bit rate                 : 4 130 Kbps
Maximum Overall bit rate         : 11.6 Mbps
Encoded date                     : UTC 2011-04-10 03:58:33.598

Video
ID                               : 2
Format                           : WMV2
Codec ID                         : WMV2
Codec ID/Info                    : Windows Media Video 8
Description of the codec         : Windows Media Video V8
Duration                         : 1mn 34s
Bit rate mode                    : Variable
Bit rate                         : 12.3 Mbps
Width                            : 640 pixels
Height                           : 480 pixels
Display aspect ratio             : 4:3
Frame rate                       : 30.000 fps
Bit depth                        : 8 bits
Bits/(Pixel*Frame)               : 1.334
Stream size                      : 138 MiB
Language                         : English (US)

Audio
ID                               : 1
Format                           : WMA
Format version                   : Version 2
Codec ID                         : 161
Codec ID/Info                    : Windows Media Audio
Description of the codec         : Windows Media Audio 9.2 -  64 kbps, 44
kHz, stereo (A/V) 1-pass CBR
Duration                         : 1mn 33s
Bit rate mode                    : Constant
Bit rate                         : 64.0 Kbps
Channel(s)                       : 2 channels
Sampling rate                    : 44.1 KHz
Bit depth                        : 16 bits
Stream size                      : 735 KiB (2%)
Language                         : English (US)



--- WEB TRANSCODE LOG ---

./ffmpeg -y -i ./8a1e1e8fd0304832a79889c0ae0cf9ae-input.wmv -crf 25.0
-vcodec libx264 -acodec libfaac -ar 48000  -ab 128k -coder 1 -flags +loop
-cmp +chroma -partitions +parti4x4+partp8x8+partb8x8 -me_method hex -subq 6
-me_range 16 -g 250 -keyint_min 25 -sc_threshold 40 -i_qfactor 0.71
-b_strategy 1 -threads 0 -s 650x360 -vpre slow
./8a1e1e8fd0304832a79889c0ae0cf9ae_x264-650x360.mp4
FFmpeg version 0.6, Copyright (c) 2000-2010 the FFmpeg developers
  built on Oct 21 2010 11:30:55 with gcc 4.1.2 20080704 (Red Hat 4.1.2-48)
  configuration: --enable-gpl --enable-version3 --enable-nonfree
--enable-postproc --enable-libfaac --enable-libmp3lame --enable-libx264
--enable-x11grab --disable-shared --enable-static --enable-runtime-cpudetect
--disable-ffplay --disable-ffserver --disable-debug --extra-libs=-static
--extra-cflags=--stat
  libavutil     50.15. 1 / 50.15. 1
  libavcodec    52.72. 2 / 52.72. 2
  libavformat   52.64. 2 / 52.64. 2
  libavdevice   52. 2. 0 / 52. 2. 0
  libswscale     0.11. 0 /  0.11. 0
  libpostproc   51. 2. 0 / 51. 2. 0
Input #0, asf, from './8a1e1e8fd0304832a79889c0ae0cf9ae-input.wmv':
  Metadata:
    WMFSDKVersion   : 12.0.7600.16385
    WMFSDKNeeded    : 0.0.0.0000
    IsVBR           : 1
    VBR Peak        : 112
    Buffer Average  : 564
  Duration: 00:01:36.20, start: 3.000000, bitrate: 4035 kb/s
    Stream #0.0: Audio: wmav2, 44100 Hz, 2 channels, s16, 64 kb/s
    Stream #0.1: Video: wmv2, yuv420p, 640x480, 1k tbr, 1k tbn, 1k tbc
Warning: not compiled with thread support, using thread emulation
[libx264 @ 0x12a67520]using cpu capabilities: MMX2 SSE2Fast FastShuffle
SSEMisalign LZCNT
[libx264 @ 0x12a67520]profile High, level 5.1
[libx264 @ 0x12a67520]264 - core 106 - H.264/MPEG-4 AVC codec - Copyleft
2003-2010 - http://www.videolan.org/x264.html - options: cabac=1 ref=5
deblock=1:0:0 analyse=0x3:0x113 me=umh subme=8 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=1 sliced_threads=0 nr=0 decimate=1
interlaced=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=2 b_bias=0
direct=3 weightb=1 open_gop=0 weightp=2 keyint=250 keyint_min=25 scenecut=40
intra_refresh=0 rc_lookahead=50 rc=crf mbtree=1 crf=25.0 qcomp=0.60 qpmin=10
qpmax=51 qpstep=4 ip_ratio=1.41 aq=1:1.00
Output #0, mp4, to './8a1e1e8fd0304832a79889c0ae0cf9ae_x264-650x360.mp4':
  Metadata:
    encoder         : Lavf52.64.2
    Stream #0.0: Video: libx264, yuv420p, 650x360, q=10-51, 200 kb/s, 1k
tbn, 1k tbc
    Stream #0.1: Audio: libfaac, 48000 Hz, 2 channels, s16, 128 kb/s
Stream mapping:
  Stream #0.1 -> #0.0
  Stream #0.0 -> #0.1
Press [q] to stop encoding
frame=   20 fps=  0 q=649.0 size=       0kB time=3.26 bitrate=
0.1kbits/s
frame=   42 fps= 41 q=649.0 size=       0kB time=5.50 bitrate=
0.1kbits/s
frame=   51 fps= 30 q=30.0 size=      44kB time=2.21 bitrate=
162.2kbits/s
[mp4 @ 0x12a664e0]st:0 error, non monotone timestamps 2208 >= 2208
av_interleaved_write_frame(): Operation not permitted




--- MOBILE TRANSCODE LOG ---

./ffmpeg -y -i ./8a1e1e8fd0304832a79889c0ae0cf9ae-input.wmv -f mp4 -vcodec
mpeg4 -b 600kb -r 24 -s 480x320 -aspect 16:9 -acodec libfaac -ab 128kb -ar
44100 ./8a1e1e8fd0304832a79889c0ae0cf9ae_mpeg4-480x320.mp4
FFmpeg version 0.6, Copyright (c) 2000-2010 the FFmpeg developers
  built on Oct 21 2010 11:30:55 with gcc 4.1.2 20080704 (Red Hat 4.1.2-48)
  configuration: --enable-gpl --enable-version3 --enable-nonfree
--enable-postproc --enable-libfaac --enable-libmp3lame --enable-libx264
--enable-x11grab --disable-shared --enable-static --enable-runtime-cpudetect
--disable-ffplay --disable-ffserver --disable-debug --extra-libs=-static
--extra-cflags=--stat
  libavutil     50.15. 1 / 50.15. 1
  libavcodec    52.72. 2 / 52.72. 2
  libavformat   52.64. 2 / 52.64. 2
  libavdevice   52. 2. 0 / 52. 2. 0
  libswscale     0.11. 0 /  0.11. 0
  libpostproc   51. 2. 0 / 51. 2. 0
Input #0, asf, from './8a1e1e8fd0304832a79889c0ae0cf9ae-input.wmv':
  Metadata:
    WMFSDKVersion   : 12.0.7600.16385
    WMFSDKNeeded    : 0.0.0.0000
    IsVBR           : 1
    VBR Peak        : 112
    Buffer Average  : 564
  Duration: 00:01:36.20, start: 3.000000, bitrate: 4035 kb/s
    Stream #0.0: Audio: wmav2, 44100 Hz, 2 channels, s16, 64 kb/s
    Stream #0.1: Video: wmv2, yuv420p, 640x480, 1k tbr, 1k tbn, 1k tbc
Output #0, mp4, to './8a1e1e8fd0304832a79889c0ae0cf9ae_mpeg4-480x320.mp4':
  Metadata:
    encoder         : Lavf52.64.2
    Stream #0.0: Video: mpeg4, yuv420p, 480x320 [PAR 32:27 DAR 16:9],
q=2-31, 600 kb/s, 24 tbn, 24 tbc
    Stream #0.1: Audio: libfaac, 44100 Hz, 2 channels, s16, 128 kb/s
Stream mapping:
  Stream #0.1 -> #0.0
  Stream #0.0 -> #0.1
Press [q] to stop encoding
frame=   21 fps=  0 q=4.6 size=     155kB time=3.27 bitrate= 387.0kbits/s

frame=   44 fps= 43 q=5.3 size=     322kB time=5.69 bitrate= 464.4kbits/s

frame=   67 fps= 44 q=4.6 size=     496kB time=8.10 bitrate= 501.5kbits/s

frame=   90 fps= 44 q=5.1 size=     680kB time=10.70 bitrate=
520.6kbits/s
frame=  113 fps= 44 q=4.0 size=     851kB time=12.93 bitrate=
538.8kbits/s
frame=  137 fps= 45 q=3.7 size=    1036kB time=15.35 bitrate=
552.8kbits/s
frame=  160 fps= 45 q=4.2 size=    1216kB time=17.76 bitrate=
560.7kbits/s
frame=  181 fps= 44 q=3.3 size=    1402kB time=20.18 bitrate=
569.1kbits/s
frame=  204 fps= 45 q=4.7 size=    1597kB time=22.41 bitrate=
583.7kbits/s
frame=  227 fps= 45 q=3.6 size=    1792kB time=24.64 bitrate=
595.9kbits/s
frame=  250 fps= 45 q=3.3 size=    1993kB time=27.05 bitrate=
603.7kbits/s
frame=  273 fps= 45 q=4.4 size=    2178kB time=29.28 bitrate=
609.4kbits/s
frame=  296 fps= 45 q=3.7 size=    2401kB time=31.70 bitrate=
620.6kbits/s
frame=  319 fps= 45 q=4.1 size=    2597kB time=34.11 bitrate=
623.8kbits/s
frame=  341 fps= 45 q=3.8 size=    2828kB time=36.71 bitrate=
631.1kbits/s
frame=  364 fps= 45 q=4.3 size=    3012kB time=39.13 bitrate=
630.7kbits/s
frame=  387 fps= 45 q=4.4 size=    3214kB time=41.35 bitrate=
636.7kbits/s
frame=  410 fps= 45 q=3.7 size=    3428kB time=43.77 bitrate=
641.6kbits/s
frame=  433 fps= 45 q=3.5 size=    3630kB time=46.18 bitrate=
643.9kbits/s
frame=  456 fps= 45 q=3.6 size=    3832kB time=48.41 bitrate=
648.4kbits/s
frame=  479 fps= 45 q=3.7 size=    4028kB time=50.64 bitrate=
651.6kbits/s
frame=  503 fps= 45 q=3.6 size=    4221kB time=52.69 bitrate=
656.3kbits/s
frame=  525 fps= 45 q=4.8 size=    4442kB time=55.10 bitrate=
660.4kbits/s
frame=  548 fps= 45 q=3.6 size=    4658kB time=57.52 bitrate=
663.4kbits/s
frame=  571 fps= 45 q=3.5 size=    4858kB time=59.74 bitrate=
666.2kbits/s
frame=  594 fps= 45 q=4.9 size=    5057kB time=61.97 bitrate=
668.5kbits/s
frame=  617 fps= 45 q=4.6 size=    5237kB time=64.02 bitrate=
670.2kbits/s
frame=  640 fps= 45 q=4.4 size=    5454kB time=66.06 bitrate=
676.3kbits/s
frame=  663 fps= 45 q=3.7 size=    5681kB time=68.48 bitrate=
679.7kbits/s
frame=  686 fps= 45 q=3.9 size=    5883kB time=70.89 bitrate=
679.8kbits/s
frame=  709 fps= 45 q=3.7 size=    6060kB time=73.12 bitrate=
678.9kbits/s
frame=  732 fps= 45 q=3.8 size=    6257kB time=75.35 bitrate=
680.3kbits/s
frame=  755 fps= 45 q=4.0 size=    6464kB time=77.58 bitrate=
682.6kbits/s
frame=  779 fps= 45 q=3.7 size=    6650kB time=79.81 bitrate=
682.6kbits/s
frame=  802 fps= 45 q=4.4 size=    6853kB time=82.04 bitrate=
684.3kbits/s
frame=  825 fps= 45 q=3.3 size=    7065kB time=84.45 bitrate=
685.3kbits/s
frame=  848 fps= 45 q=4.4 size=    7265kB time=86.87 bitrate=
685.1kbits/s
frame=  872 fps= 45 q=3.8 size=    7435kB time=88.72 bitrate=
686.4kbits/s
frame=  896 fps= 45 q=3.3 size=    7653kB time=90.95 bitrate=
689.3kbits/s
frame=  912 fps= 45 q=3.2 Lsize=    7930kB time=93.46 bitrate=
695.1kbits/s
video:6426kB audio:1460kB global headers:0kB muxing overhead 0.562451%



./qt-faststart ./8a1e1e8fd0304832a79889c0ae0cf9ae_mpeg4-480x320.mp4
qtfs_8a1e1e8fd0304832a79889c0ae0cf9ae_mpeg4-480x320.mp4
ftyp          0 28
free         28 8
mdat         36 8074976
moov    8075012 45423
 patching stco atom...
 patching stco atom...
 writing ftyp atom...
 writing moov atom...
 copying rest of file...


More information about the ffmpeg-user mailing list