Page 1 of 1

LibVLC Questions

Posted: 07 Jan 2009 14:51
by Beardless2
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

Re: LibVLC Questions

Posted: 08 Jan 2009 01:59
by erwan10
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

Re: LibVLC Questions

Posted: 08 Jan 2009 14:52
by Beardless2
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;

Re: LibVLC Questions

Posted: 08 Jan 2009 15:24
by erwan10
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://

Re: LibVLC Questions

Posted: 08 Jan 2009 15:55
by Beardless2
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

Re: LibVLC Questions

Posted: 08 Jan 2009 20:25
by Beardless2
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)"

Re: LibVLC Questions

Posted: 08 Jan 2009 22:43
by erwan10
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 !.

Re: LibVLC Questions

Posted: 09 Jan 2009 14:44
by Beardless2
yep agree! libvlc is seems very promising. Do you know who were the original developers?

Re: LibVLC Questions

Posted: 10 Jan 2009 03:30
by Jean-Baptiste Kempf
yep agree! libvlc is seems very promising. Do you know who were the original developers?
VLC developers?

Re: LibVLC Questions

Posted: 24 Dec 2009 11:18
by rarao
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 !.