Page 1 of 1

Playing RTSP stream fails in LIBVLC 2.2.0

Posted: 14 Jul 2013 12:57
by avi_tal
Dear friends,
Does anyone knows why I am unable to play RTSP streams in LIBVLC when DLLS are taken from version 2.2.0?
I have done this before many times with LIBVLC 2.0.5.
Was there any change to this command?
For example, I am trying to play the following link: rtsp://media-us-2.soundreach.net/slcn_sports.sdp. It plays well in VLC Media Player 2.2.0 but not with LIBVLC using the same DLLs.
I really like Version 2.2.0 since it supports PNG image format with transparency.
Your help is greatly appreciated.
Thanks,
Avi Tal.

Re: Playing RTSP stream fails in LIBVLC 2.2.0

Posted: 17 Jul 2013 19:06
by Jean-Baptiste Kempf
Look at the logs.

Re: Playing RTSP stream fails in LIBVLC 2.2.0

Posted: 17 Jul 2013 23:32
by avi_tal
Dear Jean-Baptiste Kempf,

Thanks allot for your reply.
Following your suggestion, I looked at the error messages using the --verbose switch, and saw that LIBVLC 2.2.0 thinks that the URL given by the command libvlc_media_new_path(libvlc, URL) is a file which is located at the current executing directory, so the error is like: "can't open file: C:\rtsp://media-us-2.soundreach.net/slcn_sports.sdp" .
LIBVLC 2.0.5 understands that this URL is actually a stream, and opens it correctly with no errors.

Any idea on what could be the reason for that? Was there any command change that relate to libvlc_media_new_path()?

I also tried to set the log file location via the --logfile switch but this didn't work.

Thanks,
Avi Tal.

Re: Playing RTSP stream fails in LIBVLC 2.2.0

Posted: 18 Jul 2013 00:34
by Jean-Baptiste Kempf
The URL is not correct, sorry

Re: Playing RTSP stream fails in LIBVLC 2.2.0

Posted: 18 Jul 2013 07:26
by avi_tal
Dear Jean-Baptiste Kempf,

Maybe I was misunderstood:

The URL given to libvlc_media_new_path() is "rtsp://media-us-2.soundreach.net/slcn_sports.sdp"
VLCLIB 2.2.0 appends the "C:\" to the URL only when showing the error.

Any idea?

Thanks,
Avi.

Re: Playing RTSP stream fails in LIBVLC 2.2.0

Posted: 18 Jul 2013 13:05
by sherington
I think you're supposed to use libvlc_media_new_location() for URL's.

Re: Playing RTSP stream fails in LIBVLC 2.2.0

Posted: 18 Jul 2013 15:39
by avi_tal
Dear Sherington,

Thanks allot for your reply.

You are right. URLs need libvlc_media_new_location().
The thing is that VLCLIB 2.0.5 is able to open URLs using libvlc_media_new_path() by examining the URL string, while VLCLIB 2.2.0 does not.
Do you happen to know how to understand what is the URL type (file or stream) using VLC functions?

Thanks,

Avi Tal.

Re: Playing RTSP stream fails in LIBVLC 2.2.0

Posted: 18 Jul 2013 17:12
by sherington
Do you happen to know how to understand what is the URL type (file or stream) using VLC functions?
In my own libvlc bindings, I simply check if my input string "looks like" a URL or not (don't need a VLC function for that), and then call the appropriate VLC function to play it.

Re: Playing RTSP stream fails in LIBVLC 2.2.0

Posted: 18 Jul 2013 17:23
by avi_tal
Thanks.
I am now doing that too.