Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

60FPS and 1080p unavailable for some videos #60

Closed
DanielJenkyn opened this issue Mar 18, 2018 · 10 comments
Closed

60FPS and 1080p unavailable for some videos #60

DanielJenkyn opened this issue Mar 18, 2018 · 10 comments
Labels
enhancement New feature or request

Comments

@DanielJenkyn
Copy link

DanielJenkyn commented Mar 18, 2018

First of all great job so far, been looking for a program like this for a while 👏

Issue:

Videos that are 60fps and/or 1080p on youtube.com do not have the same quality options on freetube.

Example

screen shot 2018-03-18 at 10 53 18

screen shot 2018-03-18 at 10 53 57

I actually know little about javascript, or even web development but fixing the 1080p issue maybe has something to do with the function changeQuality(videoHtml, qualityType, isEmbed = false)or in player.js
or just add the option in player.html there doesn't seem to be any documentation on why 1080p is unavailable.

@dimqua
Copy link

dimqua commented Mar 18, 2018

I think 1080p videos are not supported at all.

@DanielJenkyn DanielJenkyn changed the title 60FPS and 1080p unavailable for some videos [proposed Enhancement] 60FPS and 1080p unavailable for some videos Mar 21, 2018
@PrestonN
Copy link
Member

PrestonN commented Mar 23, 2018

This is obviously something that I've wanted to do and I won't ever consider FreeTube stable until this is fixed. The reason why 1080p isn't supported yet is because of how YouTube organizes their videos.

Any quality type 1080p and up separates the video and audio into 2 different files. This means that the video player has to sync up the 2 files in order for the user to view them properly. The 720p videos and below do not do this.

It is very possible to combine them, but the issue has been being able to do it automatically. Normally these types of videos provide some sort of manifest file that directs the player how to combine them, but youtube-dl does not provide this file and I have yet to find a good solution to create this manifest file.

I've been looking at different options and I'm trying to find to find the solution that works the best. I could probably hack together a video and audio tag and force them to sync together but I don't think I'd be too proud of that. Plus at that point I'd have to rework all of the controls to make sure that it effects both streams whenever the user does something. It would be very messy at the end of the day.

The lack of documentation has been my fault. I shouldn't have assumed this but I figured that people were aware of HookTube having the exact same issue and were alright with it. Yeah it'll be nice if I can get it working but I think maxing out at 720p is good enough until I can find a proper solution.

I'll keep you updated on this though. I'm probably going to focus more on the client itself than trying to get this working. I understand that it's very important to a lot of people though and will continue making efforts to getting this working. I would love any help or insight towards this if anyone is willing to help out.

@PrestonN PrestonN added the enhancement New feature or request label Mar 23, 2018
@DanielJenkyn DanielJenkyn changed the title [proposed Enhancement] 60FPS and 1080p unavailable for some videos 60FPS and 1080p unavailable for some videos Mar 23, 2018
@DanielJenkyn
Copy link
Author

Right I see, I wasn't aware this was the case. Well thanks for the additional info and at least this ticket can serve as some form of documentation that people can refer to.

@PrestonN
Copy link
Member

PrestonN commented Apr 6, 2018

Hey there. I just wanted to give an update on this, because I know that this feature is very important to users as well as potential users.

I plan on making a serious attempt at this when I get the next release published. I haven't had much luck in finding anything that solves a similar issue so I'll have to get a little creative with it. I mentioned it being messy, but my current plan is to make a custom player with custom controls that sync the video and audio together. I've put some thought into it and I believe that I can get it into a manageable state. FreeTube will still use the default HTML5 player, the only difference that you will see is that the interface will be different.

Doing this actually opens up a few things. To start, FreeTube will have a unique interface for it's video player. I'll be able to add things directly to the player's interface that I couldn't do before (such as playback speed and video quality). The last question is then how do we want the video interface to look like? I guess the current plan is to make something similar to how YouTube's player looks, but if anyone has any ideas for themes then feel free to let me know. Maybe the theme could be interchangeable in the future?

Hopefully this gets people excited. I'm interested in how the end result will be when I'm finished. I figured a few people would like to know that it should be coming soon. :)

@oleteacher
Copy link

Not sure if this will help, but been using Plyr for some time now with great results. Maybe it will be of use to you:

https://github.com/sampotts/plyr

@PrestonN
Copy link
Member

PrestonN commented Apr 6, 2018

Thanks for the suggestion @oleteacher, I'll see if that will work with what I'm wanting to do.

While the player shows that it supports YouTube videos, this typically means that the player embeds the YouTube player into their own, which would defeat one of the main goals of FreeTube. I've seen several players do it this way when I've searched for solutions and this is not the correct way for this type of application to do this. Any sort of YouTube analytics would come along with it which would ruin any sort of privacy aspect that FreeTube has.

A proper solution will need the player to (as an example) accept a DASH video URL as well as a DASH audio URL at the same time and sync these 2 together without a manifest file. I've searched quite a bit and I have yet to find a solution that does this. Realistically this seems like the best way to support higher qualities while still keeping the user as private as possible. I would not want to implement anything that doesn't do something similar to this. My best solution seems to be to make a custom player that does this.

I only glanced at Plyr for a little bit, so if I'm wrong and they do support this then please let me know.

@oleteacher
Copy link

I only glanced at Plyr for a little bit, so if I'm wrong and they do support this then please let me know.

I mainly brought it up in case there were some inter workings that FreeTube may benefit from:)

@PrestonN
Copy link
Member

PrestonN commented Jul 20, 2018

Good new on this, a developer on Reddit has started work on his own YouTube app which included some custom work on 1080p+ video synchronizing. He has sent me his code along with some notes and I should be able to port this over to FreeTube very soon. It may even be possible to have this ready before the next release. If you ever get the chance, head over to his GitHub page and tell him thanks. This saves me a lot of time. :)

@tiotrom
Copy link

tiotrom commented Feb 13, 2019

Any updates on the implementation?

@PrestonN
Copy link
Member

PrestonN commented Jun 6, 2019

Closing as 1080p+ options have now been implemented. I will have more information on the matter when the release blog is available. Still no ETA on when that will be but 1080p is finished and ready for release.

@PrestonN PrestonN closed this as completed Jun 6, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

5 participants