FFMPEG displaying top of the image

2019-08-19 18:51发布

I am using ffmpeg to get my camera video (using RTSP) and send it to youtube. There are plenty of command lines you can use and this is the one worked for me:

ffmpeg -i rtsp://200.193.21.176:6003/onvif1 -vcodec copy -acodec copy -strict experimental -f flv rtmp://x.rtmp.youtube.com/live2/fh1t-e7p4-fsa1-c8mw

The problem is that it is only displaying correctly the top part of the video, the rest looks like scrumbled. See:

enter image description here

Maybe I should use some additional parameter to make it render all the video instead of only the top and poorly the rest?

EDIT: there is no prolbem with the video capture cause when I use VLC to see the video from the RTSP it is working perfectly. Here is the image using VLC:

enter image description here

标签: video ffmpeg
2条回答
Root(大扎)
2楼-- · 2019-08-19 19:19

It's very likely encoder rtsp stream is not getting feeds at required rate. Check the network. I had the same issue changed camera settings to stream at 1280X720 VBR. then its perfect. Edit: 1. ALso check the encoders uplink speed. The VLC stream appears its running 1080 Full HD or something which needs lot of upstream data to youtube.

BTW keep your stream key private.... Else you will end up in Jail is someone streams something undesirable to your site.

查看更多
Ridiculous、
3楼-- · 2019-08-19 19:26

Try to add rtsp_transport option:

ffmpeg -rtsp_transport tcp -i rtsp://200.193.21.176:6003/onvif1 ...

Or just play:

ffplay rtsp://200.193.21.176:6003/onvif1
查看更多
登录 后发表回答