1

我正在尝试使用带有 python 绑定的 libVLC 播放一个不完整的 rar 文件。如果我从控制台运行以下命令,我会收到一些错误,但我可以在 VLC 上看到视频。

VLC media player 2.0.5 Twoflower (revision 2.0.5-0-g1661b7d)
[0x652108] main libvlc: Running vlc with the default interface. Use 'cvlc' to use vlc without interface.
[0x7fde50c02028] filesystem access error: cannot open file /tmp/incomplete.r01 (No such file or directory)
[0x7fde50001438] main stream error: no suitable access module for `file:///tmp/incomplete.r01'
[0x8732e8] main playlist: stopping playback
[0x7fde50c0d5c8] filesystem access error: cannot open file /tmp/incomplete.r01 (No such file or directory)
[0x7fde50c018d8] main stream error: no suitable access module for `file:///tmp/incomplete.r01'
[0x7fde400505c8] freetype spu text error: Breaking unbreakable line

但是如果我使用 python 绑定运行视频,它就不起作用。

import vlc, time
instance = vlc.Instance()
media=instance.media_new('/tmp/incomplete.rar')
player=instance.media_player_new()
player.set_media(media)
player.play()

time.sleep(10)

输出:

[0x7f523800a0d8] filesystem access error: cannot open file /tmp/incomplete.r01 (No such file or directory)
[0x7f523800a0d8] main access error: File reading failed
[0x7f523800a0d8] main access error: VLC could not open the file "/tmp/incomplete.r01". (No such file or directory)
[0x7f5238006638] main stream error: no suitable access module for `/tmp/incomplete.r01'

我认为 VLC 使用了一些 libVLC 没有的默认选项。对此的任何帮助表示赞赏。

4

0 回答 0