topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • Tuesday October 15, 2024, 1:40 am
  • Proudly celebrating 15+ years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Author Topic: alias: download youtube video as mp3 audio file with youtube-dl and ffmpeg  (Read 6446 times)

Nod5

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 1,169
    • View Profile
    • Donate to Member
This alias lets you enter
yt https://www.youtube.com/watch?v=dQw4w9WgXcQ
in FARR to download that youtube content to an mp3 audio file.

This requires the tools youtube-dl (to download the youtube content) and ffmpeg (to convert to mp3).
youtube-dl , http://rg3.github.io...ube-dl/download.html
ffmpeg , http://ffmpeg.zeranoe.com/builds/ (get the Static build)

alias name
youtube-dl to mp3
regular expression pattern
^(?:y|yt|you) (.*(?:youtu.be|youtube.com).*)$
Results
youtube-dl mp3 $$1 | C:\folder\youtube-dl.exe --restrict-filenames -o "C:\output\`%(title)s.`%(ext)s" --write-thumbnail --ffmpeg-location "C:\folder\ffmpeg.exe" -f "bestaudio[ext=m4a]" -x --audio-format mp3 --audio-quality 0 --embed-thumbnail $$1

Note: change the two instances of "C:\folder\" to where you have put youtube-dl.exe and ffmpeg.exe (and ffprobe.exe and ffplay.exe from the same package) and change "C:\output\" to what folder you want the mp3 file to end up in.

I also made a short video tutorial on how to do these setup steps, view it here
https://www.youtube..../watch?v=dQw4w9WgXcQ

tomos

  • Charter Member
  • Joined in 2006
  • ***
  • Posts: 11,963
    • View Profile
    • Donate to Member
Looking forward to trying this.

I also made a short video tutorial on how to do these setup steps, view it here
https://www.youtube..../watch?v=dQw4w9WgXcQ
did I just get rickrolled  :tellme: ;D

the only reason I ask is: The uploader has not made this video available in your country.
Sorry about that.

Edit// but I guess if it looks like a duck, it probably walks sings like one too ;-)
Tom
« Last Edit: January 05, 2016, 03:15 PM by tomos »

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,913
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
thanks for the alias -- that's useful!  as tomos points out, the video is not correct (or was a joke?).

Nod5

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 1,169
    • View Profile
    • Donate to Member
did I just get rickrolled  :tellme: ;D
Hehe. I first needed a youtube url to simply illustrate the command and that was the first one that came to mind. But then I thought, when I already have it at hand why not ... roll with it?  8)

tomos

  • Charter Member
  • Joined in 2006
  • ***
  • Posts: 11,963
    • View Profile
    • Donate to Member
^ it's been a while :D :Thmbsup:
Tom