PDA

View Full Version : IP Camera ffmpeg



antweb
2nd April 2015, 10:42
I've researched a lot on the internet on this subject but am unable to find a solution.
My camera information:

Image Url : "http://192.168.0.12:8080/snapshot.cgi?user=admin&pwd="

Using this Url, I made use of the QNetworkAccessManager and I am able to get continous images on my QLabel.
But this way is ineffective if I have to do continuous monitoring of say 4 cameras. I cannot have every second update of each camera and display it on seperate QLabels.

So now I want to get the videostream on my QLabel or QWebView or whatever way is possible.
Some research on the internet told me that this is possible through ffmpeg.
So now I've got ffmpeg up and running. I have made basic programs like format conversion.
Also tried html video on my QWebView. Everything is working fine.
Everything except a way to get my IP Camera stream.

Video Url : "http://admin@192.168.0.12:8080/videostream.cgi?user=admin&pwd="

Please help me find a way.
Thanks.

yeye_olive
2nd April 2015, 11:31
The first thing you need to figure out is the format of this 'stream'. IIRC QtMultimedia has support for streamed media. See if you can load the stream in a QMediaContent and play it in a QMediaPlayer.

antweb
2nd April 2015, 12:01
It's a mjpeg stream!

antweb
4th April 2015, 05:39
I have a rtsp camera as well. If someone can guide me it would be a great help!

antweb
4th April 2015, 12:18
I have a rtsp camera. I am able to view it using ffplay through the Linux terminal.
Any way I can view it on a Qt widget?