【发布时间】:2021-10-07 04:01:03
【问题描述】:
我正在尝试通过 RPI 3 上的 PHP exec 命令在 VLC 中打开 .mp4 文件
情况
我访问 localhost 并选择我想在移动设备上播放的.mp4 文件。
结果 我希望 PHP 在主机上使用 VLC 打开视频文件,主机通过 HDMI 连接到显示器。
正在使用的命令是
exec("DISPLAY=:0 /usr/bin/vlc --fullscreen /var/www/html/videos/".$video.".mp4 2>&1 &");
结果是主机上什么都没有打开,结果是:
[004af128] [cli] lua interface: Requested shutdown.
我也用不同的命令遇到了这个错误:
vlc No protocol specifiedxcb_connection_has_error() returned trueHome directory not accessible: Permission denied[011489b0] vlcpulse audio output error: PulseAudio server connection failure: Connection refusedNo protocol specifiedxcb_connection_has_error() returned trueHome directory not accessible: Permission denied[01142708] dbus interface error: Failed to connect to the D-Bus session daemon: /usr/bin/dbus-launch terminated abnormally with the following error: No protocol specifiedAutolaunch error: X11 initialization failed.
【问题讨论】:
标签: php terminal raspberry-pi exec vlc