Title: How can I know if the omxplayer is playing or not?
Tags: python;process;raspberry-pi;raspbian;omxplayer
Question: new to programming, I would like to know if there is any way to know if a video is running or not with omxplayer, preferably by returning a boolean, in recent Raspian versions. 

If there isn't, how can I get something that does?

The command I'm using to open omxplayer:

```omxc = Popen(['omxplayer', '-b', wakeup])
```

Comment: What do you mean? Does it return a boolean if I run just `omxplayer` ?

Comment: You can just check if the `omxplayer` is running or not, why are you doing this, maybe there is another option to check that.

Comment: I mean if a video is currently being played on Pi you cannot detect that. The only thing you can do is to check whether the `omxplayer` is currently opening or not and based on that concluded a video is being played. `omxplayer` is a player app and when you run it it doesn't return anything.



{'source': 'StackExchangeDataset', 'subset': 'stackoverflow.com', 'metadata': {'AnswerCount': 0, 'CommentCount': 3, 'ContentLicense': 'CC BY-SA 4.0', 'CreationDate': '2019:00:02/13/19', 'FavoriteCount': None, 'PostTypeId': 1, 'Tags': '<python><process><raspberry-pi><raspbian><omxplayer>', 'Title': 'How can I know if the omxplayer is playing or not?', 'ViewCount': 739, 'id': 54673390, 'user_AboutMe': None, 'user_AccountId': 15238639.0, 'user_DisplayName': 'R.Matinha', 'user_Reputation': 1.0, 'user_Views': 5.0, 'user_id': 10995593.0}}