LibVLC Questions

This forum is about all development around libVLC.
Beardless2
Cone that earned his stripes
Cone that earned his stripes
Posts: 125
Joined: 02 Feb 2007 09:53

LibVLC Questions

Postby Beardless2 » 07 Jan 2009 14:51

Hi,

Please could someone help me with a couple of libvlc api issues i have with v0.9.8a?

1) I have 1 instance of vlc (libvlc_new) and multiple media players all playing different udp streams. The video title that pops up and then disappears is the same for all videos - other than creating multiples vlc instances (i.e. one libvlc_new per media player), can the titles be different? (Edit : No - Trac Ticket #2325)

2) Is it possible to get infomation (i.e. text about the what went wrong) from the libvlcMediaPlayerEncounteredError event?

3) I cannot seem to play a video from my dvb-t capture card using just mediaplayer and media item objects, instead i have to add the media item to a media list first, then assign the media item to the media player. I there a way round this problem? (Edit : My Bug - Sorry)
4) Is there a way to trap mouse events?

5) I have a dual screen set up, when i drag a playing video from one screen to the other it freezes/glitches, is there a way to stop it or set it going again

Thanks,

Chris
Last edited by Beardless2 on 09 Jan 2009 09:51, edited 2 times in total.

erwan10
Developer
Developer
Posts: 415
Joined: 02 Nov 2008 23:16

Re: LibVLC Questions

Postby erwan10 » 08 Jan 2009 01:59

1) I have 1 instance of vlc (libvlc_new) and multiple media players all playing different udp streams. The video title that pops up and then disappears is the same for all videos - other than creating multiples vlc instances (i.e. one libvlc_new per media player), can the titles be different?
you can either deactivate it (option is --no-video-title-show) or maybe setting --meta-title="..." should allow changing the name.
2) Is it possible to get infomation (i.e. text about the what went wrong) from the libvlcMediaPlayerEncounteredError event?
When such an error occurs, the log is the place to get information (controlled with --verbose=n). This log can be accessed programatically if needed.
3) I cannot seem to play a video from my dvb-t capture card using just mediaplayer and media item objects, instead i have to add the media item to a media list first, then assign the media item to the media player. I there a way round this problem?
Bizarre .... . I use DVB-T with libvlc on Linux (1 media_item per channel/1 media_player). Works perfectly.
4) Is there a way to trap mouse events?
In vlc1.0.0(git), a new --vout-event option has been added (works on Linux) for developers to be able to regain control of their video widget (hotkeys or mouse events)
5) I have a dual screen set up, when i drag a playing video from one screen to the other it freezes/glitches, is there a way to stop it or set it going again
Don't know, but dual screen issues are much talked about on the forum.

Erwan10

Beardless2
Cone that earned his stripes
Cone that earned his stripes
Posts: 125
Joined: 02 Feb 2007 09:53

Re: LibVLC Questions

Postby Beardless2 » 08 Jan 2009 14:52

Thanks for the reply

"--meta-title" does appear to work for me, the video popup title is still the same for all videos (it happens to be the MRL of the last created media item).


DVB-T problem is strange - definately doesn't work just from a media item to media player for me - do you have any source code i could look at? The following is Delphi code but it should be very similar in C#

i do the following, looking at the media player events, it opens, buffers and then fires the libvlcMediaPlayerEncounteredError event



media := libvlc_media_new(VLC,PChar('dvb-t://'),VLC_Exception.Instance);
CheckException;

Options[0] := ':dvb-frequency=578000';
Options[1] := ':dvb-bandwidth=8';
Options[2] := ':program=22080'; // BBC ONE = (506000,4164) BBC News = (506000,4415), SKY NEWS = (578000,22080)

For i := 0 to 2 do
Begin
libvlc_media_add_option(media ,PChar(Options),VLC_Exception.Instance);
CheckException;
End;

media_player:= libvlc_media_player_new(VLC,VLC_Exception.Instance);
CheckException;

libvlc_media_player_set_media(player,media ,VLC_Exception.Instance);
CheckException;

libvlc_media_player_play(media_player, VLC_Exception.Instance);
CheckException;

erwan10
Developer
Developer
Posts: 415
Joined: 02 Nov 2008 23:16

Re: LibVLC Questions

Postby erwan10 » 08 Jan 2009 15:24

In your code, dvb-frequency seems wrong to me (you need to add three more 0).

Here are the options I use for DVB-T in France :

#EXTINF:0,TF1
#EXTVLCOPT:meta-title=TF1
#EXTVLCOPT:meta-description=TF1 (freq=562 MHz, prg=1537)
#EXTVLCOPT:dvb-frequency=562000000
#EXTVLCOPT:dvb-adapter=0
#EXTVLCOPT:dvb-bandwidth=8
#EXTVLCOPT:program=1537
#EXTVLCOPT:access-filter=record
#EXTVLCOPT:record-path=/mnt/win_i/MyPVRtntLinux
dvb://

Beardless2
Cone that earned his stripes
Cone that earned his stripes
Posts: 125
Joined: 02 Feb 2007 09:53

Re: LibVLC Questions

Postby Beardless2 » 08 Jan 2009 15:55

erwan10 - my apoligies - it is actually just 562000 but i had a bug in my code which meant none of the options had been passed to the media item (however it didn't exist in the media_list code so that worked ok). Thank you for your help

Beardless2
Cone that earned his stripes
Cone that earned his stripes
Posts: 125
Joined: 02 Feb 2007 09:53

Re: LibVLC Questions

Postby Beardless2 » 08 Jan 2009 20:25

turns out my problem to question 1 is due to options being overwritten in libvlc...........Ticket #2325 raised by yourself!

"Libvlc API allows multiple instances of libvlc (through several calls to libvlc_new(argc, argv, &ex) ). Yet, those instances are not fully independent. They share the same config subsystem. This results in a new instance overwriting options set up by a previous instance.

In addition to making multiple instances rather useless, this can be a tricky issue for developers.

Solution: either deactivate multiple instances (a call to more than one instance should raise an error) or really make instances fully independent (option-wise)"

erwan10
Developer
Developer
Posts: 415
Joined: 02 Nov 2008 23:16

Re: LibVLC Questions

Postby erwan10 » 08 Jan 2009 22:43

Yes, multiple libvlc instances are a big issue with their options being overwritten.

Yet, they are not as useless as I wrote since they can solve other problems. Multiple media_players within a single libvlc instance is a real mess for hotkeys and audio. At least multiple instances solve some (not all) of these problems.

Actually, the biggest problem may be that libvlc original developers seem very very quiet lately. This is a pity because libvlc is really well designed and just need some more work.

If this post can wake them up, let it be !.

Beardless2
Cone that earned his stripes
Cone that earned his stripes
Posts: 125
Joined: 02 Feb 2007 09:53

Re: LibVLC Questions

Postby Beardless2 » 09 Jan 2009 14:44

yep agree! libvlc is seems very promising. Do you know who were the original developers?

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 Questions

Postby Jean-Baptiste Kempf » 10 Jan 2009 03:30

yep agree! libvlc is seems very promising. Do you know who were the original developers?
VLC developers?
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.

rarao
Blank Cone
Blank Cone
Posts: 11
Joined: 18 Apr 2009 09:18

Re: LibVLC Questions

Postby rarao » 24 Dec 2009 11:18

Has any body solved the Audio issues in multiple instances? i am using multiple media players in single VLC instance.

Yes, multiple libvlc instances are a big issue with their options being overwritten.

Yet, they are not as useless as I wrote since they can solve other problems. Multiple media_players within a single libvlc instance is a real mess for hotkeys and audio. At least multiple instances solve some (not all) of these problems.

Actually, the biggest problem may be that libvlc original developers seem very very quiet lately. This is a pity because libvlc is really well designed and just need some more work.

If this post can wake them up, let it be !.


Return to “Development around libVLC”

Who is online

Users browsing this forum: No registered users and 31 guests