node-ytdl-core icon indicating copy to clipboard operation
node-ytdl-core copied to clipboard

format 'highest' doesn't always return both video and audio

Open redbrain opened this issue 4 years ago • 5 comments

ytdl() chooses the format 'highest' by default, which according to the README prefers both video and audio. The selector for highest currently just chooses formats[0]. Normally, this is itag 18, so it's fine. However, for some videos, it's itag 303 (1080p HFR video with no audio), seemingly not what 'highest' should select. One such video with this behavior is https://www.youtube.com/watch?v=5LJcTyMpQhY. For other videos, the itag may vary in a different way; I haven't yet done extended testing of videos. This appears to be unexpected behavior; is that the case? If so, should it be patched in some way?

redbrain avatar Dec 18 '20 18:12 redbrain

yep, hat does seem misleading. hopefully when https://www.youtube.com/watch?v=5LJcTyMpQhY is fixed, this changes too. they'd both be breaking changes.

fent avatar Dec 18 '20 23:12 fent

It happens with the following video as well: https://www.youtube.com/watch?v=OEtyScs6djU Until we can figure out why this is happening, we could set 'highest' to always return itag 18.

redbrain avatar Dec 20 '20 22:12 redbrain

And this video it seems: https://www.youtube.com/watch?v=9UM96ULtLv0 Basically some select videos with HFR (60p) option. Again, we could set 'highest' to always return itag 18 as a temporary fix.

redbrain avatar Feb 11 '21 13:02 redbrain

Don't mind me - just linking this to #770 😉

TimeForANinja avatar Feb 19 '21 22:02 TimeForANinja

Is this a dupe of #770? If so It should be closed

redbrain avatar Feb 19 '21 23:02 redbrain