Tomas Isdal <[email protected]> added the comment:

Thanks rooxhou!

Made an (unscientific) test of the patch and it seems to fix the timestamp bugs
(at least for the file I had issues with). Output file plays both in vlc and in
flash without issues.
I used the latest svn r19639, (aug 14, 2009)

is...@dsp:~/ffmpeg/trunk$ ./ffmpeg -i /tmp/test.mkv -f mp4 -vcodec copy -acodec
libfaac /tmp/test.m4v
FFmpeg version SVN-r19639, Copyright (c) 2000-2009 Fabrice Bellard, et al. 
configuration: --prefix=/usr/local --disable-debug --enable-gpl
--enable-postproc --enable-pthreads --enable-libdc1394 --enable-libfaad
--enable-libgsm --enable-libmp3lame --enable-libtheora --enable-libvorbis
--enable-libx264 --enable-libxvid --enable-runtime-cpudetect --enable-nonfree
--enable-libfaac
  libavutil     50. 3. 0 / 50. 3. 0
  libavcodec    52.32. 0 / 52.32. 0
  libavformat   52.37. 0 / 52.37. 0
  libavdevice   52. 2. 0 / 52. 2. 0
  libswscale     0. 7. 1 /  0. 7. 1
  libpostproc   51. 2. 0 / 51. 2. 0
  built on Aug 14 2009 10:14:47, gcc: 4.3.2

Seems stream 0 codec frame rate differs from container frame rate: 47.95
(48000/1001) -> 23.98 (24000/1001)
Input #0, matroska, from '/tmp/test.mkv':
  Duration: 00:01:01.43, start: 0.000000, bitrate: N/A
    Stream #0.0(eng): Video: h264, yuv420p, 1280x534, PAR 1:1 DAR 640:267, 23.98
tbr, 1k tbn, 47.95 tbc
    Stream #0.1(eng): Audio: dca, 48000 Hz, 6 channels, s16
Output #0, mp4, to '/tmp/test.m4v':
    Stream #0.0(eng): Video: libx264, yuv420p, 1280x534 [PAR 1:1 DAR 640:267],
q=2-31, 1k tbn, 1k tbc
    Stream #0.1(eng): Audio: aac, 48000 Hz, 6 channels, s16, 64 kb/s
Stream mapping:
  Stream #0.0 -> #0.0
  Stream #0.1 -> #0.1
Press [q] to stop encoding
[NULL @ 0x2c63040]error, non monotone timestamps 167 >= 83
av_interleaved_write_frame(): Error while opening file

is...@dsp:~/ffmpeg/trunk$ wget
http://roundup.ffmpeg.org/roundup/ffmpeg/file444/matroskadec_dts_fix.patch
is...@dsp:~/ffmpeg/trunk$ patch -p0 < matroskadec_dts_fix.patch 
patching file libavformat/matroskadec.c
is...@dsp:~/ffmpeg/trunk$ make -j 8
...

is...@dsp:~/ffmpeg/trunk$ ./ffmpeg -i /tmp/test.mkv -f mp4 -vcodec copy -acodec
libfaac /tmp/test.m4vFFmpeg version SVN-r19639, Copyright (c) 2000-2009 Fabrice
Bellard, et al.  configuration: --prefix=/usr/local --disable-debug --enable-gpl
--enable-postproc --enable-pthreads --enable-libdc1394 --enable-libfaad
--enable-libgsm --enable-libmp3lame --enable-libtheora --enable-libvorbis
--enable-libx264 --enable-libxvid --enable-runtime-cpudetect --enable-nonfree
--enable-libfaac
  libavutil     50. 3. 0 / 50. 3. 0
  libavcodec    52.32. 0 / 52.32. 0
  libavformat   52.37. 0 / 52.37. 0
  libavdevice   52. 2. 0 / 52. 2. 0
  libswscale     0. 7. 1 /  0. 7. 1
  libpostproc   51. 2. 0 / 51. 2. 0
  built on Aug 14 2009 10:14:47, gcc: 4.3.2

Seems stream 0 codec frame rate differs from container frame rate: 47.95
(48000/1001) -> 23.98 (48000/2002)
Input #0, matroska, from '/tmp/test.mkv':
  Duration: 00:01:01.43, start: 0.000000, bitrate: N/A
    Stream #0.0(eng): Video: h264, yuv420p, 1280x534, PAR 1:1 DAR 640:267, 23.98
tbr, 1k tbn, 47.95 tbc
    Stream #0.1(eng): Audio: dca, 48000 Hz, 6 channels, s16
File '/tmp/test.m4v' already exists. Overwrite ? [y/N] y
Output #0, mp4, to '/tmp/test.m4v':
    Stream #0.0(eng): Video: libx264, yuv420p, 1280x534 [PAR 1:1 DAR 640:267],
q=2-31, 1k tbn, 1k tbc
    Stream #0.1(eng): Audio: aac, 48000 Hz, 6 channels, s16, 64 kb/s
Stream mapping:
  Stream #0.0 -> #0.0
  Stream #0.1 -> #0.1
Press [q] to stop encoding
frame= 1473 fps=290 q=-1.0 Lsize=   42383kB time=61.31 bitrate=5662.9kbits/s    
video:40886kB audio:1444kB global headers:0kB muxing overhead 0.126250%

____________________________________________________
FFmpeg issue tracker <[email protected]>
<https://roundup.ffmpeg.org/roundup/ffmpeg/issue807>
____________________________________________________

Reply via email to