Closed wd40pyro closed 1 year ago
Hey Pyro,
First I'd like to thank you again for being such a great asset in testing the mod.
So, 1 ) For raw urls (ex mp4) it will play the direct video with that quality.
YouTube however can be very tricky with exposing raw urls to video files. The mod grabs YouTube URLs with YouTubeExplode. There are things called Muxed Streams, which are combined video and audio files. These Muxed Streams have limited resolutions and formats. The mod tries to grab what is called GetWithHighestVideoQuality
so essentially it grabs the best quality video available for that link. I have considered adding a config for other formats but for the muxed streams there is either GetWithHighestVideoQuality
or GetWithHighestBitrate
which to me are synonymous.
As such, I will say that with the ability to play remote files, you could always upload a high quality 1080p file to a server somewhere that is accessible via a URL and input that instead. I have a Jellyfin (Plex) server that I can copy stream urls from and they play for my friend in multiplayer as well, and the quality is top-notch. As long as a file URL is publicly accessible Vikings in range will play the file at the same time.
2 ) When a Screen or Boombox has a file set, a multiplayer event is sent to the server and then propagated out to all clients. Fellow Vikings need only be in range of the Screen or Boombox - they will receive the decoded YouTube URL or remote URL upon video preparation. As long as the Screen or Boombox is actually loaded in on their client it will play on their end. If they are out of range, and walk in range, nothing will be playing. Additionally, if they load into a server with playing media, it will not play either.
When you click set file, your local game/internet grabs the URL with YouTubeExplode. Then sends that raw URL to the server which gives it to all players, which means players don't have to decode YouTube URLs on their end. It will just automatically play.
Unless you have any issues with the YouTubeExplode API (or just want to self-host), the NodeJS server is not needed right now. I will say, it tends to return better quality links that have faster download speeds. Food for thought.
I would love to add in a way to make files sync on login/load, and skip to the position they are playing -- but the issue with encoded videos use on YouTube, like h265, is they basically decode the video as a continuous stream and require the previous frame to create the next frame. As such it's not really possible to skip into the middle of the video without playing/tracking to it first.
3 ) For now, any actual issues or bugs can be posted on GitHub. I am available in most Valheim Modding Discords and the Jotunn under ModestImpala.
Thanks Moddy
I represent a decent size Valheim community. We have been around about 2-3 months now and growing quickly. Some reference materials below :) https://discord.gg/55TFCMD5, https://www.youtube.com/watch?v=P0Y4Bii0AOQ, https://www.battlemetrics.com/servers/valheim/17836859, https://valheimservers.net/listing/valhalla-dedicated
Some questions our admin team had:
I'll use this to post additional questions as I test over the next couple hours.