[FFmpeg-user] RTSP Camera stream and 1 audio stream / Non-monotonous DTS errors

robert at infamousemail.com robert at infamousemail.com
Mon May 21 06:02:14 EEST 2018


I have a single camera video and audio stream as input 0
Stream 0:0 Video
Stream 0:1 Audio

I am bringing in ADDITIONAL audio from a separate url as input 1
Stream 1:0 Audio

These are the errors I receive in the log file with some hesitation on
youtube live

[libmp3lame @ 0x29840c0] Queue input is backward in time
[flv @ 0x29780c0] Non-monotonous DTS in output stream 0:1; previous:
24779, current: 24776; changing to 24779. This may result in incorrect
timestamps in the output file.

I am running a recent copy of ffmpeg but get the error with the Ubuntu
distributed version too.

ffmpeg version N-90813-g4ac0ff8 Copyright (c) 2000-2018 the FFmpeg
developers built with gcc 5.4.0 (Ubuntu 5.4.0-6ubuntu1~16.04.9) 20160609

ffmpeg -rtsp_transport tcp -i "rtsp://camip/url" -i "http://audioip:4444"
-vcodec libx264 -b:a 128k -b:v 3072k -pix_fmt yuv420p -preset medium -r 30
-g 60 -acodec libmp3lame -ar 44100 -threads 6 -b:a 128k -filter_complex
"amix=inputs=2:duration=first:dropout_transition=2" -strict experimental
-f flv "rtmp://a.rtmp.youtube.com/live2/xxxx-xxxx-xxxx-xxxx"

My guess is I am mixing the two audio channels wrong?  What I would really
like is...

Video from Stream 0:0, Audio from Stream 0:1 and mix in Audio from Steam 1:0

Both audio sources are mono.  Mixing them together is the way it is done
now but I would also be interested to know how to say...

Stream 0:1 Left channel Stream 1:0 Right channel.  Probably wont use it
that way but interested in knowing how to do it.

Is there a way to simply drop audio packets instead of receiving the above
errors or am I possibly receiving those errors because I am mixing instead
of merging or some other method?



More information about the ffmpeg-user mailing list