libvlc_media_new_location not working for http url

This forum is about all development around libVLC.
geraldfusenet
New Cone
New Cone
Posts: 1
Joined: 25 Feb 2013 20:47

libvlc_media_new_location not working for http url

Postby geraldfusenet » 25 Feb 2013 21:02

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

Jean-Baptiste Kempf
Site Administrator
Site Administrator
Posts: 37523
Joined: 22 Jul 2005 15:29
VLC version: 4.0.0-git
Operating System: Linux, Windows, Mac
Location: Cone, France
Contact:

Re: libvlc_media_new_location not working for http url

Postby Jean-Baptiste Kempf » 26 Feb 2013 04:57

Please look at the logs
Jean-Baptiste Kempf
http://www.jbkempf.com/ - http://www.jbkempf.com/blog/category/Videolan
VLC media player developer, VideoLAN President and Sites administrator
If you want an answer to your question, just be specific and precise. Don't use Private Messages.

sherington
Cone that earned his stripes
Cone that earned his stripes
Posts: 491
Joined: 10 Sep 2008 11:57
VLC version: master
Operating System: Linux

Re: libvlc_media_new_location not working for http url

Postby sherington » 26 Feb 2013 08:18

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.


Return to “Development around libVLC”

Who is online

Users browsing this forum: No registered users and 13 guests