TeamPiped / Piped

An alternative privacy-friendly YouTube frontend which is efficient by design.
https://piped.video
GNU Affero General Public License v3.0
8.21k stars 671 forks source link

Show Format File Size in the API #2429

Closed deniscerri closed 1 year ago

deniscerri commented 1 year ago

Describe the feature

The streams api endpoing is near perfect. It only misses the file size of the audio/video stream.

Why would this be useful to add?

My app YTDLnis is planning to use piped as an api for my youtube queries. It is a downloader app so its essential for the user to know how much space a certain format will take.

Concept(s)

image image

Additional context

Currently im using invidious for my api queries but yours gives way more details. Its just this filesize missing. Please take this request into consideration

Acknowledgements

Bnyro commented 1 year ago

That's not possible without changes in the NewPipe Extractor.

deniscerri commented 1 year ago

image Newpipe shows filesizes? Are they using a different component?

Bnyro commented 1 year ago

I think they either calculate it based on the file format or make a HEAD request to the file's URL to get the Content-Length header.

Bnyro commented 1 year ago

See https://github.com/libre-tube/LibreTube/issues/3278 for a discussion about it

Qaz-7 commented 1 year ago

https://github.com/TeamNewPipe/NewPipeExtractor/issues/1064#issuecomment-1555994228