Last active
August 29, 2015 14:04
-
-
Save toolness/3b5f9c48aa0d98bf4107 to your computer and use it in GitHub Desktop.
A Dockerfile that makes it easy to convert youtube videos to mp3's
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM ubuntu:14.04 | |
MAINTAINER Atul Varma | |
RUN printf '\ndeb http://us.archive.ubuntu.com/ubuntu/ trusty multiverse' >> /etc/apt/sources.list | |
RUN printf '\ndeb http://us.archive.ubuntu.com/ubuntu/ trusty-updates multiverse' >> /etc/apt/sources.list | |
RUN apt-get update | |
RUN apt-get install -y libav-tools libavcodec-extra-54 python python-pip | |
RUN pip install --upgrade youtube_dl |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I prefer listening to conference talks and such as podcasts while walking or running, but was having a hard time finding tools/services that made this easy for me, so I decided to use it as an opportunity to learn Docker.
To use it, just make a new directory,
cd
into it, paste the above code into a file calledDockerfile
and run this:docker build -t my_youtuber . docker run -t -i my_youtuber /bin/bash
At this point you'll be in your new docker container and you can run the following to create an mp3 out of a youtube video:
youtube-dl --extract-audio --audio-format mp3 --prefer-avconv \ 'http://youtu.be/LlO2_GecWo8?list=PL37ZVnwpeshFXOP2lqCUykYPXYNsK_fgN'
Next step is to actually use this Dockerfile as the basis for a web service that converts youtube videos to mp3's.