Ticket #1154 (closed defect: fixed)

Opened 14 months ago

Last modified 9 months ago

Application provided invalid, non monotonically increasing dts to muxer

Reported by: greenythebeast Owned by:
Priority: normal Component: undetermined
Version: git-master Keywords: av_interleaved_write_frame flv h264
Cc: Blocked By:
Blocking: Reproduced by developer: yes
Analyzed by developer: no

Description

I am trying to remux a rtmpdump created .flv file with h264 video and speex audio into an .mp4 file. To do this I am copying the h264 video and converting the speex audio to aac using libfaac. However, when attempting this I get the following error:

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

When using an older version of ffmpeg (specifically SVN-r25783 from 2010) the h264 video is copy okay even though there are a lot of errors such as:

[mp4 @ 0x10101cc00] st:0 error, non monotone timestamps 97547 >= 97547

Even with these errors the video turns out fine. I have attached a -report from the command that produces the error.

Attachments

ffmpeg-20120331-070413.log Download (2.1 KB) - added by greenythebeast 14 months ago.
denykiss.flv Download (2.0 MB) - added by greenythebeast 14 months ago.
.flv file with h264 video and speex audio
ffmpeg-20120331-171246.log Download (2.1 KB) - added by greenythebeast 14 months ago.
-report for sample file

Change History

Changed 14 months ago by greenythebeast

comment:1 in reply to: ↑ description Changed 14 months ago by cehoyos

  • Keywords av_interleaved_write_frame flv h264 added
  • Version changed from 0.10.2 to git-master

Replying to greenythebeast:

[mp4 @ 0x10101cc00] st:0 error, non monotone timestamps 97547 >= 97547

Even with these errors the video turns out fine.

The resulting file was invalid and if any player could play it, it was pure luck.

Please provide the input sample.

Possibly a duplicate of ticket #1125.

comment:2 Changed 14 months ago by greenythebeast

Just for some background info, the older version of ffmpeg that I used was downloaded from here:  http://trick77.com/2010/11/22/how-to-convert-flv-flash-video-to-mp4-on-the-mac/

In his post, he mentions "I also had to apply a small fix in utils.c so ffmpeg doesn’t abort with “error, non monotone timestamps n >= n” while remuxing slightly out-of-sync Flash videos." Those are the errors that show up using that older build but the file still turns out fine. I imagine the timestamp errors are because when you download a live stream using rtmpdump, the resulting .flv file is unseekable. Every file I've remuxed with the older build plays fine in several media players, even with those errors.

As for the input sample, the file is of a pornographic nature. I'll try to upload a portion where nothing is going on later tonight if that's alright with everyone! ;)

Edit: I can also provide a sample of an output file from the older build (the one that works) if that helps in anyway.

Last edited 14 months ago by greenythebeast (previous) (diff)

Changed 14 months ago by greenythebeast

.flv file with h264 video and speex audio

Changed 14 months ago by greenythebeast

-report for sample file

comment:3 Changed 14 months ago by greenythebeast

I've attached a different sample file with no naughty content as well as the -report for the file indicating the same problem. If you need anything else from me, please don't hesitate to ask.

comment:4 Changed 14 months ago by greenythebeast

I thought I'd let anyone know that I applied the patch suggested in this ticket: http://ffmpeg.org/trac/ffmpeg/ticket/177

Everything works fine now. I'm sure that could theoretically bite me in the ass down the road since I'll admit I have absolutely no clue what that code does but the output file works fine with the patch applied.

comment:5 Changed 14 months ago by cehoyos

  • Status changed from new to open
  • Reproduced by developer set

comment:6 Changed 14 months ago by greenythebeast

I'm just curious, but what does this error even mean?

comment:7 Changed 11 months ago by richardpl

What patch you applied? and to what muxer?

comment:8 Changed 9 months ago by rogerdpack

that patch said it was applied, so I assume this works for you now?

comment:9 Changed 9 months ago by cehoyos

Still reproducible with current git head:

$ ffmpeg -i denykiss.flv -vcodec copy -an out.mp4
ffmpeg version N-43716-g92b8c9d Copyright (c) 2000-2012 the FFmpeg developers
  built on Aug 18 2012 18:47:44 with gcc 4.6.1 (GCC)
  configuration: --cc=/usr/local/gcc-4.6.1/bin/gcc
  libavutil      51. 70.100 / 51. 70.100
  libavcodec     54. 53.100 / 54. 53.100
  libavformat    54. 25.104 / 54. 25.104
  libavdevice    54.  2.100 / 54.  2.100
  libavfilter     3. 11.101 /  3. 11.101
  libswscale      2.  1.101 /  2.  1.101
  libswresample   0. 15.100 /  0. 15.100
Guessed Channel Layout for  Input Stream #0.1 : mono
Input #0, flv, from 'denykiss.flv':
  Duration: 00:03:23.27, start: 0.000000, bitrate: 82 kb/s
    Stream #0:0: Video: h264 (Main), yuv420p, 320x240 [SAR 1:1 DAR 4:3], 15 tbr, 1k tbn, 30 tbc
    Stream #0:1: Audio: speex, 16000 Hz, mono
Output #0, mp4, to 'out.mp4':
  Metadata:
    encoder         : Lavf54.25.104
    Stream #0:0: Video: h264 ([33][0][0][0] / 0x0021), yuv420p, 320x240 [SAR 1:1 DAR 4:3], q=2-31, 1k tbn, 1k tbc
Stream mapping:
  Stream #0:0 -> #0:0 (copy)
Press [q] to stop, [?] for help
[mp4 @ 0x1485080] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 2673 >= 2673
av_interleaved_write_frame(): Invalid argument

comment:10 Changed 9 months ago by michael

  • Status changed from open to closed
  • Resolution set to fixed

Fixed for the sample provided. I cannot say for sure if AV sync is ok or if further issues remain.
If some issues remain with this sample then please reopen this ticket.
If the same error shows up with other files then please open seperate tickets, its unlikely that it would be the same bug.

Note: See TracTickets for help on using tickets.