Video/Streaming Advice: Difference between revisions

From NodeCore Wiki
Jump to navigation Jump to search
(Add a little more advice for higher quality captures)
(→‎Automated Streaming: Update docker image link)
(2 intermediate revisions by the same user not shown)
Line 51: Line 51:


Some video hosting services (esp. YouTube) only support videos of specific sizes.  If your video is of an odd size (e.g. Warr1024's 540p videos) then YouTube will scale it DOWN to the highest level it supports below that (e.g. 480p).  To preserve full quality, instead, scale it UP before uploading (e.g. Warr1024 upscales from 540p to 720p before uploading to YouTube).
Some video hosting services (esp. YouTube) only support videos of specific sizes.  If your video is of an odd size (e.g. Warr1024's 540p videos) then YouTube will scale it DOWN to the highest level it supports below that (e.g. 480p).  To preserve full quality, instead, scale it UP before uploading (e.g. Warr1024 upscales from 540p to 720p before uploading to YouTube).
== Use Elevated Gamma ==
Modern video compression (e.g. H.264+) tends to discard more information in very low-light areas.  This can make navigating in the dark using subtle light show up poorly on video captures.  You will probably want to use a light curve gamma of 2 or higher to avoid this.
Gamma works for brightness very much like dynamic compression works for audio, and reduces the differences between things of maximum brightness and other things.  Note that maxing out gamma at 3 will cause all areas with any light at all to appear at full brightness, so you may lose some dynamic range.
== Automated Streaming ==
It's possible to fully automate streaming from a minetest client, including restarting automatically on failures.  This is the method employed by https://www.twitch.tv/nodecoremt.
* https://hub.docker.com/r/warr1024/minetestcast [https://gitlab.com/sztest/minetestcast (src)] - Automatic streaming minetest client
* https://gitlab.com/sztest/szutilpack/-/tree/master/szutil_cinecam - Mod to control the camera from the server side
* https://gitlab.com/sztest/szutilpack/-/tree/master/szutil_stealth - Mod to make the camera player invisible
You will need to setup a "camera" player, grant them the built-in fly and noclip privs, plus the szutil_cinecam and stealth privs added by the mods above.
N.B. When streaming to twitch with this setup, you should DISABLE the stream restart protection feature, because it interferes with the MT client restarting and causes the stream after restarting to get black-holed (twitch accepts the stream via RTMP but it won't actually broadcast it unless you force restarting the stream AGAIN after 90 seconds have passed).  If you disable restart protection, the automated streaming client will be able to restart immediately, albeit as a new stream session (VODs will be separate).

Revision as of 13:03, 26 June 2022

Make Fonts Larger/Bolder

Especially at high resolutions, and especially at higher/lossier compression, on-screen text can be very hard to read for viewers. Larger, bolder fonts help with this.

MT's font size can be increased in settings. You can also set custom fonts, if you install the custom font files (e.g. in ~/.minetest/font).

The default proportional font is Arimo and the default monospace is Cousine. You can download the bold versions for free at https://www.fontsquirrel.com/fonts/list/foundry/ascender-fonts.

Recommended Software

For video capture and streaming:

For video editing:

Use Audio Channels

If you're recording a video that will be edited later, and using a mic for voice-over, be sure to capture in-game audio and mic audio on separate channels. You will be able to balance and mix them later, and can apply effects like dynamic range compression or auto-duck.

For streaming, you can still capture separate channels for simultaneous recording, but you'll want to do some quick test runs to balance your audio before you start streaming live.

In-Game Toggles

For video recording, you will probably want to disable the in-game chat (F2) to prevent warning messages and such from cluttering your screen.

You can also setup a keybinding for Cinematic Mode (F8). When toggled on, your mouse movements are smoothed (it takes some getting used to). This may make the visual experience smoother for viewers, though it will slow down the action a bit, and tends to make recordings a little larger on disk (more motion instead of quick cuts).

HTML Live Overlays

Web apps can be embedded in OBS on Linux using the browser plugin: https://github.com/bazukas/obs-linuxbrowser. Supposedly the Windows version ships with one.

For OBS Twitch streaming, Warr1024 uses and recommends https://nightdev.com/kapchat/ to bake chat streams into the video. Later replays of the VODs on Twitch only make the chat available via a side channel, and you need special software to download the chat along with the VOD and convert it to a subtitle (which doesn't style as attractively) so baking the chat into the video is probably better.

Warr1024 also has a VLC "now playing" overlay, which is a custom HTML+nodejs app. If you want to play music during streams and ensure proper attribution, you may want to find something like it.

For Low Performance

Minetest is a massive CPU hog. Video compression codecs are a massive CPU hog. These things may not get along if your computer is not very powerful.

The easiest improvement is to reduce the resolution of your stream, which reduces the load from video compression. Reduce the resolution of your stream (Warr1024 uses 1024x576), and reduce the resolution of Minetest to match for best results (avoid the scaling filters). NodeCore in particular is designed to be playable with small screens.

If you have a second machine available, you can get some performance savings by running the world as a multiplayer on a second machine, and connecting to from the first machine for streaming.

If you've got the disk space or network bandwidth, use faster compression profiles to achieve better quality with less CPU use. Slower profiles mostly reduce size at a given quality level by throwing away more. Constant Rate Factor (CRF) is also a good way to target a specific quality but be more flexible with disk/network use. When recording, you can always re-encode later with a slower profile, when you don't need to keep up with real-time.

Upscale before Uploading

Some video hosting services (esp. YouTube) only support videos of specific sizes. If your video is of an odd size (e.g. Warr1024's 540p videos) then YouTube will scale it DOWN to the highest level it supports below that (e.g. 480p). To preserve full quality, instead, scale it UP before uploading (e.g. Warr1024 upscales from 540p to 720p before uploading to YouTube).

Use Elevated Gamma

Modern video compression (e.g. H.264+) tends to discard more information in very low-light areas. This can make navigating in the dark using subtle light show up poorly on video captures. You will probably want to use a light curve gamma of 2 or higher to avoid this.

Gamma works for brightness very much like dynamic compression works for audio, and reduces the differences between things of maximum brightness and other things. Note that maxing out gamma at 3 will cause all areas with any light at all to appear at full brightness, so you may lose some dynamic range.

Automated Streaming

It's possible to fully automate streaming from a minetest client, including restarting automatically on failures. This is the method employed by https://www.twitch.tv/nodecoremt.

You will need to setup a "camera" player, grant them the built-in fly and noclip privs, plus the szutil_cinecam and stealth privs added by the mods above.

N.B. When streaming to twitch with this setup, you should DISABLE the stream restart protection feature, because it interferes with the MT client restarting and causes the stream after restarting to get black-holed (twitch accepts the stream via RTMP but it won't actually broadcast it unless you force restarting the stream AGAIN after 90 seconds have passed). If you disable restart protection, the automated streaming client will be able to restart immediately, albeit as a new stream session (VODs will be separate).