raingart / Nova-YouTube-extension

Apache License 2.0
213 stars 11 forks source link

[Feature Request] Use Specific Codec #16

Closed HDark15 closed 2 years ago

HDark15 commented 2 years ago

Can something like this be implemented? https://github.com/alextrv/enhanced-h264ify

raingart commented 2 years ago

No, It is Immpossible. The reason is that the video on Youtube servers is already stored in H264 format (max 720p). The resolution above it already uses VP9/AV1. The reason is that AV1 encoded video uses less space on the server. Which reduces overhead (storage and delivery) to Google servers.

The only way to watch videos in a large resolution. This is to use an external player that will play the downloaded video file with the youtube-dl library.

see https://github.com/rainart/youtube-to-smplayer#upd-better-alternative

If your system is a little outdated, then it might be worth making sure that you have hardware video decoding enabled. Screenshot from 2022-09-03 17-10-56

HDark15 commented 2 years ago

I can watch VP9/AV1 video, the reason I'm using this extension because it's faster and less CPU usage for my weak CPU. The downside I can only watch video up to 1080p 60fps and that's okay because it can't handle anything higher. A lot of people using this just to gain more performance, I just thought it can be useful to be implemented to your extension that already give user more control. Thank you for replying.

raingart commented 2 years ago

The only thing h264ify does is block youtube from sending a response to a request for a supported video format. That is, the extension simply makes the browser pretend that the device does not support anything other than H264.

Nothing more can be done. Of course, I can just paste the code into the plugin, but why? The problem is that Nova starts up slower than the extension. And it just won't work right.

HDark15 commented 2 years ago

The only thing h264ify does is block youtube from sending a response to a request for a supported video format. That is, the extension simply makes the browser pretend that the device does not support anything other than H264.

Yeah I know, thanks for helping me

HDark15 commented 2 years ago

Sorry, I don't want to open this but. Why are you kept telling me how the h264ify works? I know what it does, maybe I'm not clear enough. H264 codec use less CPU usage.

raingart commented 2 years ago

As I understand it the question - "was whether it is possible to implement a similar mechanism that will use hardware acceleration instead of software"?

I tried to convey that there is only one way known to me. And it has already been implemented. I do not know your knowledge and therefore tried to explain the theory, a possible solution and how it works.

It was probably right to simply say "No, I will not implement." what they are trying to explain. People do not want to delve into, they are lazy. They need ready solutions. I just started to forget about it.

If you want a magical solution to a problem then try these scripts: https://greasyfork.org/en/scripts?q=cpu+youtube

But without explaining how they work. After all, the main thing is to believe and not to know the truth.