[FFmpeg-user] Non monotonic timestamp issues

Jon Drukman jsd at cluttered.com
Fri May 27 23:56:18 CEST 2011


I've got a .MOV file that I'm having a real bear of a time converting.  Here is
the file:

http://tm-ami.s3.amazonaws.com/clip.mov

% ffmpeg -y -i clip.mov  -s 480x360 -vcodec libx264 -acodec libfaac clip.mp4
ffmpeg version UNKNOWN, Copyright (c) 2000-2011 the FFmpeg developers
  built on Apr 25 2011 11:47:40 with gcc 4.2.1 (Apple Inc. build 5666) (dot 3)
  configuration: --enable-pthreads --enable-libfaac --enable-libmp3lame
--enable-libx264 --enable-gpl --enable-nonfree --disable-network
--enable-libxvid --enable-libopencore-amrnb --enable-libopencore-amrwb
--enable-version3
  libavutil    51.  0. 0 / 51.  0. 0
  libavcodec   53.  1. 0 / 53.  1. 0
  libavformat  53.  0. 3 / 53.  0. 3
  libavdevice  53.  0. 0 / 53.  0. 0
  libavfilter   2.  0. 0 /  2.  0. 0
  libswscale    0. 13. 0 /  0. 13. 0
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'clip.mov':
  Metadata:
    major_brand     : qt  
    minor_version   : 0
    compatible_brands: qt  
    creation_time   : 2011-05-22 00:47:28
  Duration: 00:01:32.94, start: 0.073946, bitrate: 5878 kb/s
    Stream #0.0(und): Audio: pcm_s24le, 44100 Hz, 2 channels, s32, 2116 kb/s
    Metadata:
      creation_time   : 2011-05-22 00:47:28
    Stream #0.1(und): Video: mjpeg, yuvj420p, 640x480 [PAR 72:72 DAR 4:3], 3684
kb/s, 14.51 fps, 30k tbr, 30k tbn, 30k tbc
    Metadata:
      creation_time   : 2011-05-22 00:47:28
Incompatible sample format 's32' for codec 'libfaac', auto-selecting format 's16'
[buffer @ 0x1010037e0] w:640 h:480 pixfmt:yuvj420p
[scale @ 0x101003b20] w:640 h:480 fmt:yuvj420p -> w:480 h:360 fmt:yuvj420p
flags:0xa0000004
[libx264 @ 0x101829a00] Default settings detected, using medium profile
[libx264 @ 0x101829a00] using SAR=1/1
[libx264 @ 0x101829a00] MB rate (20700000) > level limit (983040)
[libx264 @ 0x101829a00] using cpu capabilities: MMX2 SSE2Fast SSSE3 FastShuffle
SSE4.2
[libx264 @ 0x101829a00] profile High, level 5.1
[libx264 @ 0x101829a00] 264 - core 104 - H.264/MPEG-4 AVC codec - Copyleft
2003-2010 - 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=1 sliced_threads=0 nr=0 decimate=1
interlaced=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=abr mbtree=1 bitrate=200 ratetol=1.0
qcomp=0.60 qpmin=10 qpmax=51 qpstep=4 ip_ratio=1.40 aq=1:1.00
Output #0, mp4, to 'clip.mp4':
  Metadata:
    major_brand     : qt  
    minor_version   : 0
    compatible_brands: qt  
    creation_time   : 2011-05-22 00:47:28
    encoder         : Lavf53.0.3
    Stream #0.0(und): Video: libx264, yuvj420p, 480x360 [PAR 1:1 DAR 4:3],
q=2-31, 200 kb/s, 30k tbn, 30k tbc
    Metadata:
      creation_time   : 2011-05-22 00:47:28
    Stream #0.1(und): Audio: libfaac, 44100 Hz, 2 channels, s16, 64 kb/s
    Metadata:
      creation_time   : 2011-05-22 00:47:28
Stream mapping:
  Stream #0.1 -> #0.0
  Stream #0.0 -> #0.1
Press [q] to stop encoding
frame= 4327 fps=222 q=51.0 size=     118kB time=0.14 bitrate=6780.1kbits/s
dup=4325 drop=0    


With these settings, it takes forever to encode.  It's only a 90 second clip but
I gave up waiting for the encode after a few hours.  Also notice the really high
number of 'dups'.

I tried setting vsync to 0 but ffmpeg aborts almost immediately with:

[mp4 @ 0x101829400] Application provided invalid, non monotonically increasing
dts to muxer in stream 0: 2218 >= 2218
av_interleaved_write_frame(): Invalid argument

I tried converting the same clip with Handbrake and it took a few seconds on my
laptop (MacBook Pro, 4 cores).

Anybody got any ideas how to make ffmpeg play happily with this file?





More information about the ffmpeg-user mailing list