iv-org / invidious

Invidious is an alternative front-end to YouTube
https://invidious.io
GNU Affero General Public License v3.0
16.08k stars 1.78k forks source link

1080p and other video support #34

Closed Discookie closed 2 years ago

Discookie commented 6 years ago

Users should be able to freely choose between all available video resolutions, and not just those that have bundled audio.

Example video: https://invidio.us/watch?v=x47Ins_rkgk

VideoJS provides ways to add extra tracks, and all formats are served via adaptive_fmts in /get_video_info.

Maybe utilize &bitrate= and &resolution= options (for audio and video, respectively) if &quality= is not present?

dimqua commented 6 years ago

Also note that 480p video resolution is not supported currently too, as well as 720p @ webm.

omarroth commented 6 years ago

Just thought I'd update folks on this. VideoJS provides ways to manage tracks, but not to play them unless they're already contained within the video file, which unfortunately they are not in this case. VideoJS leaves it up to other plugins, like videojs-contrib-hls to manage playback of multiple streams. Currently I'm working on getting the video streams into a format that one of those plugins should support.

omarroth commented 6 years ago

Hopefully the last update before this is added: Invidious can generate working DASH manifests for most videos, which means all that needs to be implemented is support on the client-side. For that the only missing piece appears to be videojs/http-streaming#162 so that VideoJS can play properly play manifests and integrate them into speed control, quality selector, etc.

ghost commented 6 years ago

@omarroth Holy smokes! Many thanks for all the glorious work.

omarroth commented 5 years ago

Added experimental 1080p with b3ca3922a9073b4abb0d7fde58a3e6098668f53e. You can enable it if you're logged in by going to your preferences and selecting dash as your preferred video quality. Currently it's not integrated into other parts of the player, and you cannot currently select preferred quality. It essentially emulates the auto setting on YouTube. Default speed also won't be respected for dash.

Currently the main interest with pushing out DASH support is to find any errors in playback namely buffer speed and bandwidth usage. Please feel free to open an issue if you encounter any errors or if dash support is missing from any videos.

beerisgood commented 5 years ago

How is the status? Also it would be better if this option is possible without a account

omarroth commented 5 years ago

Hi! This is waiting on videojs/http-streaming#455. I haven't mentioned this much since I don't want to put any pressure on the great folks working on that project. Once that's been implemented expect progress on this issue to start moving much more quickly.

The reason it requires a way to "opt-in" is because it includes a much larger library in order to play 1080p. I'm waiting on http-streaming since it's already used for livestreams and is roughly 1/5th the size of the library I'm currently using to implement this feature.

omarroth commented 5 years ago

@beerisgood

Just pushed a fix that allows you to specify quality=dash the same as you would with any other video preference. So for example https://invidio.us/watch?v=1Ph_ORewpE0&quality=dash will allow you to watch 1080p without creating an account.

ghost commented 5 years ago

@beerisgood

Just pushed a fix that allows you to specify quality=dash the same as you would with any other video preference. So for example https://invidio.us/watch?v=1Ph_ORewpE0&quality=dash will allow you to watch 1080p without creating an account.

Suuuper nice! Really awesome to see this project evolving.

Dash playback is broken for me though on both FF and Edge. Only sound, no video.

omarroth commented 5 years ago

Other folks have been encountering that as well. It appears that YouTube is trying out new codecs that aren't supported by default in all browsers. You might try enabling media.av1.enabled in about:config for FF, Chrome has a similar option and I assume Edge does as well.

See here for some more info.

beerisgood commented 5 years ago

@beerisgood

Just pushed a fix that allows you to specify quality=dash the same as you would with any other video preference. So for example https://invidio.us/watch?v=1Ph_ORewpE0&quality=dash will allow you to watch 1080p without creating an account.

Works great. Thanks!

omarroth commented 5 years ago

Added source selector with 075adb4f0371d85b74b6ced3e27ee9696a0e379b so it should now be possible to select quality for 1080p streams and higher with dash enabled.

beerisgood commented 5 years ago

Added source selector with 075adb4 so it should now be possible to select quality for 1080p streams and higher with dash enabled.

I test with that video: https://invidio.us/watch?v=Bey4XXJAqS8&quality=dash Invidio go to 1080p, while youtube to 2160p (4K): https://www.youtube.com/watch?v=Bey4XXJAqS8

Discookie commented 5 years ago

Thank you! It works really well for me.

Although I've found a couple of bugs with it:

Also, the video in #333 now fails to play altogether, as there's no falling back to another source.

ghost commented 5 years ago

I'm truly amazed how this project develops! Since dash support got introduced, not even a connection to google is needed anymore, according to umatrix. How does that even work? I presume it just redirects somehow to googlevideo.com through invidio.us?

Invidious even supports 60fps through DASH, but you can't explicitly select it, it gets auto selected with 720 and 1080. I swear I saw it selecting 30 instead of 60 from time to time.

I can't pin down why (tested different browsers and connections), but sometimes the quality selection is pretty wonky, acting as a Soft hint for Auto and not a hard constraint quality selection. The Video sometimes auto plays at sub 720p. When you make the selection to 1080p it goes potato mode. Seemingly when it buffered enough of 1080p the video stops playing whilst audio continues. Dragging the video slider to the beginning then properly starts playing the 1080p60 stream. But at other times it acts as a hard constraint, pausing the video until 1080p60 can be played.

ealgase commented 5 years ago

@SairesArt the video is proxied through invidious, so you don't have to connect to Google.

Atn-D commented 5 years ago

Would it be possible to set the "dash" to 1080p by default and not "auto"?

Do you plan to add support for 2160p (4K) and 1440p (2K) video?

Thank you. :blush:

Perflyst commented 5 years ago

With a "bad" (~3-6Mbit/s) connection you cannot stream 1080p on invidious with waiting for the loading screen.

Maybe a setting option but not default please.

On July 1, 2019 4:31:08 PM UTC, AntoineD notifications@github.com wrote:

Would it be possible to set the "dash" to 1080p by default and not "auto"?

Do you plan to add support for 2160p (4K) and 1440p (2K) video?

Thank you. :blush:

-- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/omarroth/invidious/issues/34#issuecomment-507336854

theScrabi commented 4 years ago

In NewPipe we display a combination of dash and nondash videos. Could this be something considerable as well?

rezad1393 commented 4 years ago

Would it be possible to set the "dash" to 1080p by default and not "auto"?

Do you plan to add support for 2160p (4K) and 1440p (2K) video?

Thank you. blush

I also second this suggestion but maybe with a configurable dash quality (user choice) and not set only to 1080 but to the quality user chooses. so that user can set the video to dash and ,say, 720 and then by default the invidious instance plays at that quality without checking internet connection. when I use dash option I almost always get 240 or 144 on invidious but on youtube I get 720 (my max laptop resolution).

btw can other codecs be supported? like vp9 and av1? both of these have higher quality picture (on youtube) that even me with my not 20-20 vision can see. for example this video https://www.youtube.com/watch?v=42DUA51FXOU the one on youtube is shown as av1 codec but the one on https://invidious.snopyta.org/watch?v=42DUA51FXOU is in h264. both are 720 but the av1 is visually better.

github-actions[bot] commented 3 years ago

This issue has been automatically marked as stale and will be closed in 30 days because it has not had recent activity and is much likely outdated. If you think this issue is still relevant and applicable, you just have to post a comment and it will be unmarked.

syeopite commented 3 years ago

Bump

syeopite commented 3 years ago

More recent versions of VideoJS seems to support more formats, but since quality selection is unfortunately broken on them, we can't upgrade.

unixfox commented 2 years ago

Checkout invidio.xamh.de . They added support for higher resolutions very recently. Interestingly the "Modified source" link is missing, so I am not sure which repo is this made from.

Every invidious instances offer high resolutions, not sure why you are being specific on this instance.

stelioskat commented 2 years ago

Checkout invidio.xamh.de . They added support for higher resolutions very recently. Interestingly the "Modified source" link is missing, so I am not sure which repo is this made from.

Every invidious instances offer high resolutions, not sure why you are being specific on this instance.

Sorry, my bad. I am new to invidious and hadn't discovered the "dash" setting. Letting me to believe that 720p is the maximum resolution. Reading now more of the previous comments in this open issue, I saw were my misunderstanding was.

unixfox commented 2 years ago

Checkout invidio.xamh.de . They added support for higher resolutions very recently. Interestingly the "Modified source" link is missing, so I am not sure which repo is this made from.

Every invidious instances offer high resolutions, not sure why you are being specific on this instance.

Sorry, my bad. I am new to invidious and hadn't discovered the "dash" setting. Letting me to believe that 720p is the maximum resolution. Reading now more of the previous comments in this open issue, I saw were my misunderstanding was.

Don't worry it's understandable, we have plans to merge all of these video settings because it creates confusion for the new users.

rezad1393 commented 2 years ago

thank you for all the the great efforts for progress of this project. can I ask for codec selection here support or does the other player (videojs or whatever that is) doesnt support anything other than h264? this would help a lot with bandwidth usage of instances as av1 and vp9 are smaller (sometimes as much as 30-40%) and of course users net usage and speed. also quality of stream are better with newer codecs even on the same resolution and smaller size as I have given an example that is visually noticeable at my last post. from last post: "btw can other codecs be supported? like vp9 and av1? both of these have higher quality picture (on youtube) that even me with my not 20-20 vision can see. for example this video https://www.youtube.com/watch?v=42DUA51FXOU the one on youtube is shown as av1 codec but the one on https://invidious.snopyta.org/watch?v=42DUA51FXOU is in h264. both are 720 but the av1 is visually better."

unixfox commented 2 years ago

1080p+ support is available when dash is enabled.