video-dui icon indicating copy to clipboard operation
video-dui copied to clipboard

Broadcast video to fivem

Stream videos with FiveM (GTAV)

Watch videos with friends in FiveM by playing from path/url or streaming with OBS.

Install

  1. Clone or download the required files
  2. Edit the .env file (see Configuration)
  3. Start the resource
ensure video-stream

When started, the yarn resource should automatically install the required dependencies. If the installation fails you can do so manually with npm i and remove the yarn dependency from fxmanifest.lua. Note that npm is required to manually install the dependencies.

Streaming

The /video-stream command will teleport your player to the cinema.

The /video-stream:set command can play videos by path/url

  • /video-stream:set "https://example.com/video.mp4"
  • /video-stream:set D:\video.mp4
  • /video-steam:set without arguments stops playback.

To publish to the optional RTMP server configure OBS and Start Streaming.

Service: Custom Streaming Server
Server: rtmp://localhost/live
Stream key: STREAM_NAME?secret=secret

image

Configuration

PORT=3000 # The port the HTTP and WebSocket server should listen on (open this port)
RTMP_ENABLED=1 # Whether the RTMP server should be enabled (optional*)
RTMP_PORT=1935 # The port the RTMP server should listen on (open this port*)
RTMP_SECRET=secret # A secret required to publish videos to the RTMP server
STREAM_PATH=rtmp://localhost:1935/live/STREAM_NAME # The RTMP stream path
FFMPEG_PATH=c:\ffmpeg\ffmpeg.exe # The path to a custom ffmpeg binary (optional)

It's recommended to disable the RTMP feature if you aren't intending to stream from OBS. At the very least change the RTMP_SECRET

Demo

Click to view video

Images

Contribution

This repository was intended as a proof of concept however any issues or pull requests are welcome.

License

MIT

Made with 🍂 and 🐌