[Release] video-stream - Watch videos with your friends

Description

Watch videos with friends in FiveM.

Stream from path or rtmp server

WIP / POC

Install

Install should be handled by the yarn builder resource.
Add it to your server.cfg

If install fails you can do so manually with npm i and remove the yarn dependency from __resource.lua.

Config

Settings are in the .env file.

If you aren’t publishing from OBS you can disable the RTMP server RTMP_ENABLED=0
If you are, the github readme has more information.

  • PORT The port the http server should listen on (open this port)
  • RTMP_ENABLED Enable rtmp server for stream publish (i.e for OBS publish)
  • RTMP_PORT Port the optional rtmp server should listen on
  • RTMP_SECRET Auth param for stream publish.
  • STREAM_PATH RTMP stream path
  • FFMPEG_PATH (optional) path to the ffmpeg binary to use

Commands

  • video-stream teleport to cinema
  • video-stream:set “url” set stream url from path

Download

Preview

27 Likes

Hey so this sound really cool but can you please add some images and a video?

3 Likes

beast
approved, better than twitch

8 Likes

Thanks m8 this looks so cool

How good is the quality? and Sync is it decent sync or what?

You provide it a source url or filepath and it gets converted with ffmpeg to mpeg1 and then streamed over websockets. It’s a stream, it’s synced… You’ll need to judge performance yourself.

https://helpx.adobe.com/adobe-media-server/dev/stream-live-media-rtmp.html

how can I watch youtube videos?

You could use a youtube to mp4 site then stream that or add a browser instance to an obs scene.

2 Likes

Or you can right click then click copy link and paste in a tab then bamm you can use fullscreen :wink:

1 Like

just use an embed link

keeps saying couldnt start resource

1 Like

This is great

spoiler

11 Likes

so all i have to do is change the server ip and drag it in, start the resource and do the command right?

how can stream file or youtube link??
and i have this error how can fix it?
Error: Cannot find module ‘dotenv’
at Function.Module._resolveFilename (module.js:548:15)
at Function.Module._load (module.js:475:25)
at Module.require (module.js:597:17)
at require (internal/module.js:11:18)
at server.js:5:1
Failed to load script server.js.

Hey i dont know what to type on the streamUrl can anybody help me out?

EDIT:
I already figured it out

Any Ideas to play the audio just in the cinema? we could hear that trough the map^^

2 Likes

Hello,
Who can be help me please ?

How would I change the screen to a smaller prop/object and move the object to somewhere such as sandy airfield? As I’ve been trying for about 30 minutes. (The prop I’m trying to change it to is prop_flatscreen_overlay)

It’s a nice script overall but just wanted to know how to do the above.

Suggestion: Add a volume difference so when you walk away the volume of the stream gets quieter.

4 Likes

prop_flatscreen_overlay uses tvscreen as it’s rendertarget. Follow the example in the Using render targets thread; swap the tv model in the example.

I’ll have a look at audio issues people may be having in the future but likely won’t be adding audio fading. Jsmpeg is potato not a music player.

1 Like