Re-streaming an ONVIF IP camera stream with ffmpeg and VLC

I had to test work done on an ONVIF IP camera and so I needed a way to see whatever the camera was streaming.

The first catch was that I couldn’t use any software that worked with the camera mainly because there were very few that worked or seemed to work.

The second catch was that I couldn’t be bothered to prepare an appropriate software infrastructure for just a test.

Third catch, the network was a bit complex so I couldn’t just use directly VLC.

I wanted a one line solution. I knew that ffmpeg could save the IP camera stream to a file and I knew that VLC could stream a file wherever I wanted.

One line solution that mostly worked for me:

ffmpeg -hide_banner -loglevel panic -i rtsp:// -codec copy -f matroska - | vlc - --intf=dummy --sout '#rtp{sdp=rtsp://}'

Your mileage may vary, but I think it is a good starting point. It worked on a CentOS 7, ffmpeg 3.4.7, VLC 3.0.8


This entry was posted in Software. Bookmark the permalink.

One Response to Re-streaming an ONVIF IP camera stream with ffmpeg and VLC

  1. Excellent post. I used to be checking continuously this blog and I’m impressed!
    Very helpful information specifically the closing section 🙂 I maintain such info a lot.
    I used to be looking for this certain info for a very long time.
    Thank you and good luck.

Leave a Reply

Your email address will not be published. Required fields are marked *