Play two files in a row

This forum is about all development around libVLC.
neku
New Cone
New Cone
Posts: 6
Joined: 24 Feb 2012 18:15

Play two files in a row

Postby neku » 02 Mar 2012 19:47

Hi,

I already opened a thread (viewtopic.php?f=32&t=98533), but I think my question was to specific.

I hope this time my concern is understandable:

Can you show me a working example in Python, where a file is played and when the file finished (eof) a new file is loaded and played via the "trackEnded event"-callback.

I would really appreciate if you could help me. Really :)...

with kind regards
neku

kevintcore
Blank Cone
Blank Cone
Posts: 16
Joined: 28 Jul 2011 21:28

Re: Play two files in a row

Postby kevintcore » 02 Mar 2012 22:15

If you already know the second file at the start of your process, you can use a media list player. That would probably be easier than the event handler route.

neku
New Cone
New Cone
Posts: 6
Joined: 24 Feb 2012 18:15

Re: Play two files in a row

Postby neku » 03 Mar 2012 09:53

No, the next file in the row is not know at the start, it can change dynamically.

neku
New Cone
New Cone
Posts: 6
Joined: 24 Feb 2012 18:15

Re: Play two files in a row

Postby neku » 05 Mar 2012 15:03

Nobody has an idea how to play one file after another using the python bindings?? :wink:

neku
New Cone
New Cone
Posts: 6
Joined: 24 Feb 2012 18:15

Re: Play two files in a row

Postby neku » 07 Mar 2012 20:00

Anybody? :o

neku
New Cone
New Cone
Posts: 6
Joined: 24 Feb 2012 18:15

Re: Play two files in a row

Postby neku » 09 Mar 2012 17:48

Can nobody post an example for me? I am hanging on this for weeks now... ;(

thkatsou
New Cone
New Cone
Posts: 2
Joined: 20 Mar 2012 18:00

Re: Play two files in a row

Postby thkatsou » 20 Mar 2012 18:02

I ve got the same problem

thkatsou
New Cone
New Cone
Posts: 2
Joined: 20 Mar 2012 18:00

Re: Play two files in a row

Postby thkatsou » 27 Mar 2012 20:38

I somehow managed (for some time) to play several files in a row.
Sadly I am know facing random segfaults when a video ends.
What I did was started a QTimer (have gone with pyqt) that was checking the value of variable and if it was found true
then the next video will be put to play..
The MediaPlayerEndReached event callback would set this variable to True..
I ve read and noticed that you cannot call MediaPlayer.play directly on the MediaPlayerEndReached callback so that's why I used this approach..

But have not got rid of random segfaults when a video ends..
We need an example of not an interactive implementation but something that would play a list of videos over and over...


Return to “Development around libVLC”

Who is online

Users browsing this forum: No registered users and 15 guests