Neos-Metaverse / NeosPublic

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

H.264 MP4 videos invisible only to user who uploaded #534

Open NicholiNoah opened 4 years ago

NicholiNoah commented 4 years ago

Issue: H.264 MP4 videos upload and preview correctly for all users except the one who uploaded the file. Other formats (H.264 MKV and H.265 MP4) work great.

Steps to replicate:

MSI - 2020.5.12.1285 - 2020-05-12 20_56_27.log

Frooxius commented 4 years ago

Unfortunately this is normal. The first frame that gets shown is a bit random and not fully under our control, but rather the decoding library. There's no actual previewing functionality, it's the video playback engine decoding first frame or two on other ends due to the timing of the load.

If I understand this correctly the playback itself is normal and correctly synced afterwards?

shiftyscales commented 4 years ago

Yeah, that's correct, @Frooxius. If it's random, that would make sense. But it seems like it might be asset specific to some extent. E.g. he had 180 stereo video on which the projection 360 material was invisible until after playback had begun. But another video he uploaded was showing the first frame on the material fine for me, but was invisible for him.

Playback itself was all perfect. It was just problematic that the projection 360 materials were invisible until playback begun. His intention is to create a gallery of his stereo video work.

NicholiNoah commented 4 years ago

In the long run if the solution is exporting my videos with different specs, that's super no big deal. The isolated user part just seemed strange and if Shifty hadn't been there too, I would have just thought I was seeing things... or technically not seeing things.

Frooxius commented 4 years ago

I would recommend setting up some kind of custom preview for when the videos are paused, there's no easy way to ensure that the paused video ends up decoding the exact same frame for everyone (or even on the same user, sometimes you'll see different frame if you load it several times).

shiftyscales commented 4 years ago

After running some additional testing, this behavior isn't random at all. It's entirely consistent.

For locally uploaded videos/videos that are cached in your local database, the thumbnail does not appear/the first frame appears to be corrupted(?) Forcing libVLC on the player will show what it sees the first frame as which looks kind of like a P-frame or B-frame instead of an I-frame. Its frame data appears incomplete- hence why it probably renders as invisible in the Unity player.

When the local database, and asset caches are cleared, downloading the file from the cloud, the first frame is served correctly every time, @Frooxius.

For clarification as well, the videos aren't paused, but rather stopped (not sure if there's a technical difference in this case.) But it should always be reporting the same frame, which it appears to.

Just for reasons unknown, the first frame on a locally uploaded video seems to get corrupted/not displayed possibly? But it is served properly when an existing local copy doesn't already exist as noted. Strange thing.

shiftyscales commented 4 years ago

I imagine this issue has the potential to be solved by the swap to the official LibVLCSharp- but even if it isn't- it's a low priority thing/not really worth looking into.