Cuelogic Blog Icon
Cuelogic Career Icon
Home > Blog > All > Service that can take a youtube, vimeo etc. url and convert it into an mp4 using ffmpeg library

Service that can take a youtube, vimeo etc. url and convert it into an mp4 using ffmpeg library

There are 2 steps with which we can convert youtube videos into .mp4.

Please check the following steps.

First Step:

Download Video from youtube:

For this we need to install the

The youtube-dl Shell Script


Setting language
tlWpnLdPwvk: Downloading video webpage
tlWpnLdPwvk: Extracting video information
tlWpnLdPwvk: URL:
[download] Destination: tlWpnLdPwvk.flv
[download] 100.0% of 18.78M at 53.98k/s ETA 00:00

Second Step:

Convert that video into .mp4 using ffmpeg:
The FFMPEG Shell Script
ffmpeg -i tlWpnLdPwvk.flv RodStewartMaggieMay.mp4

More information about the youtube-dl

I have collected necessary information about the youtube-dl installation and download commands. Please go through it.

1. How to install youtube-dl
1. In Windows save the exe version somewhere (in your PATH if you want to run it simply as youtube-dl) and run it from the command line.
2. In Unix, download it, give it execution permission and copy it to one of the PATH directories (typically, /usr/local/bin).
3. To update, simply call youtube-dl -U, we recommend to do it often.

Install youtube-dl in Ubuntu

sudo aptitude install youtube-dl
This will complete the installation.

How to Use:

1. youtube-dl Example
youtube-dl ”

2. You can change the file name of the video using the -o option, like in
youtube-dl -o vid.flv ” “.

Supported sites:

2. vimeo.
3. Google Plus.
4. Google Video.

And so many sites. Click here to check all supported site list.

For a complete list you can execute youtube-dl –list-extractors command.

youtube available formats:

Convert Downloaded file into .mp4 using FFMPEG:
example: .flv convert into .mp4 file.
ffmpeg -i filename.flv -sameq -ar 22050 -vcodec libx264 filename.mp4

YouTube, FFMPEG, and MP3 Conversion

Yesterday I published a quick post about a basic MPEG -> FLV video conversion method using FFMPEG. Today I want to share another great usage of FFMPEG: stripping a video’s audio and creating an MP3. As an added bonus, I’ll be ripping the audio from a great YouTube video using youtube-dl, a python script with loads of options for downloading YouTube videos.