How does vlc.py play video stream?

后端 未结 3 630
不思量自难忘°
不思量自难忘° 2020-12-14 20:29

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;

3条回答
  •  南方客
    南方客 (楼主)
    2020-12-14 20:50

    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.

提交回复
热议问题