fredfs
Posts: 58
Joined: Sun Jun 07, 2015 12:22 am

youtube-dl and omxplayer

Mon Nov 28, 2016 3:06 am

I have been testing youtube-dl inside the pi, most of the time it downloads and gerenates a playable movie but sometimes the file youtube-dl creates is not playable by omxplayer.

" Vcodec id unknown: a8"
I dont know what are the omxplayer limitations in terms of codecs.
Any recipe to youtube-dl always download somethign playable?

Example of files downloaded with youtube-dl that are not playing on my pi:

https://www.dropbox.com/sh/q9hqy82a8n4z ... AIUpa?dl=0

gkreidl
Posts: 6345
Joined: Thu Jan 26, 2012 1:07 pm
Location: Germany

Re: youtube-dl and omxplayer

Mon Nov 28, 2016 7:53 am

fredfs wrote:I have been testing youtube-dl inside the pi, most of the time it downloads and gerenates a playable movie but sometimes the file youtube-dl creates is not playable by omxplayer.

" Vcodec id unknown: a8"
I dont know what are the omxplayer limitations in terms of codecs.
Any recipe to youtube-dl always download somethign playable?

Example of files downloaded with youtube-dl that are not playing on my pi:

https://www.dropbox.com/sh/q9hqy82a8n4z ... AIUpa?dl=0
try adding
start_x=1
to /boot/config.txt
(needs a reboot).

BTW, with omxplayerGUI (kweb suite) you can watch the videos without downloading them.
Minimal Kiosk Browser (kweb)
Slim, fast webkit browser with support for audio+video+playlists+youtube+pdf+download
Optional fullscreen kiosk mode and command interface for embedded applications
Includes omxplayerGUI, an X front end for omxplayer

Martin Frezman
Posts: 1009
Joined: Mon Oct 31, 2016 10:05 am

Re: youtube-dl and omxplayer

Mon Nov 28, 2016 8:03 am

I think the real answer here is that YouTube has gone to the "webm" format for a lot of the videos lately and omxplayer doesn't know how to play webm files.

Try adding "-f mp4" to your youtube-dl command line.

Also note that it is possible, with a little messing about, to use youtube-dl to get the "long URL" for a video, but without actually downloading the video itself. Then you can use this "long URL" as the input to omxplayer and play the video directly from the net w/o having to d/l it.
If this post appears in the wrong forums category, my apologies.

gkreidl
Posts: 6345
Joined: Thu Jan 26, 2012 1:07 pm
Location: Germany

Re: youtube-dl and omxplayer

Mon Nov 28, 2016 9:09 am

I downloaded one of the videos. It uses VP9 video codec. omxplayer only supports VP6 and VP8 (after enabling additional vodecs with "start_x=1").

WEBM is a container format, codecs might be VP6, VP8 or VP9.

Using youtube-dl option "-f best" usually results in playable video formats.
Minimal Kiosk Browser (kweb)
Slim, fast webkit browser with support for audio+video+playlists+youtube+pdf+download
Optional fullscreen kiosk mode and command interface for embedded applications
Includes omxplayerGUI, an X front end for omxplayer

Martin Frezman
Posts: 1009
Joined: Mon Oct 31, 2016 10:05 am

Re: youtube-dl and omxplayer

Mon Nov 28, 2016 9:22 am

gkreidl wrote:Using youtube-dl option "-f best" usually results in playable video formats.
False. I used to use "-f best", but it didn't always work.

Only "-f mp4" works reliably with omxplayer. Also, since the rest of my video library is all mp4 (from various sources and processes), it is good to stay with mp4.
If this post appears in the wrong forums category, my apologies.

gkreidl
Posts: 6345
Joined: Thu Jan 26, 2012 1:07 pm
Location: Germany

Re: youtube-dl and omxplayer

Mon Nov 28, 2016 9:29 am

Martin Frezman wrote:
gkreidl wrote:Using youtube-dl option "-f best" usually results in playable video formats.
False. I used to use "-f best", but it didn't always work.

Only "-f mp4" works reliably with omxplayer. Also, since the rest of my video library is all mp4 (from various sources and processes), it is good to stay with mp4.
It should play if you enable the VP8 codec. But of course it's up to you to use mp4.
Minimal Kiosk Browser (kweb)
Slim, fast webkit browser with support for audio+video+playlists+youtube+pdf+download
Optional fullscreen kiosk mode and command interface for embedded applications
Includes omxplayerGUI, an X front end for omxplayer

Return to “Graphics, sound and multimedia”