使用 ffmpeg 将 rtsp 转换为 rtmp 的正确方法

问题描述 投票:0回答:0

我有一个代码可以将 NVR 摄像机流式传输到 youtube。这段代码不是我做的,我不完全理解每个选项的作用

ffmpeg -rtsp_transport tcp -i "rtsp://stream:[email protected]:554/cam/realmonitor?channel=2&subtype=0" -tune zerolatency -t 12:00:00 -pix_fmt + -r 30 -c:v copy -c:a aac -filter:a "volume=1.2" -strict experimental -f flv rtmp://a.rtmp.youtube.com/live2/xxxx-xxxx-xxxx-xxxx-xxxx

在某些流中,声音会中断并且不稳定。我怎样才能解决这个问题? 我也定期在输出中得到这样的行:

[aac @ 0xf1b9e880] Queue input is backward in time
[flv @ 0xf1db7800] Non-monotonous DTS in output stream 0:0; previous: 549844, current: 549779; changing to 549844. This may result in incorrect timestamps in the output file.
[flv @ 0xf1db7800] Non-monotonous DTS in output stream 0:0; previous: 549844, current: 549839; changing to 549844. This may result in incorrect timestamps in the output file.
[flv @ 0xf1db7800] Non-monotonous DTS in output stream 0:1; previous: 549754, current: 549671; changing to 549754. This may result in incorrect timestamps in the output file.
[flv @ 0xf1db7800] Non-monotonous DTS in output stream 0:0; previous: 609841, current: 609721; changing to 609841. This may result in incorrect timestamps in the output file.
audio ffmpeg rtsp rtmp
© www.soinside.com 2019 - 2024. All rights reserved.