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://192.168.0.2/onvif2 -codec copy -f matroska - | vlc - --intf=dummy --sout '#rtp{sdp=rtsp://192.168.2.1:5050/test.sdp}'
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
A.C.
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.