popcornmix / omxplayer

omxplayer
GNU General Public License v2.0
1.01k stars 334 forks source link

pi and sound #827

Open stefs22 opened 1 year ago

stefs22 commented 1 year ago

I want to test omx to play a couple of my cams at once.

But, i dont get audio? I want audio from one live video, advice? i go something like: /usr/bin/omxplayer --win "960,0,1920,540" "rtsp://username:password@ip_address:554/cam/realmonitor?channel=1&subtype=1" cams works, but not audio, i want audio from one cam. Also, i want make a script to turn on automatically so i try this for 2 cams: I create video scrpit nano video.sh

!/bin/bash

/usr/bin/omxplayer --win "0,540,960,1080" "rtsp://username:password@ip_address:554/cam/realmonitor?channel=1&subtype=1"

!/bin/bash

/usr/bin/omxplayer --win "960,540,1920,1080" "rtsp://username:password@ip_address:554/cam/realmonitor?channel=1&subtype=1"

Make the script executable

chmod +x video.sh

Run Script ./video.sh

But only one video is showed, when i turn off one, other turn on.

stefs22 commented 1 year ago

I fix this, i need something to disable sound on one cam. What to type? So /usr/bin/omxplayer --win "960,540,1920,1080" "rtsp://username:password@ip_address:554/cam/realmonitor?channel=1&subtype=1", what to type and where?