Opened 10 years ago
Last modified 10 years ago
#4110 new defect
Non-monotonous DTS in output stream and stream stall
Reported by: | Daniel Schultze | Owned by: | |
---|---|---|---|
Priority: | normal | Component: | undetermined |
Version: | unspecified | Keywords: | |
Cc: | Blocked By: | ||
Blocking: | Reproduced by developer: | no | |
Analyzed by developer: | no |
Description
Summary of the bug:
In 2.4.3 and master/HEAD commit 00df32f6a9c497a6ec6b71cf6c2360957a6d7e6c
When publishing a live camera stream the error message:
Non-monotonous DTS in output stream and stream stall
appears and the stream stalls, depending on how far back the time stamp is the stream could be stalled for that long.
I am using nginx-rtmp-module to serve the stream.
How to reproduce:
% /home/danomite/bin/ffmpeg -v debug -err_detect explode -i out.flv -f flv -c:v copy -an rtmp://localhost:1935/mytv/outstream
Attachments (3)
Change History (11)
by , 10 years ago
Attachment: | ffmpeg-restream.txt added |
---|
by , 10 years ago
Attachment: | ffmpeg-file-to-rtmp.txt added |
---|
comment:1 by , 10 years ago
These are the step I use to make the problem happen:
- Attempt to publish camera stream but non-monotonous warnings happen and all the players stall when that happens. (Using 2.4.3 release from my own build, the command for the build is in ffmpeg-restream.txt. The command I used is in ffmpeg-restream.txt but the log is after my rebuild)
- Rebuild ffmpeg using master/HEAD
- Attempt to publish camera stream via ffmpeg-restream.txt, but non-monotonous warnings happen and all the players stall when that happens.
- Record the camera stream and no warning came up out.flv
- Publish file to stream get some warnings and the file doesn't publish ffmpeg-file-to-rtmp.txt
comment:3 by , 10 years ago
Do I understand correctly that this issue is only reproducible with rtmp output?
comment:4 by , 10 years ago
I've been able to reproduce with rtp multicast output as well.
ffmpeg -err_detect explode -rtsp_transport tcp -i rtsp://mycamera:8554/mystream -f rtp -an -vcodec copy rtp://224.0.0.1:8002
comment:7 by , 10 years ago
Using rtpdump and multicast output, as noted above, I was able to capture the time stamps going in reverse order.
To capture the stream:
rtpdump -F ascii 224.0.0.1 8002 > rtpdump.log
To parse the reverse timestamps out of the log:
cat rtpdump.log | cut -d' ' -f13 | cut -d'=' -f2 | uniq | awk '$1 > p { printf("gt ") } p = $1' | grep -v '^gt'
From the listing of the time stamps one can use less to search for them and see the contents of the stream at that point.
comment:8 by , 10 years ago
When I re-encode the video from the camera to the same format, the error goes away.
ffmpeg -err_detect explode -rtsp_transport tcp -i rtsp://mycamera:8554/mystream -f rtp -an -vcodec libx264 rtp://224.0.0.1:8002
Log with errors