Pytube: Downloaded video has no audio

Created on 9 Feb 2019  路  5Comments  路  Source: pytube/pytube

When downloading from filtered stream with the command:

yt.streams.filter(subtype='mp4', res='1080p').first().download()

results a video file with no audio.

But, regular command not using filter is OK.

yt.streams.first().download()

pytube 9.4
Python 3.6

stale

Most helpful comment

Sorry didn't know about YouTube's adaptive streaming.

This is a none issue.
Please close.

Thanks!

I don't get why you talk about adaptive streaming, can you elaborate on why is it linked ? Thanks

All 5 comments

Sorry didn't know about YouTube's adaptive streaming.

This is a none issue.
Please close.

Thanks!

Sorry didn't know about YouTube's adaptive streaming.

This is a none issue.
Please close.

Thanks!

I don't get why you talk about adaptive streaming, can you elaborate on why is it linked ? Thanks

@RemiRigal
Not all video streams in pytube has sound. Streams with audio_codec = 'mp4a.40.2' have sound.

@RemiRigal This is a know issue related to the streaming technique called Dynamic Adaptive Streaming over HTTP or commonly known as DASH.
As the documentation says:

You now need to download both the audio and video tracks and then post-process them with software like FFmpeg to merge them.

Therefore, videos with higher resolution than 360p aren't based on progressive stream so you need to manually merge the video and audio files.

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Ikebani picture Ikebani  路  36Comments

MrspiLLnyK picture MrspiLLnyK  路  20Comments

harindu95 picture harindu95  路  20Comments

waterholic picture waterholic  路  24Comments

JMIdeaMaker picture JMIdeaMaker  路  20Comments