简体   繁体   English

如何打开两个omxplayer实例

[英]How to open two omxplayer instances

I need to open two omxplayer instances in raspberry pi and I'm using following code in python 我需要在raspberry pi中打开两个omxplayer实例,我在python中使用以下代码

command1='omxplayer', '--win', '0 0 1920 880', '-o', 'hdmi', '-d', '--layer', '5', 'DD.mp4'
command2='omxplayer', '--win', '0 880 1920 1080', '-o', 'hdmi', '-d', '--layer', '6','CC.mp4'

sp.Popen(command1)

sp.Popen(command2)

currently I'm using two video files and none of them are HD videos. 目前我正在使用两个视频文件,而且都不是高清视频。 These two commands are working fine when I execute one at a time. 当我一次执行一个命令时,这两个命令工作正常。 But when I execute my python code or when I execute these commands in two ssh connections both videos are frozen. 但是当我执行我的python代码或当我在两个ssh连接中执行这些命令时,两个视频都被冻结。 Somehow I need to play two video files in two omxplayers. 不知怎的,我需要在两个omxplayers中播放两个视频文件。 I can't figure this out please help. 我无法想出来请帮忙。 If there is a better way to do this please let me know. 如果有更好的方法,请告诉我。

Thank you. 谢谢。

command1='omxplayer', '--win', '0 0 1920 880', '-o', 'hdmi', '--layer', '5', 'DD.mp4'
command2='omxplayer', '--win', '0 880 1920 1080', '-o', 'hdmi', '--layer', '6','CC.mp4'

sp.Popen(command1)
sp.Popen(command2)

This is the code, the problem was using "-d" as a option in omxplayer. 这是代码,问题是在omxplayer中使用“-d”作为选项。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM