Youtube has been a number one source of entertainment and learning. This is partly due to the presence of local cache server of youtube near my home. Sometimes you want to get the youtube videos downloaded so that you can watch it offline. This was easy in the past as the youtube streamed audio containing video files but has recently moved towards DASH (Dynamic Adaptive Streaming over HTTP).
DASH is an adaptive bitrate streaming technology where a multimedia file is partitioned iniot one or more segments and delivered to a client using HTTP.
The first step of the process is to dowload the video and the audio file from youtube. I personally use Flashgot. Its a browser plugin which offers the link of various quality of video and audio files.
Now on the step of merging audio and video files, we need to to use ffmpeg. Doload and install ffmpeg. If your using Ubuntu you could type
śudo apt install ffmpeg
On a terminal you can combine audio and video file by using following command.
ffmpeg -i video_filename -i audio_filename -c:v copy -c:a copy output_filename