When I pass a link to omxplayer with youtube-dl it won't play the audio only the video. Where as playing it locally works as expected.

It doesn't show the usual Audio codec ac3 channels 6 samplerate 48000 bitspersample 16 when streaming. And to make it more odd, it can stream audio just fine.

I start omxplayer like this:

omxplayer `youtube-dl -g <youtube-url>`
  • please mark your answer as the correct one if that solved your problem ;)
    – Vini.g.fer
    Commented Jun 3, 2016 at 18:40

2 Answers 2


Or for simplicity replace "format_id" with "best" (best: Select best quality format represented by single file with video and audio):

omxplayer `youtube-dl -g -f best <youtube-url>` # play the video


  • As far as I know best is the default, but even explicitely choosing it didn't work for me. Maybe it was/is a bug.
    – TomTom
    Commented Jun 4, 2016 at 12:22
  • Using RB Pi 3 without the -f best did not worked.
    – Neoecos
    Commented Sep 22, 2017 at 3:59

Turns out streams have no audio by default. I need to explicitly choose a format that includes the audio stream.

youtube-dl -F <youtube-url> # print the available formats
omxplayer `youtube-dl -g -f <format_id> <youtube-url>` # play the video

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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