Streaming a playlist using libvlc with Python

This forum is about all development around libVLC.
jplebel
New Cone
New Cone
Posts: 1
Joined: 15 Aug 2018 17:23

Streaming a playlist using libvlc with Python

Postby jplebel » 15 Aug 2018 17:26

I want to stream a complete playlist (m3u) using libvlc with Python.

I was able to stream a single video using the following code:

Code: Select all

inst = vlc.Instance() param=[ "test.mp4" ,"sout=#rtp{dst=224.1.1.10,port=10100,mux=ts}" ] Media = inst.media_new(*param) player = Media.player_new_from_media() player.play()
The problem is, it seems there is no way to pass options to a playlist. I tried to pass them when creating the vlc instance but that doesn't work.

Code: Select all

inst = vlc.Instance('--sout=#gather:rtp{dst=224.1.1.10,port=10100,mux=ts}') Media_list = inst.media_list_new(['test.m3u']) list_player = inst.media_list_player_new() list_player.set_media_list(Media_list) list_player.play()
The same code works correctly when playing locally.
Thanks,

mfkl
Developer
Developer
Posts: 740
Joined: 13 Jun 2017 10:41

Re: Streaming a playlist using libvlc with Python

Postby mfkl » 02 Oct 2018 07:17

I want to stream a complete playlist (m3u) using libvlc
libvlc wise, I think it's possible.

Regarding the python bindings, I'm not familiar with them and unless someone in the forum is, maybe you have a better chance opening an issue on the repo (https://github.com/oaubert/python-vlc this one I assume?)
https://mfkl.github.io


Return to “Development around libVLC”

Who is online

Users browsing this forum: No registered users and 11 guests