Page 1 of 1

omxplayer and youtube-dl

Posted: Sat Aug 05, 2017 4:23 pm
by trogne
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

Re: omxplayer and youtube-dl

Posted: Thu Aug 10, 2017 10:27 pm
by topguy
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.