Menu

Sorting download quality options honestly: best first, labelled with what each file really is
📰

Sorting download quality options honestly: best first, labelled with what each file really is

DEV Community: php·Mobeen Ahmed·2 days ago
#RiS1a6bT
#devto#dev#file#label#sound
Reading 0:00
15s threshold

When you paste a video link into my downloader, ramrom.io, and it resolves, you get a little dropdown of quality options. It looks like the least interesting part of the whole site. It is actually the part I argued with myself about the most, because that dropdown is where a tool either tells the truth or quietly misleads you.

What "best" actually means

The provider APIs I use return a list of formats, and each one is a bundle of facts: a height in pixels, a file size in bytes if the provider knows it, whether there is an audio track, and whether the stream is muxed (video and sound in one file) or adaptive (video only). A 1080p video-only stream is useless on its own if you wanted a file you can just play, so sorting by height alone would put a silent file at the top. That is the first trap. My rule now is: muxed files with sound come first, sorted by resolution, then video-only streams, then audio-only options.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.