[FFmpeg-user] How To Play YouTube Videos using FFPLAy
Moritz Barsnick
barsnick at gmx.net
Mon Dec 1 00:27:25 CET 2014
On Sun, Nov 30, 2014 at 20:20:59 +0100, Clément Bœsch wrote:
> Note: I'm curious about the outcome of this nowadays since libquvi seems
> discontinued. We might want to check if youtube-dl provides a maintained
> alternative.
Ah, indeed, it seems there hasn't been any visible work on quvi in the
last 12 months.
What's more, ffmpeg only supports the libquvi-0.4 API (0.9 is the
upstream branch that was last maintained), as you, Clément, already
pointed out a few months ago:
https://ffmpeg.org/pipermail/ffmpeg-user/2014-June/022140.html
Just the for fun of it, I rebuilt ffmpeg against libquvi-0.4.1 on my
ancient system. I wanted to see whether the old libquvi still manages
to parse YouTube or Vimeo correctly, as I have my doubts, due to it
being a moving target. Result: libquvi can't parse Vimeo, and YouTube
unfortunately segfaults.
I use the excellently maintained youtube-dl script as a replacement,
but it means you need intermediate storage. A bridge to ffmpeg would be
nice...
Moritz
P.S.: The quvi 0.4.1 command line tool still presents me a useful video
URL for most videos. Use
$ quvi https://www.youtube.com/watch?v=PjIV2OFoSXs
("Melissa Horn - Jag saknar dig mindre och mindre" BTW)
then grep the URL out of the "url : " line, and pass that to ffmpeg:
barsnick at sunshine:/usr/new/tools/video/ffmpeg > ./ffmpeg-build/ffmpeg_g -i "http://r5---sn-4g57kn7d.googlevideo.com/videoplayback?nh=IgpwcjAzLmZyYTAzKgkxMjcuMC4wLjE&ipbits=0&fexp=900147%2C907259%2C927622%2C932404%2C943909%2C947209%2C948124%2C952302%2C952605%2C952901%2C953912%2C957103%2C957105%2C957201&initcwndbps=1187500&upn=L1Hv0AJzrnE&id=o-AGwgxsR3hRn_2N7Ix492ET3fteWQNnc4hEHwqWudkiL8&expire=1417410911&mm=31&signature=5C8005558FA27B8678DBC1660D8BE3D8D3B69676.3AE8B68FB4E5C81DE1A85DAA8323542B8EABED4C&ms=au&sparams=dur%2Cid%2Cinitcwndbps%2Cip%2Cipbits%2Citag%2Cmm%2Cms%2Cmv%2Cnh%2Csource%2Cupn%2Cexpire&source=youtube&sver=3&mv=m&dur=296.658&itag=22&key=yt5&ip=217.224.70.136&mt=1417389249"
ffmpeg version 2.4.git Copyright (c) 2000-2014 the FFmpeg developers
built on Nov 30 2014 23:33:18 with icc (ICC) 14.0.3 20140422
configuration: --prefix=/usr/new/tools/video/install/ffmpeg/20141130 --enable-gpl --enable-version3 --enable-nonfree --disable-shared --enable-libxcb --enable-gnutls --enable-libcdio --enable-libfreetype --enable-libx264 --enable-libmp3lame --enable-openal --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-librtmp --enable-libass --enable-libv4l2 --enable-libvidstab --enable-libfdk-aac --enable-libsmbclient --enable-libquvi --cc=icc --cxx=icpc --extra-ldflags='-L/usr/new/tools/video/install/x264/current/lib -L/usr/new/tools/video/install/fdk-aac/current/lib' --extra-cflags='-I/usr/new/tools/video/install/x264/current/include -I/usr/new/tools/video/install/fdk-aac/current/include'
libavutil 54. 15.100 / 54. 15.100
libavcodec 56. 13.100 / 56. 13.100
libavformat 56. 15.101 / 56. 15.101
libavdevice 56. 3.100 / 56. 3.100
libavfilter 5. 2.103 / 5. 2.103
libswscale 3. 1.101 / 3. 1.101
libswresample 1. 1.100 / 1. 1.100
libpostproc 53. 3.100 / 53. 3.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'http://r5---sn-4g57kn7d.googlevideo.com/videoplayback?nh=IgpwcjAzLmZyYTAzKgkxMjcuMC4wLjE&ipbits=0&fexp=900147%2C907259%2C927622%2C932404%2C943909%2C947209%2C948124%2C952302%2C952605%2C952901%2C953912%2C957103%2C957105%2C957201&initcwndbps=1187500&upn=L1Hv0AJzrnE&id=o-AGwgxsR3hRn_2N7Ix492ET3fteWQNnc4hEHwqWudkiL8&expire=1417410911&mm=31&signature=5C8005558FA27B8678DBC1660D8BE3D8D3B69676.3AE8B68FB4E5C81DE1A85DAA8323542B8EABED4C&ms=au&sparams=dur%2Cid%2Cinitcwndbps%2Cip%2Cipbits%2Citag%2Cmm%2Cms%2Cmv%2Cnh%2Csource%2Cupn%2Cexpire&source=youtube&sver=3&mv=m&dur=296.658&itag=22&key=yt5&ip=217.224.70.136&mt=1417389249':
Metadata:
major_brand : mp42
minor_version : 0
compatible_brands: isommp42
creation_time : 2014-03-07 09:58:01
Duration: 00:04:56.61, start: 0.000000, bitrate: 1659 kb/s
Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1280x720 [SAR 1:1 DAR 16:9], 1465 kb/s, 25 fps, 25 tbr, 25 tbn, 50 tbc (default)
Metadata:
handler_name : VideoHandler
Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 191 kb/s (default)
Metadata:
creation_time : 2014-03-07 09:58:02
handler_name : IsoMedia File Produced by Google, 5-11-2011
At least one output file must be specified
More information about the ffmpeg-user
mailing list