Open cherylli opened 4 years ago
I agree it's easier. Why ffmpeg?
https://pytube3.readthedocs.io/en/latest/api.html#pytube.query.StreamQuery.filter
This wouldn't serve? Or the purpose is different?
Its the recommended one. Look here for Progressive vs Adaptive https://pytube3.readthedocs.io/en/latest/user/quickstart.html#working-with-streams although i've a new discovery i think.
Got it, merge video and audio.
Still working on this. Now successfully download video and audio (adaptive), 2 separate files. However,
Can anyone try this and see if its super slow please?
>>> from pytube import YouTube
>>> yt = YouTube('https://www.youtube.com/watch?v=9bZkp7q19f0')
>>> stream = yt.streams.get_by_itag('137')
>>> stream.download()
Would it be a good idea to have it as a feature (adaptive downloads) if the ffmpeg binary is present? It can be part of the config file (put the full path if already in your system) or place the binary in the util/ffmpeg folder within the code? (or similar) I mean, capability to do will be present, and it will be enabled if the set conditions is true
That's actually a good idea. Is there a way to just python to detect it or more like a user setting?
Im thinking we can do a path scan or rely on the which command... something maybe among the lines of this: https://stackoverflow.com/questions/377017/test-if-executable-exists-in-python (most voted answer)
I think we can just ignore progressive because you can download the same resolution with adaptive so we only need to worry about one thing.
Looking at using ffmpeg-python