2

When I run OMXplayer from a shell script ( called by PHP) the video output is ok, but no audio what so ever. If I run the OMXplayer from the commandline everything is ok. Both video and Audio are fine. As sonn as I start the player from the shell script video is ok but no sound whatever i do. Everything from the internet has been tested. ( raspi-config output, redirect tohdmi local and both) I also put up all rights as the shell didn't play video either at the beginning. And yes the shell script has an accesible fifo . PHP can call the shell script and gives video as well, but still no audio. Also all updates and upgrades are installed on my Rasbian Pixel (PI 2B). What am I doing wrong. HELP By the way I didn't make the shell script myself but copied it from OMXplayer- web-controls-php-master

Steve Robillard
  • 34,687
  • 17
  • 103
  • 109
Delman
  • 21
  • 1
  • 1
    Are you using the -o option for OMXplayer in your script to specify an audio output device (e.g. -o hdmi)? – bobstro Feb 20 '17 at 15:43
  • 1
    Yes I tried them all. I did control it from php so I could suffer from parts not having the rights to do things, but even if I run the script directly from the commandline (user = pi) I do get video but no audio. I even set --vol 5 to assure some adio would appear in case by accident volume would be 0. What ever I do .. no audio. I'm now creating a new SD image and skip nginx to try running the simple webserver from PHP like BrainFooLong does. Keep you guys posted Best regards Rob – Delman Feb 21 '17 at 18:10
  • I found that some video formats won't work, in my case when using youtube-dl with default format (webm). I need to set a different format (mp4) and it works. – aesede Aug 18 '17 at 00:30
  • @aesede How did you specify the format? (Which doesn't work?) – not2qubit Mar 07 '18 at 12:16
  • Hey, you can do for example youtube-dl --list-formats "https://www.youtube.com/watch?v=x_PrT25o8Vs" which will list all available formats. Then you can read format number and, for example: youtube-dl -g -f 22/18/36/43 "https://www.youtube.com/watch?v=x_PrT25o8Vs". This will try to download format #22 first (hd720) if cannot do it, will try #18, then #36, then #43. You can also do youtube-dl -g -f best/medium "https://www.youtube.com/watch?v=x_PrT25o8Vs" – aesede Mar 07 '18 at 17:42

0 Answers0