Ask Your Question
0

how to play live network stream

asked 2013-01-24 04:58:46 -0600

shlem gravatar image

updated 2013-01-24 05:41:12 -0600

Hi. How to play a live network stream by opencv in Windows7?
I spent a lot of time, read forums and documentation, tried everything (udp, multicast udp, rtp, even named pipe), but nothing works.

VideoCapture cap; cap.open("udp://:1234); //does not work
cap.open("udp://234.1.2.3:1234); //does not work
cap.open("rtp://:1234); //does not work
cap.open("rtp://@:1234); //does not work
cap.open("rtp://234.1.2.3:1234); //does not work
cap.open("rtp://@234.1.2.3:1234); //does not work
cap.open("\.\pipe\MyPipe); //does not work

Thanks

edit retag flag offensive close merge delete

Comments

^^ please don't make an answer, if youdon't have one..

berak gravatar imageberak ( 2016-06-23 20:06:00 -0600 )edit

3 answers

Sort by ยป oldest newest most voted
2

answered 2013-01-24 05:59:04 -0600

Daniil Osokin gravatar image

Hi! @sammy have done this some times ago. This should work:

cap.open("rtp://xxx.xxx.xxx.xxx:1234");
Check details here.

edit flag offensive delete link more

Comments

This SHOULD, but DOES NOT

shlem gravatar imageshlem ( 2013-01-24 06:13:23 -0600 )edit
2

It does not work if your stream is password-protected. The simplest way to test for other errors (misconfiguration, firewall issues) is to try to connect with VLC. IF it works without errors, and without asking for parrsword, it's a good chance it will work for you. The other option is to use ffmpeg directly.

sammy gravatar imagesammy ( 2013-01-25 07:38:39 -0600 )edit
1

answered 2013-02-08 07:55:25 -0600

pprahul gravatar image

I tried with OpenCV 2.4 with the following code.

cap.open("rtp://xxx.xxx.xxx.xxx:1234/");

and it worked. I think you missed a "/" at the end.

edit flag offensive delete link more
0

answered 2013-02-08 08:11:52 -0600

Network streaming support depends from video decoding back-end that you use. If you use GStreamer or FFMPEG network streaming modules/plug-ins must be installed. If you use FFMPEG plug-in, try to open stream use ffmpeg console tool.

edit flag offensive delete link more

Comments

@pprahul can you give me a small piece of complete code. I am new to openCV and is planning to give some vision to my robot

subhendusc gravatar imagesubhendusc ( 2013-08-06 06:00:50 -0600 )edit

Question Tools

Stats

Asked: 2013-01-24 04:58:46 -0600

Seen: 12,630 times

Last updated: Jun 23 '16