我也遇到过同样的问题:我需要在同一个屏幕上显示两个视频(从unix的命令行)。
在网上我找到了一个教程(http://t3chadd1ct.wordpress.com/2013/04/19/omxplayer/),它解决了我的问题.使用“屏幕命令”
..。这是很容易解决的使用屏幕功能。下面的示例说明了如何创建2×2矩阵.
screen
> -dmS camera1 sh -c 'omxplayer --win "0 0 960 540" rtsp://ip_address/live; exec bash' screen -dmS camera2 sh -c
> 'omxplayer --win "960 0 1920 540" rtsp://ip_address/live; exec bash'
> screen -dmS camera3 sh -c 'omxplayer --win "0 540 960 1080"
> rtsp://ip_address/live; exec bash' screen -dmS camera4 sh -c
> 'omxplayer --win "960 540 1920 1080" rtsp://ip_address/live; exec
> bash'我遵循了本教程,但没有正确工作:我的脚本只执行一个视频(第一个"camera2"):
more tmp01.sh
#!/bin/sh
#1)this work:
#nohup omxplayer --win "0 0 1440 800" ../Shared/NO_LOGO_1/01.avi &
#nohup omxplayer --win "0 801 1440 900" ../Shared/NO_LOGO_1/02.avi &
#2)doesn't work
screen -dmS camera2 sh -c `omxplayer --win "0 0 200 200" /home/pi/Shared/NO_LOGO
_1/02_a.avi; exec bash`
screen -dmS camera1 sh -c `omxplayer --win "200 200 600 600" /home/pi/Shared/NO_
LOGO_1/01_a.avi; exec bash`我哪里错了?非常感谢!
发布于 2014-02-12 16:24:36
你用错了引号。使用'而不是反向引号(`)。按照您使用它的方式,screen命令在omxplayer的输出完成之前不会终止(也就是说,直到结束为止)。
screen -dmS camera2 sh -c 'omxplayer --win "0 0 200 200" /home/pi/Shared/NO_LOGO_1/02_a.avi; exec bash'而不是
screen -dmS camera2 sh -c `omxplayer --win "0 0 200 200" /home/pi/Shared/NO_LOGO_1/02_a.avi; exec bash`看到区别了吗?
https://stackoverflow.com/questions/21733504
复制相似问题