Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

libvlc - simple C++ streaming

This should be the classic simple error which I can't really find..

I am using libvlc from a VS2010 C++ project. I followed these steps to record from a webcam and streaming it through RTSP:

1)

inst = libvlc_new (1, myargs);

where myargs just contain the plugin path

2)

libvlc_vlm_add_broadcast(inst, "mybroadcast", "dshow://", "#transcode{vcodec=h264,vb=0,scale=0,acodec=mp4a,ab=128,channels=2,samplerate=44100}:rtp{sdp=rtsp://:5544/}", 0, NULL, TRUE, 0);

3) libvlc_vlm_play_media(inst, "mybroadcast");

4) Sleep for a while, since libvlc uses threads I can be sure this will not interfere.

The error log says:

live555 debug: connection timeout live555 error: Failed to connect with rtsp://192.168.1.100:5544

Where am I getting wrong?

Please don't point me out with the oxygen documentation, I already read it thousands of times and it really doesn't contain the answer. There was a link about streaming options but it is now broken on the vlc developer wiki

I am asking for help, please

like image 497
Paul Andrews Avatar asked Feb 04 '11 17:02

Paul Andrews


1 Answers

I found the solution: the URL was malformed.. a "/" at the end of the URL was needed

like image 149
Paul Andrews Avatar answered Sep 28 '22 09:09

Paul Andrews