I want to use vlc.py to play mpeg2 stream http://wiki.videolan.org/Python_bindings.
There are some examples here: http://git.videolan.org/?p=vlc/bindings/python.git;a=tree;f=examples;hb=HEAD
When I run the examples, it just can play video file, I want to know is there any examples to play video stream ?
The VLC streaming player from the VideoLAN Organization is an open-source audio and video player. The player will play video or audio files stored locally on your hard drive, and will also play streaming audio and video from a local network or the internet.
VLC includes a fairly easy-to-use streaming feature that can stream music and videos over a local network or the Internet. You can tune into the stream using VLC or other media players. Use VLC's web interface as a remote control to control the stream from elsewhere.
The VLC media player is a free and open-source portable cross-platform media player software and streaming media server developed by the VideoLAN project. VLC is available for desktop operating systems and mobile platforms, such as Android, iOS, iPadOS, Tizen, Windows 10 Mobile, and Windows Phone.
According to this Pastebin entry, linked to in this mailing list, it can be solved using a method like this:
import vlc
i = vlc.Instance('--verbose 2'.split())
p = i.media_player_new()
p.set_mrl('rtp://@224.1.1.1')
p.play()
I haven't tried it though, so please let me know if it works.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With