我正在使用Ubuntu 18.04中最新的vlc python3模块并运行以下脚本:
import vlc
import time
p = vlc.MediaPlayer("file:///SampleVideo.mp4")
p.play()
time.sleep(22)
如果我使用Terminal
程序从X内运行它,则可以正常工作。但是,如果我 Ctrl + Alt + F3 并封装为tty,则会出现分段错误。这是可以预期的吗?有没有办法让它不玩X?
先谢谢了。
更新:能够获得有关该错误的更多调试信息。
VLC media player 3.0.4 Vetinari (revision 3.0.4-0-gf615db6332)
[00005644e05166b0] main interface error: no suitable interface module
[00005644e043a570] main libvlc error: interface "globalhotkeys,none" initialization failed
[00005644e05166b0] dummy interface: using the dummy interface module...
[00007f469c001370] gl vout display error: parent window not available
[00007f469c001370] gles2 vout display error: parent window not available
[00007f469c001370] xcb vout display error: window not available
[00007f469c001370] fb vout display error: cannot get terminal mode
(Inappropriate ioctl for device)
Segmentation fault (core dumped)