我对 ffmpeg 的代码有疑问:ffmpeg -rtsp_transport tcp -i "rtsp://admin:passw@xxxxxxxx.ddns.net:554/live/ch0" -deinterlace -vcodec libx264 -pix_fmt yuv420p -preset medium -s 1920x1080 -b:v 5000k -acodec aac -strict -2 -ar 44100 -threads 6 -qscale 3 -b:a 712000 -bufsize 128k -f flv "rtmp://a.rtmp.youtube.com/live2/key"
它用于网络摄像机的实时流媒体,但我有这个问题
[flv @ 0x558333a41100] Non-monotonous DTS in output stream 0:1; previous: 73709, current: 73220; changing to 73709. This may result in incorrect timestamps in the output file.
[aac @ 0x558333a0f100] Queue input is backward in time14.43 bitrate=1288.8kbits/s dup=0 drop=5 speed=0.486x
[flv @ 0x558333a41100] Non-monotonous DTS in output stream 0:1; previous: 74591, current: 73614; changing to 74591. This may result in incorrect timestamps in the output file.
谁能帮我?
最佳答案
特别是在实时流源中,有时会在时间戳上发生一些“跳跃”。为什么会发生这种情况......嗯,有很多原因。包括丢包。
当这种情况发生时,这将导致输出瞬间失真。
这里 FFmpeg 告诉你发生了跳转。我认为这不是你的错误。只是一个警告。
正如警告所说,FFmpeg 已经处理了它(作为更正时间戳)。
关于linux - ffmpeg livestream by ip camera 有 DTS 问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/65634283/