Opened 13 years ago

Closed 12 years ago

Last modified 12 years ago

#976 closed defect (fixed)

h264 in f4v: non monotonically increasing dts

Reported by: CesareoF Owned by:
Priority: normal Component: ffmpeg
Version: git-master Keywords: av_interleaved_write_frame h264 mov
Cc: Michael Niedermayer Blocked By:
Blocking: Reproduced by developer: yes
Analyzed by developer: no

Description

I have an mp4 file that was pulled off a Flash Media Encoding Server that was post processed with f4vpp.exe and I am trying to do a straight codec copy to seperate the audio stream from the video stream and I can't seem to get it to work with newer builds of ffmpeg.

I have an older build of ffmpeg (2008-09-24) that works but I want to use a newer build because I am unhappy with the quality of video that this build produces. Was looking for any advice on what might be the best way to do this:

This command line:

d:\ffmpeg.NEW.exe -i d:\Testing\MovieConversionIssue\Issue.mp4 
-vcodec copy -an d:\Testing\MovieConversionIssue\videostream.mp4 2> d:\Testing\MovieConversionIssue\out.txt

Produces this output:

ffmpeg version N-37208-g01fcbdf Copyright (c) 2000-2012 the FFmpeg developers
  built on Jan 27 2012 18:34:52 with gcc 4.6.2
  configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-runtime-cpudetect --enable-avisynth --enable-bzlib --enable-frei0r --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libfreetype --enable-libgsm --enable-libmp3lame --enable-libopenjpeg --enable-librtmp --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvo-aacenc --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libxavs --enable-libxvid --enable-zlib
  libavutil      51. 34.101 / 51. 34.101
  libavcodec     53. 60.100 / 53. 60.100
  libavformat    53. 31.100 / 53. 31.100
  libavdevice    53.  4.100 / 53.  4.100
  libavfilter     2. 60.100 /  2. 60.100
  libswscale      2.  1.100 /  2.  1.100
  libswresample   0.  6.100 /  0.  6.100
  libpostproc    52.  0.100 / 52.  0.100
[mov,mp4,m4a,3gp,3g2,mj2 @ 0216AAC0] multiple fourcc not supported
    Last message repeated 1 times
[mov,mp4,m4a,3gp,3g2,mj2 @ 0216AAC0] multiple edit list entries, a/v desync might occur, patch welcome
    Last message repeated 2 times
[mov,mp4,m4a,3gp,3g2,mj2 @ 0216AAC0] max_analyze_duration 5000000 reached at 5024000
[mov,mp4,m4a,3gp,3g2,mj2 @ 0216AAC0] decoding for stream 2 failed
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'd:\Testing\MovieConversionIssue\CodecCopyFailing.mp4':
  Metadata:
    major_brand     : f4v 
    minor_version   : 0
    compatible_brands: isommp42m4v 
    creation_time   : 2033-01-15 10:10:40
  Duration: 00:00:47.39, start: 0.000000, bitrate: 1038 kb/s
    Stream #0:0(eng): Video: h264 (Main) (avc1 / 0x31637661), yuv420p, 320x240 [SAR 1:1 DAR 4:3], 1008 kb/s, 23.13 fps, 24 tbr, 1k tbn, 48 tbc
    Metadata:
      creation_time   : 2033-01-15 10:10:40
      handler_name    : MainConcept
    Stream #0:1(eng): Audio: nellymoser (nmos / 0x736F6D6E), 8000 Hz, mono, s16, 16 kb/s
    Metadata:
      creation_time   : 2033-01-15 10:10:40
      handler_name    : NellyMoser Handler
    Stream #0:2(eng): Data: none (amf0 / 0x30666D61)
    Metadata:
      creation_time   : 2033-01-15 10:10:40
      handler_name    : Timed Metadata Handler
strptime() unavailable on this system, cannot convert the date string.
Output #0, mp4, to 'd:\Testing\MovieConversionIssue\videostream.mp4':
  Metadata:
    major_brand     : f4v 
    minor_version   : 0
    compatible_brands: isommp42m4v 
    creation_time   : 2033-01-15 10:10:40
    encoder         : Lavf53.31.100
    Stream #0:0(eng): Video: h264 (![0][0][0] / 0x0021), yuv420p, 320x240 [SAR 1:1 DAR 4:3], q=2-31, 1008 kb/s, 23.13 fps, 1k tbn, 1k tbc
    Metadata:
      creation_time   : 2033-01-15 10:10:40
      handler_name    : MainConcept
Stream mapping:
  Stream #0:0 -> #0:0 (copy)
Press [q] to stop, [?] for help
frame=   16 fps=  0 q=-1.0 Lsize=      34kB time=00:00:00.00 bitrate=274504.0kbits/s    

video:33kB audio:0kB global headers:0kB muxing overhead 2.659765%

And a videostream.mp4 that is only 34kb and is not a playable video stream.

Change History (9)

comment:1 by Carl Eugen Hoyos, 13 years ago

Component: FFmpegundetermined

Please provide the sample and / or the revision that introduced the regression.

comment:2 by CesareoF, 13 years ago

I have the *.mp4 clip that causes the issue indicated in this ticket, but that movie file is 6mb and the Maximum Upload is 2.5MB(Way Too small, but probably regulated by PHP), is there another way I can pass a sample mp4 your way for testing.

I don't know when this issue exactly began because I don't religously keep my ffmpeg version updated, I can give you an ffmpeg version in which this file is properly transcoded (the resulting mp4 looks terrible).

This command line:

d:\ffmpeg.WORKS.exe -i d:\Testing\MovieConversionIssue\Issue.mp4 -vcodec copy -an d:\Testing\MovieConversionIssue\videostream.mp4 2> out.txt

Produces this output:

FFmpeg version SVN-r15394, Copyright (c) 2000-2008 Fabrice Bellard, et al.
  configuration: --enable-memalign-hack --enable-postproc --enable-swscale --enable-gpl --enable-libfaac --enable-libfaad --enable-libgsm --enable-libmp3lame --enable-libvorbis --enable-libtheora --enable-libx264 --enable-libxvid --disable-ffserver --disable-vhook --enable-avisynth --enable-pthreads
  libavutil     49.10. 0 / 49.10. 0
  libavcodec    52. 0. 0 / 52. 0. 0
  libavformat   52.22. 1 / 52.22. 1
  libavdevice   52. 1. 0 / 52. 1. 0
  libswscale     0. 6. 1 /  0. 6. 1
  libpostproc   51. 2. 0 / 51. 2. 0
  built on Sep 24 2008 15:49:57, gcc: 4.2.4 (TDM-1 for MinGW)
[mov,mp4,m4a,3gp,3g2,mj2 @ 003EAF20]edit list not starting at 0, a/v desync might occur, patch welcome
[mov,mp4,m4a,3gp,3g2,mj2 @ 003EAF20]edit list not starting at 0, a/v desync might occur, patch welcome
[mov,mp4,m4a,3gp,3g2,mj2 @ 003EAF20]edit list not starting at 0, a/v desync might occur, patch welcome
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'd:\Testing\MovieConversionIssue\CodecCopyFailing.mp4':
  Duration: 00:00:47.39, start: 0.000000, bitrate: 1038 kb/s
    Stream #0.0(eng): Video: h264, yuv420p, 320x240, 1000.00 tb(r)
    Stream #0.1(eng): Audio: nmos / 0x736F6D6E, 8000 Hz, mono, s16
    Stream #0.2(eng): Data: amf0 / 0x30666D61
Output #0, mp4, to 'd:\Testing\MovieConversionIssue\VideoStream.mp4':
    Stream #0.0(eng): Video: libx264, yuv420p, 320x240, q=2-31, 1000.00 tb(c)
Stream mapping:
  Stream #0.0 -> #0.0
Press [q] to stop encoding
frame=  868 fps=  0 q=-1.0 Lsize=    4566kB time=47.34 bitrate= 790.1kbits/s    

video:4545kB audio:0kB global headers:0kB muxing overhead 0.452189%

in reply to:  2 comment:3 by Carl Eugen Hoyos, 13 years ago

Replying to cesareof:

I have the *.mp4 clip that causes the issue indicated in this ticket, but that movie file is 6mb

Consider reading http://ffmpeg.org/bugreports.html (you may ignore the limit there for A/V sync issues) or upload to http://www.datafilehost.com/

comment:4 by CesareoF, 13 years ago

I uploaded the file to upload.ffmpeg.org\upload and I uploaded the same movie to datafilehost: http://www.datafilehost.com/download-12423221.html

comment:5 by Carl Eugen Hoyos, 13 years ago

Keywords: av_interleaved_write_frame h264 mp4 added
Reproduced by developer: set
Status: newopen
Summary: Issue Converting f4v Video from FMESh264 in f4v: non monotonically increasing dts
Version: unspecifiedgit-master

The svn version you tested allowed you to write invalid files (with non monotonically increasing dts), so I don't think this counts as a regression.

$ ffmpeg -i CodecCopyFailing.mp4 -vcodec copy -an out.mp4
ffmpeg version N-37587-g787528b Copyright (c) 2000-2012 the FFmpeg developers
  built on Feb  7 2012 00:36:14 with gcc 4.5.3
  configuration: --cc='/usr/local/gcc-4.5.3/bin/gcc -m32'
  libavutil      51. 38.100 / 51. 38.100
  libavcodec     54.  1.100 / 54.  1.100
  libavformat    54.  0.100 / 54.  0.100
  libavdevice    53.  4.100 / 53.  4.100
  libavfilter     2. 62.100 /  2. 62.100
  libswscale      2.  1.100 /  2.  1.100
  libswresample   0.  6.100 /  0.  6.100
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x8dd6aa0] Concatenated H.264 might not play corrently.
    Last message repeated 1 times
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x8dd6aa0] multiple edit list entries, a/v desync might occur, patch welcome
    Last message repeated 2 times
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'CodecCopyFailing.mp4':
  Metadata:
    major_brand     : f4v
    minor_version   : 0
    compatible_brands: isommp42m4v
    creation_time   : 2033-01-15 10:10:40
  Duration: 00:00:47.39, start: 0.000000, bitrate: 1038 kb/s
    Stream #0:0(eng): Video: h264 (Main) (avc1 / 0x31637661), yuv420p, 320x240 [SAR 1:1 DAR 4:3], 1008 kb/s, 23.13 fps, 24 tbr, 1k tbn, 48 tbc
    Metadata:
      creation_time   : 2033-01-15 10:10:40
      handler_name    : MainConcept
    Stream #0:1(eng): Audio: nellymoser (nmos / 0x736F6D6E), 8000 Hz, mono, s16, 16 kb/s
    Metadata:
      creation_time   : 2033-01-15 10:10:40
      handler_name    : NellyMoser Handler
    Stream #0:2(eng): Data: none (amf0 / 0x30666D61)
    Metadata:
      creation_time   : 2033-01-15 10:10:40
      handler_name    : Timed Metadata Handler
Output #0, mp4, to 'out.mp4':
  Metadata:
    major_brand     : f4v
    minor_version   : 0
    compatible_brands: isommp42m4v
    creation_time   : 2033-01-15 10:10:40
    encoder         : Lavf54.0.100
    Stream #0:0(eng): Video: h264 (![0][0][0] / 0x0021), yuv420p, 320x240 [SAR 1:1 DAR 4:3], q=2-31, 1008 kb/s, 23.13 fps, 1k tbn, 1k tbc
    Metadata:
      creation_time   : 2033-01-15 10:10:40
      handler_name    : MainConcept
Stream mapping:
  Stream #0:0 -> #0:0 (copy)
Press [q] to stop, [?] for help
[mp4 @ 0x8df92e0] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 559 >= 559
av_interleaved_write_frame(): Invalid argument

comment:6 by Michael Niedermayer, 12 years ago

Cc: Michael Niedermayer added

I have difficulty finding the file (datafilehost expired it and i cnat seem to find it on the ftp)

comment:7 by Carl Eugen Hoyos, 12 years ago

Sample uploaded to samples/ffmpeg-bugs/trac/ticket976/

comment:8 by Michael Niedermayer, 12 years ago

Component: undeterminedFFmpeg
Resolution: fixed
Status: openclosed

comment:9 by Carl Eugen Hoyos, 12 years ago

Keywords: mov added; mp4 removed
Note: See TracTickets for help on using tickets.