Chocobozzz / PeerTube

ActivityPub-federated video streaming platform using P2P directly in your web browser
https://joinpeertube.org/
GNU Affero General Public License v3.0
13.1k stars 1.51k forks source link

YouTube import should download max available resolution #2505

Closed raphgilles closed 3 years ago

raphgilles commented 4 years ago

Hello,

This a suggestion : Actualy PeerTube support 2160p resolution (that's awesome !) but can't import only max-1080p videos from YouTube. Also I think the maximum available resolution should be downloaded and not only up till 1080p :)

Keep the good work !

JohnXLivingston commented 4 years ago

I think it should be the case. These options are passed to youtube-dl: bestvideo[ext=mp4]+bestaudio[ext=m4a]/best

raphgilles commented 4 years ago

But it's not. Surely because YouTube don't purpose 4K resolution in mp4

rigelk commented 4 years ago

Maybe we should switch to bestvideo+bestaudio.

rigelk commented 4 years ago

@raphgilles @JohnXLivingston I'll be taking the issue. However we need to test how stable the feature is, because unlike mp4 files that contain both audio and video, YT tends to separate streams on higher resolutions of different containers due to the almost null cost of remuxing them.

If you have a few short videos that have non-mp4 best resolutions, that would be great to help me test the stability of switching to that format selector.

JohnXLivingston commented 4 years ago

Maybe Big Buck Bunny? "only" 10 minutes. https://www.youtube.com/watch?v=aqz-KE-bpKQ I have no other idea. If needed, I can try to make a UHD video with my phone (3840*2160 60fps).

raphgilles commented 4 years ago

And why don't download audio and video separately and assemble them next with FFMPEG ?

rigelk commented 4 years ago

@raphgilles because that's extra work? 😅 youtube-dl does it automatically so if I can let it be that way I will.

hexydes commented 4 years ago

Just some feedback, I'd want the YouTube importer to download the highest resolution THAT I HAVE SET on the server. So if I have transcoding set to 1080p and 480p, I'd want to pull in the 1080p version, not the 4k version. This would cause a ton of storage issues on my server to have a 4K, 1080p, AND 480p video. I'd only want 1080p and 480p.

AnonymousWebHacker commented 3 years ago

@rigelk Is there any parameter for the youtube-dl import to be queued, in case of internet interruption?

rigelk commented 3 years ago

This issue conflicts with https://github.com/Chocobozzz/PeerTube/issues/3513, which settled on another solution.