1

I use omxplayer to stream a internet radio, but omxplayer is printing a whole lot of stats on the terminal, i want it fully in background.
i tried redirecting the stdout and stderr with &> /dev/null &
but no luck.
here is the bash commands i run:

wget -O tmp.fifo http://url/stream.mp3 &> /dev/null &
omxplayer -o local tmp.fifo &> /dev/null &  
  • You should clarify the context here. Presumably you aren't using a GUI desktop, because you could simply minimize the terminal window and use another one. – goldilocks Dec 23 '17 at 16:37
  • i actually do use a GUI desktop, but i wont in my final result, i want to keep one terminal open at all time. There is no way of completely hiding all those stats ? – Wadaane Dec 23 '17 at 16:43
  • Try omxplayer whatevercommandgoeshere > /dev/null. This works for me. – hat Dec 23 '17 at 16:51
  • tried it, ddnt work, i think the issue is with the wget, i edited the question. – Wadaane Dec 23 '17 at 17:04
  • 1
    Did you try wget -b – RubberStamp Dec 23 '17 at 17:26
1

Solved the issue by adding -b after the wget, but now a log file is added every time i run the script. So that's a new issue to solve.

[Update]: Solved the log file issue by adding -q to the wget. Also running the script with &> /dev/null &

here is the complete script:

#!/bin/bash
killall omxplayer.bin
wget -b -q -O radio.fifo http://url/stream.mp3 &> /dev/null & 
omxplayer -o local radio.fifo

And run it like this: sh script.sh &> /dev/null &, and all is good now.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.