trogne
Posts: 11
Joined: Sat Jul 22, 2017 4:37 pm

omxplayer and youtube-dl

Sat Aug 05, 2017 4:23 pm

Hello,

I'm trying to play youtube video using omxplayer and youtube-dl.

I use the latest "youtube-dl", here : https://github.com/rg3/youtube-dl/relea ... 2017.01.31

This is my youtube.sh script :

Code: Select all

#!/bin/bash
xdotool key ctrl+alt+d
omxplayer -o local "$(youtube-dl -g -f best `xsel`)"
When running this, I get this :
"Invalid framerate 1000, using forced 25fps and just trust timestamps"

If instead of "best", I enter "mp4", I get the video output, but there's no audio.

Any solution to get video with audio working ?


Thanks,

Patrick

User avatar
topguy
Posts: 6491
Joined: Tue Oct 09, 2012 11:46 am
Location: Trondheim, Norway

Re: omxplayer and youtube-dl

Thu Aug 10, 2017 10:27 pm

The highest quality youtube streams have seperate video and audio streams. Use the -F option to get a list of the formats, choose one 1080p in mp4 that includes audio. Or google more about the "-f" option.

Return to “Troubleshooting”