vlc.py 如何播放视频流? [英] How does vlc.py play video stream?

查看:34
本文介绍了vlc.py 如何播放视频流?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想用 vlc.py 播放 mpeg2 流 http://wiki.videolan.org/Python_bindings.

I want to use vlc.py to play mpeg2 stream http://wiki.videolan.org/Python_bindings.

这里有一些例子: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 ?

推荐答案

根据 this Pastebin 条目,链接到在这个邮件列表中,可以使用方法如下:

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.

这篇关于vlc.py 如何播放视频流?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆