Neos-Metaverse / NeosPublic

A public issue/wiki only repository for the NeosVR project
196 stars 9 forks source link

YouTube-DL plays stereo videos at incorrect aspect ratio #835

Closed NicholiNoah closed 4 years ago

NicholiNoah commented 4 years ago

Loving the new YouTube download/player, but found a hiccup or two. 1) When importing/pasting YouTube 3D videos (SBS L/R), the video plays back at 1/2 height. Same thing happens when importing as normal without stereo. Pretty sure the issue is related to the way YouTube handles videos with properly injected stereoscopic metadata (required for YouTubeVR playback). It looks like it sends NeosVR the full resolution left and right images instead of squished.

2) Stereo 180 imports wacky too. Neos only downloads the left channel (which I assume is an issue on YouTube's end).

Photo in Local Photo in NeosVR

Links to sample video formats in question: https://youtu.be/LsL-hW4lzl4 https://youtu.be/ikTx-05dJ7M

Frooxius commented 4 years ago

I've looked into this, but unfortunately there's very little I can do about those issues, it's just what you get with YouTube. Generally YouTube doesn't support playback of even normal videos in external applications and regular videos will break from time to time. Supporting those advanced streams requires a custom player, which isn't really something we'd implement in near or even further future.

I checked both videos. For the stereo one, the highest available version that can be streamed is 640x360 version. All higher versions don't contain audio track and require separate audio and video streams.

For the second one, the situation is similar. Youtube-dl doesn't seem to be able to fetch the stereo stream at all, none of the decoded streams are stereo.

To support those formats, I'd strongly recommend uploading them elsewhere, e.g. to the Neos cloud. Streaming directly from YouTube isn't going to be 100 % reliable even for regular videos.

One change I did in the next build is ability to adjust the aspect ratio and having it automatically set to half the width or height for stereo, which should help with the squishing at very least.

NicholiNoah commented 4 years ago

Thanks Froox! It looks like you already fixed it because that same link imports much cleaner now. "3D" videos import as a regular 1280x720 just like everything else. Perfect solution!

Frooxius commented 4 years ago

I haven't done anything yet! Whatever happened was on side of YouTube.

NicholiNoah commented 4 years ago

well it works great, so maybe the youtube gods listened. no need for an update now :) edit: without getting into details, i'm changing the way i upload YouTube, and the current Noes player is perfect.

H3BO3 commented 4 years ago

@CuriousNicholi Is there a reason you reopened this? Are you noticing new issues with the player?

NicholiNoah commented 4 years ago

Yes. My request above ended up causing more of an issue than solving. I wasn't able to catch Frooxius before he implemented it into the current build. Hoping I can undo my original request and revert to the player he created originally which was perfect until I screwed up.

H3BO3 commented 4 years ago

Ah, I see. We'll see what Froox says then

NicholiNoah commented 4 years ago

I'm sorry. 100% my fault.

As an explanation, there are two types of 3D videos. The most common is just a normal video with two squished images (16:9). 99.9% of stereo videos follow this format. It imports at 1280x720 and worked fantastic with the previous Stereo L/R player (especially with videos hosted on Neos cloud).

The other way is rarely rarely used because it includes metadata specifically for YouTubeVR and Blu-ray. This is the format that causes the download restriction of 640x360 with unsqueezed aspect ratio (32:9). I promise to never use this one again.

Very sincere apologies. I didn't realize the two formats would display differently when making the original inquiry, and my requested update caused the more common/better format (including videos saved to Neos cloud) to display in 8:9 instead of the correct aspect ratio.

8-9ratio 8-9neos

Frooxius commented 4 years ago

Reverted the change in 2020.8.5.1178! You can still manually override the aspect ratio thanks to the new property on VideoPlayer if needed.