DEV Community

Discussion on: Download YouTube Videos Using Python - Your Own YouTube Downloader

Collapse
 
dzun_n profile image
Dzun N

I try, but the video downloaded theres nothing voice.

Collapse
 
siddharth2016 profile image
Siddharth Chandra

As per the official documentation:

You may notice that some streams listed have both a video codec and audio codec, while others have just video or just audio, this is a result of YouTube supporting a streaming technique called Dynamic Adaptive Streaming over HTTP (DASH).

In the context of pytube, the implications are for the highest quality streams; you now need to download both the audio and video tracks and then post-process them with software like FFmpeg to merge them.

The legacy streams that contain the audio and video in a single file (referred to as “progressive download”) are still available, but only for resolutions 720p and below.

It seems that the video that I downloaded from the given code has a Stream object whose attribute progressive is False. The given video URL does not have legacy streams available for 720p but if you notice there is one stream with progressive as True and res as 360p.

<Stream: itag="18" mime_type="video/mp4" res="360p" fps="25fps" vcodec="avc1.42001E" acodec="mp4a.40.2" progressive="True" type="video">
Enter fullscreen mode Exit fullscreen mode

Thank you for pointing it out, I have updated the post.

Collapse
 
dzun_n profile image
Dzun N

thanks a lot🙌