Cinema

Rust Video Player & TV Plugin for Oxide & Carbon

Play MP4 videos in game from a web address. Hang a Rust TV on your wall, press R and watch, full screen, in the game's own video player.

new Carbon Oxide v0.7.1 Updated

Overview

Cinema plays videos inside Rust. Give it the web address of an MP4 file, and players watch it full screen in the game's own video player, with a close button, without leaving the server.

Use it for a welcome video, the server's rules, a building or farming guide, event trailers, or just a film night. Hang a Rust TV on the wall, look at it, press R, and the video starts.

Videos from a web address

A video is an https:// address that ends in .mp4: a file on your own website, a file host or a CDN. Players can keep their own list too: type /cinema, paste an address, and click it to watch. Every address is checked when it is added, and a web page, a dead link or a private address is refused with a reason.

You can also drop .mp4 files straight into the server's data/Videos folder. Cinema then hands them out itself over a small built-in web server (port 28090 by default, open it in your firewall), or from your own website if you set a base address in the config.

The game's player has some limits of its own, and Cinema works within them:

  • MP4 with H.264 video, 1080p or smaller. The game uses Windows' own decoder, which will not play 4K.
  • https only for videos from the web.
  • Each player downloads the whole file before it plays, so short, small videos start fastest.

cinema.status in the server console lists every video Cinema has found, its format, and the address players are sent, so a video that will not play is easy to track down.

Making a Rust TV
  1. Type /cinema tv. A Rust TV goes into your inventory. It costs what a landscape picture frame costs to craft, and is free for admins with cinema.admin.
  2. Put it on a wall like any picture frame. It comes with the Rust TV picture already on it, and nobody can paint over it.
  3. Look at it and press R. A list of the server's videos opens. Click one to watch.

Your own /cinema videos are listed on every TV you press R on, under the server's, and only you see them.

Choosing what a screen shows

Any picture frame or sign can be a screen, not just a TV. An admin with cinema.admin looks at it and presses R to tick which videos it offers. With one video ticked, pressing R plays it straight away; with several, players get a list to pick from. A Rust TV with nothing ticked offers every video on the server.

Live channels (optional)

With ffmpeg installed on the server, Cinema can also show live streams (HLS .m3u8), and with yt-dlp a YouTube, Twitch or Kick channel page. The game cannot play a live stream directly, so while someone is watching, Cinema records it into short clips and plays them back to back, a little behind live. It is off until you set the ffmpeg path in the config. Streamers' broadcasts are their own: showing them on your server is your responsibility.

Languages

English, Russian, German, French, Spanish, Brazilian Portuguese and Simplified Chinese are built in, with no lang files to install. Each player sees the language their own client is set to.

Every download is licensed to you and watermarked with your details.

Features

  • Play MP4 videos in game from any https web address
  • Full screen, in the game's own video player, with a close button
  • /cinema tv gives a Rust TV to hang on the wall; press R to watch
  • The TV's picture is built in and cannot be painted over
  • Any picture frame or sign can be a screen, offering the videos you choose
  • Players keep their own list of videos that only they see
  • Videos in the server's data/Videos folder are served by a built-in web server
  • Every address is checked when added; web pages and dead links are refused
  • cinema.status shows every video, its format and the address players get
  • Optional live channels: HLS streams, YouTube, Twitch and Kick (needs ffmpeg)
  • No client mod and no image plugin needed
  • Seven languages built in

Install

  1. Download Cinema.cs from My Plugins.
  2. Drop it into oxide/plugins or carbon/plugins.
  3. Grant the permissions:
o.grant group default cinema.use
o.grant group admin cinema.admin

On Carbon use c.grant instead of o.grant.

The file name must stay Cinema.cs, because Oxide matches it to the class name.

To play videos from the server's own data/Videos folder (made on first load), open the video port, 28090 by default, in your firewall. Videos from an https web address need nothing opened.

The config is written to oxide/config/Cinema.json (or carbon/configs/Cinema.json) on first load. Edit it, then reload the plugin (o.reload Cinema or c.reload Cinema).

Config

{
  "Serve videos from this server": true,
  "Port for serving videos": 28090,
  "Public address players reach the server on (empty: automatic)": "",
  "Video base URL (empty: serve them from this server)": "",
  "Players can close a video": true,
  "Seconds between videos for one player": 3.0,
  "Reach to a frame (metres)": 3.0,
  "Videos by web address (https)": [
    { "Name": "Server rules", "Address": "https://example.com/videos/rules.mp4" }
  ],
  "Videos each player can keep in /cinema": 20,
  "ffmpeg.exe path, for live channels (empty: live channels off)": "",
  "yt-dlp.exe path, for YouTube, Twitch and Kick channels (empty: off)": "",
  "Live channels (HLS .m3u8 streams)": [],
  "Live channels recording at once": 4,
  "Seconds in each live clip": 60,
  "Minutes a live channel keeps recording after its last viewer": 3.0,
  "Playlist segments back a live channel starts recording (0: at the live edge)": 15
}

Commands & Permissions

Commands

In game

  • R while looking at a Rust TV, picture frame or sign — play its video, or open its list

Chat

  • /cinema — your own videos: paste an https .mp4 address to add one, click one to watch it, remove it when done
  • /cinema tv — get a Rust TV to hang on the wall

Server console

  • cinema.status — the videos found, their format, and the address players are sent
  • cinema.rescan — look in data/Videos again after adding or removing files
  • cinema.addurl <address> [name] — add a video by its web address (or a live channel, if the address is a stream)

Permissions

  • cinema.use — /cinema for your own videos, and /cinema tv to get a Rust TV
  • cinema.admin — press R on any picture frame or sign to choose which videos it offers; Rust TVs are free

Anyone can watch a TV, frame or sign that has videos on it; no permission is needed for that.

Changelog

VersionReleasedChanges
v0.7.1 latest —