Search found 92 matches

Go to advanced search

by OlivierAubert
10 Feb 2021 11:33
Forum: Development around libVLC
Topic: Python Binding Media Discoverer
Replies: 5
Views: 838

Re: Python Binding Media Discoverer

I am actually roaming here from time to time. For this question, you have to instanciate the MediaDiscoverer through a vlc Instance, just like in the native libvlc API (which the python bindings merely wrap), something like: i = vlc.Instance() discoverer = i.media_discoverer_new("foo") lis...
by OlivierAubert
22 Sep 2017 22:52
Forum: Development around libVLC
Topic: How to use log_set with python binding?
Replies: 6
Views: 3580

Re: How to use log_set with python binding?

Very good and precise explanation of the issues. It would be very nice if we could somehow integrate some of your code into the bindings themselves so that it is more intuitive to people. The plugin code is auto-generated from the bindings, but we can override some methods to add a more pythonic beh...
by OlivierAubert
18 Nov 2016 19:10
Forum: Development around libVLC
Topic: initializing Xlib for Python bindings
Replies: 6
Views: 3199

Re: initializing Xlib for Python bindings

For your test program, I do not have the required hardware, so I cannot test it.
by OlivierAubert
18 Nov 2016 15:30
Forum: Development around libVLC
Topic: initializing Xlib for Python bindings
Replies: 6
Views: 3199

Re: initializing Xlib for Python bindings

Hello Sampsa Your description of the problem is accurate. A simpler and more portable solution (than using swig) is to simply use ctypes to call the appropriate function. So something like x11 = ctypes.DLL("libX11.so") x11.XInitThreads() before initializing the display code should be enoug...
by OlivierAubert
13 Jun 2016 15:14
Forum: Development around libVLC
Topic: Python bindings for libVLC - cannot change audio output device
Replies: 3
Views: 2751

Re: Python bindings for libVLC - cannot change audio output device

You can increase the libvlc instance verbosity to get some more details:

Code: Select all

i = vlc.Instance("--verbose 9")
by OlivierAubert
13 Jun 2016 15:12
Forum: Development around libVLC
Topic: Python vlc on Mac - Warning: option --plugin-path no longer exists
Replies: 7
Views: 2106

Re: Python vlc on Mac - Warning: option --plugin-path no longer exists

Please check again with the latest version of the vlc.py module, it fixes the --plugin-path warning.

Second, make sure that your python version is compiled for the same architecture as your VLC app. If they do not match, python is unable to access the libvlc API.
by OlivierAubert
30 Apr 2016 19:18
Forum: Development around libVLC
Topic: Python and vlclib application
Replies: 2
Views: 1633

Re: Python and vlclib application

Hi - one instance for all streams: it depends on the settings you want to set. Looking at your code, it seems to me that sout must be set at the instance level. You should dig into the libvlc doc/code (not python-specific) to be sure. - AFAIK, there is no native way of synchronizing multiple players...
by OlivierAubert
09 Apr 2016 00:23
Forum: Development around libVLC
Topic: Can't hide VLC player from callback after it reaches 'Ended' State, in python / gtk3 / windows
Replies: 3
Views: 2339

Re: Can't hide VLC player from callback after it reaches 'Ended' State, in python / gtk3 / windows

The libvlc is not reentrant, especially wrt callbacks (see https://forum.videolan.org/viewtopic.php?t=80305 for instance). You should make sure the libvlc functions are called from the same thread. This can be done through signals in gtk.
by OlivierAubert
08 Apr 2016 23:17
Forum: Development around libVLC
Topic: Help with Python Bindings
Replies: 3
Views: 1573

Re: Help with Python Bindings

In fact (on windows and linux at least, macosx is different in this respect), if no video widget is specified, a new one will be created by libvlc. So the above code should work. Note that it could be shortened to import vlc p = vlc.MediaPlayer('c:\\VLCTest\Video-1028.avi') p.play() If you do not se...
by OlivierAubert
24 Nov 2015 10:58
Forum: VLC media player for Windows Troubleshooting
Topic: Can't import VLC to Python on Windows.
Replies: 2
Views: 3805

Re: Can't import VLC to Python on Windows.

Did you install VLC (the player) alongside the python module ? The module is just a wrapper around functions found in the libvlc library, so it depends on the presence of the libvlc.dll file.
by OlivierAubert
24 Nov 2015 10:20
Forum: VLC for iOS, iPadOS and Apple TV
Topic: tvOS TVVLCKit problem with NSURL
Replies: 12
Views: 2197

Re: tvOS TVVLCKit problem with NSURL

The python SimpleHTTPServer is not up to the task of serving videos, it does not even support range requests. For this kind of task (video server launched from the command line for quick tests), I tend to use alternatives such as

Code: Select all

gatling
from fefe.de
by OlivierAubert
11 Jun 2015 23:39
Forum: Development around libVLC
Topic: [Python] Using vlc.py to play rtsp frame by frame
Replies: 1
Views: 5752

Re: [Python] Using vlc.py to play rtsp frame by frame

It looks like you should use the imem input module. You can have a look at some threads from the forum, e.g. https://forum.videolan.org/viewtopic.php?f=32&t=93842#p311611 Getting it to work with the python bindings is an interesting challenge. When you manage to get something, please contribute ...
by OlivierAubert
12 May 2015 00:03
Forum: Development around libVLC
Topic: Basic python / VLC vlc.py set up
Replies: 2
Views: 8185

Re: Basic python / VLC vlc.py set up

The macosx init code is currently very basic, see https://github.com/oaubert/python-vlc/blob/master/generated/vlc.py#L150-160 It looks for libvlc.dylib in /Applications/VLC.app/Contents/MacOS/lib. If it does not find it here, it tries a blind open of the lib, hoping that some path is correctly set u...
by OlivierAubert
11 May 2015 23:55
Forum: Development around libVLC
Topic: [Python] Using playlists
Replies: 5
Views: 983

Re: [Python] Using playlists

Regarding your question about getting the currently playing item, the libvlc API (from libvlc_media_list_player.h) does not provide such a function. Hence the python bindings cannot provide it either. If you need more control, you should manage the playlist by yourself (and this is not a limitation ...
by OlivierAubert
07 Dec 2014 22:16
Forum: Development around libVLC
Topic: libvlc_audio_set_volume_callback / Python
Replies: 1
Views: 568

Re: libvlc_audio_set_volume_callback / Python

There has been no answer on this forum, but I would guess that the doc change that was done few minutes after this post is related. For the (forum) record, the documentation for libvlc_audio_set_volume_callback states that "This only works in combination with libvlc_audio_set_callbacks().".
by OlivierAubert
18 Nov 2014 15:14
Forum: Development around libVLC
Topic: How to display text on screen?
Replies: 3
Views: 1918

Re: How to display text on screen?

Look at the __main__ part of the vlc.py module, it is an example application. You can see that it updates a marquee with the current time. As specified in the comment : # Some marquee examples. Marquee requires '--sub-source marq' in the # Instance() call above. See <http://www.videolan.org/doc/play...
by OlivierAubert
10 May 2014 00:37
Forum: Development around libVLC
Topic: vlc.py and python 64bits
Replies: 2
Views: 652

Re: vlc.py and python 64bits

It works for me, on my x86_64 Debian. All hope is not lost for windows users then, but I do not have (and do not want) access to this kind of platform to make sure it works. Contributions are welcome.
by OlivierAubert
06 Feb 2014 22:29
Forum: Development around libVLC
Topic: VLC and Python troubles! Help!
Replies: 4
Views: 3500

Re: VLC and Python troubles! Help!

See https://forum.videolan.org/viewtopic.ph ... on#p354390 : since 2012 and some pipeline changes, the marquee filter cannot be set on invidual media items, it has to be set on the whole VLC instance.
by OlivierAubert
02 Aug 2013 16:40
Forum: General VLC media player Troubleshooting
Topic: VLC stucks when i try to change media on end reached event
Replies: 3
Views: 850

Re: VLC stucks when i try to change media on end reached eve

To precise Rémi's answer, the libvlc API is not reentrant, and since the python bindings directly wrap this API, they are not reentrant either. See for instance viewtopic.php?f=32&t=82502&start=0 for a similar discussion.
by OlivierAubert
13 May 2013 10:44
Forum: Development around libVLC
Topic: Proper way of changing the media ?
Replies: 9
Views: 4044

Re: Proper way of changing the media ?

Your end_reached method is in another class than the video player, but it is not what matters here. What matters is that no libvlc method is called from the thread of execution of the libvlc callback. In more practical terms, depending on your mainloop library, in your end_reached method you should ...
by OlivierAubert
02 May 2013 16:37
Forum: Development around libVLC
Topic: Proper way of changing the media ?
Replies: 9
Views: 4044

Re: Proper way of changing the media ?

You should post the code for your end_reached method.
by OlivierAubert
11 Apr 2013 10:46
Forum: Development around libVLC
Topic: Proper way of changing the media ?
Replies: 9
Views: 4044

Re: Proper way of changing the media ?

Nice that you found a solution, and posted it. Some comments about your code: - to avoid cluttering your code (and the whole interpreter) with global variables, consider defining your own class (StreamPlayer) and add the necessary variables as instance variables for this class, e.g. class StreamPlay...
by OlivierAubert
12 Mar 2013 15:55
Forum: Development around libVLC
Topic: Python - Cannot close libvlc video output window .
Replies: 1
Views: 1953

Re: Python - Cannot close libvlc video output window .

If you need more control over the video ouput, you should embed it in a widget (that you can then control). You cannot change the behaviour of the standard video output.

Go to advanced search