[FFmpeg-user] streaming only audio from YouTube
dopelabs at dubstep.fm
Wed Apr 29 11:35:05 CEST 2015
installing youtube-dl is a snap on most *nix
$ sudo apt-get install youtube-dl
$ pip install youtube-dl
once installed if you can use back ticks in the ffmpeg command as such:
$ ffmpeg -re -i "`youtube-dl -f bestaudio -g https://www.youtube.com/watch?v=holhZM1OpTc`" -c:a mp3 -b:a 256k audio_only.mp3
you will need ffmpeg built with openssl enabled to access https://
> On Apr 29, 2015, at 1:45 AM, Moritz Barsnick <barsnick at gmx.net> wrote:
> Hi Kath,
> On Wed, Apr 29, 2015 at 05:02:03 +0100, kath g wrote:
>> Can we stream and save audio from YouTube using ffmpeg. The audio is about 10 hrs long. I use manjaro with ffmpeg.
> Is it really a stream or a static video?
> Static videos - and often even audio only - can be downloaded with the
> tool youtube-dl: http://yt-dl.org/
> With its "-F" option, you can figure out the formats (some are
> audio-only). With "-f <format>" or "-f bestaudio", you can tell
> youtube-dl to grab you that audio. Or you can query the URL by adding
> "-g", and pass the given URL to ffmpeg.
> ffmpeg can also be built with libquvi support, where ffmpeg would
> directly understand a YouTube URL. I don't know whether that works
> anymore though.
> (If you don't build ffmpeg youself, you can figure out libquvi support
> by running:
> $ ffmpeg -formats | grep quvi
> and checking for this line:
> D libquvi libquvi demuxer
> ffmpeg-user mailing list
> ffmpeg-user at ffmpeg.org
More information about the ffmpeg-user