New submission from Martin Storsjö <[email protected]>:

To reproduce, run this command line:
ffmpeg -fdebug ts -loglevel debug -dump -y -i 
rtsp://albin.abo.fi:8554/sample_100kbit.mp4?
tcp -acodec copy -vcodec copy out.mp4

This errors out with this message almost immediately:
[mp4 @ 0x10180f600] st:0 error, non monotone timestamps 67 >= 67

These two packets are the problem:

stream #0:
  keyframe=1
  duration=0.000
  dts=0.006  pts=N/A
  size=1084
stream #0:
  keyframe=0
  duration=0.000
  dts=0.006  pts=0.006
  size=156

If the audio stream is skipped (using the attached patch), the same command 
line works 
fine. In that case, these packets are the first packets in the whole stream, 
affecting the 
start time:
  Duration: 00:01:10.00, start: 0.066667, bitrate: N/A
This is subtracted from the pts/dts in ffmpeg.c, making these packets have 
pts=dts=0. This 
avoids the non monotone check in compute_pkt_fields2:

    if(st->cur_dts && st->cur_dts != AV_NOPTS_VALUE && st->cur_dts >= pkt->dts){
        av_log(s, AV_LOG_ERROR,
               "st:%d error, non monotone timestamps %"PRId64" >= %"PRId64"\n",
               st->index, st->cur_dts, pkt->dts);
        return -1;
    }

----------
files: 0001-rtsp-Don-t-receive-audio-streams-skip-them.patch
messages: 13059
priority: normal
status: new
substatus: new
title: non monotone check triggers for stream with B-frames that doesn't start 
with dts=0
type: bug

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

Attachment: 0001-rtsp-Don-t-receive-audio-streams-skip-them.patch
Description: Binary data

Reply via email to