Page 1 of 1

libvlc_media_new_location not working for http url

Posted: 25 Feb 2013 21:02
by geraldfusenet
In C#, I've got something like the following:

Code: Select all

libvlc_media_new_path(_vlc, "http://cds.mytvandmovies.com/test/top_gear.mp4")
and

Code: Select all

libvlc_media_new_location(_vlc, "http://cds.mytvandmovies.com/test/top_gear.mp4")
The rest of the code is:

Code: Select all

_player = libvlc_media_player_new_from_media(_media); libvlc_media_player_set_hwnd(_player, _videoWindowHandle); libvlc_video_set_mouse_input(_player, 0); libvlc_video_set_key_input(_player, 0); if (_player == IntPtr.Zero) return; int ret = libvlc_media_player_play(_player);
However, neither of the libvlc_media_new_ functions results in the video being played. I just get a blank panel on my windows form. I have verified that the video exists and is playable (using Firefox). Also, if I do something like this (on another file):

Code: Select all

_media = libvlc_media_new_path(_vlc, "C:\\Users\\abc\\Documents\\Completed\\Betty.Boop.S01E27.DVDRip.XviD-DOCUMENT.avi");
... the video plays just fine.

I would appreciate any help I can get on this.

Thanks,
Gerald

Re: libvlc_media_new_location not working for http url

Posted: 26 Feb 2013 04:57
by Jean-Baptiste Kempf
Please look at the logs

Re: libvlc_media_new_location not working for http url

Posted: 26 Feb 2013 08:18
by sherington

Code: Select all

libvlc_media_new_location(_vlc, "http://cds.mytvandmovies.com/test/top_gear.mp4")
However, neither of the libvlc_media_new_ functions results in the video being played.
That works just fine for me, both the link and the API call.

What I can see is different between your post and what I do is that I do *not* use:

Code: Select all

_player = libvlc_media_player_new_from_media(_media);
I create the player first, then create the media, then set the media on the player, but I suppose that should not make any difference.