-1

I'm looking for a library that I can use for my Windows 10 UWP app. I just want to convert Youtube videos to mp3 and save in my PC. Everything in the best possible quality. I know videoLibrary but it is more for downloading videos. Thank you

1
  • Avidemux and Virtualdub has command line options.
    – onurcano
    Commented Jan 1, 2019 at 10:01

2 Answers 2

0

Because YouTube video and audio are in separate streams, the easiest way to download a YouTube file is to stream it and use ffmpeg to write the stream to disk. VLC can serve as a GUI for ffmpeg to do that. Commercial software downloads the two streams separately and merges them using ffmpeg.

0

You can use the python library & program youtube-dl to do this. You will either need python installed available for most platforms and then you can pip install youtube-dl to install it or you can download an exe and put it somewhere on your path.

You can then tell it that you only want to download the mp3 format (if available) with the command line option -f mp3 or, provided you also have FFMPEG installed and on your path, you can convert whatever is available to mp3 after download with:

youtube-dl -x URL --audio-format mp3

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.