Coder Social home page Coder Social logo

Comments (8)

jprjr avatar jprjr commented on July 20, 2024

Re: luarocks/lua - I usually install luarocks compiled against the luajit included with OpenResty, something like:

./configure \
  --prefix=/opt/openresty-rtmp \
  --with-lua=/opt/openresty-rtmp/luajit \
  --lua-suffix=jit \
  --with-lua-include=/opt/openresty-rtmp/luajit/include/luajit-2.1

The newer versions of OpenResty/LuaJIT have a hard time compiling the lua-cjson module, so I'll compile it against Lua 5.1. LuaJIT is compatible with Lua 5.1 modules.

That's good to know about the Debian version of luarocks not installing dependencies automatically, I've only really used the newer versions of luarocks which handle dependencies. I'll get the README updated with the full list of modules, and change it to use that --tree=lua_modules syntax, that way its compatible with newer and older luarocks.

The reason -e prod failed - the config.lua has a line like:

config({'development','production'}, {

And you need that parameter to match one of those environment names (the lapis docs have more info on keeping multiple environment's configs together). On my box, I use dev and prod and didn't think about how my names don't mass the example config. I've updated the systemd file to fix that description problem, and to use -e production.

Regarding checking logs, they should be under /var/log/syslog, systemd should automatically direct them there.

Another way to see why it won't go live: go into the Add/Remove accounts screen and change "require preview before going live" to "Yes"

Start pushing video, go into the Edit Metadata screen, and click "go live" - if there's an error, starting the video push, you'll see the error message via web interface. I can look into saving error messages so they're viewable in the web interface when "require preview" is "no."

from multistreamer.

jprjr avatar jprjr commented on July 20, 2024

Also, I'd double-check your DNS, I get two responses for that domain, only one seems to respond to ping etc:

So it could be OBS is connecting to the wrong IP?

Scratch all that, you've got wireshark showing you connected, I'm dumb.

EDIT: and I'm even more dumb, those DNS responses were from my router which tries to be helpful

from multistreamer.

bugz8unny69 avatar bugz8unny69 commented on July 20, 2024

Here's an update:

I almost gave up! I was digging through the filesystem to try to figure out why it was failing to connect with multistreamer; then it occur to me that multistreamer was running as it's own user and had it's own home directory /var/lib/multistreamer. Unfortunately it was a dead end or was it? I took a peek at nginx_production.conf to see if I could find anything useful and I did.

rtmp {
  server {
    listen 1935;
    chunk_size 4096;
    application multistreamer {
      live on;
      record off;
      meta copy;
      idle_streams off;

      on_publish http://127.0.0.1:8081/on-publish;
      on_publish_done http://127.0.0.1:8081/on-done;
      on_update http://10.0.0.12:8081/on-update;

      hls on;
      hls_path /var/lib/multistreamer/.multistreamer/hls;
      hls_nested on;
      hls_cleanup on;
      hls_continuous off;
      hls_fragment 10s;
      hls_playlist_length 60s;

    }
  }
}

Notice the Nginx parameters below:

on_publish http://127.0.0.1:8081/on-publish;
on_publish_done http://127.0.0.1:8081/on-done;
on_update http://10.0.0.12:8081/on-update;

That refer to:

private_http_url = 'http://127.0.0.1:8081',

Well, nothing was listening on 127.0.0.1:8081, and once I change private_http_url to http://10.0.0.12:8081. Viola, it worked! I tested streaming to Youtube, see https://www.youtube.com/watch?v=kpIiIY4PRmk&feature=youtu.be. The framedrop is because I am streaming 1080p60FPS using x264 and I am barely being able to multi-task here hehe.

Which begs my next question, what is the purpose of public and private url?

I was checking my hypervisor box CPU usage and saw multistreamer (ffmpeg) using about 1.2% of CPU and almost paniced because I misinterpred the graph. Assuming that it was using an entire core (DUMB ME).

Re: luarocks/lua - I usually install luarocks compiled against the luajit included with OpenResty, something like:

It seems that luarocks from OpenResty have compatibility issue with Debian lua5.1. See first error.

EDIT: and I'm even more dumb, those DNS responses were from my router which tries to be helpful

I have multistreamer running on a internal box on a internal domain lol. So yeah you wouldn't be able to reach it.

EDIT: The IRC widget doesn't seem to work here:

deepinscreenshot20170625153348

EDIT: One more thing, I checked out https://www.youtube.com/watch?v=HdDDtBOLme4. Am I reading this correctly? To connect to Youtube/Twitch, you need to get developer keys? ATM, I just setup custom RTMP urls.

Also, do you have a quick and dirty way to setup transcording? I'm assuming I need to create a new stream and use FFMPEG pull args?

It would be nice if this program could grow into creating nodes and manage streams centrally. 👍

EDIT: This might be useful:

root@rtmp:/usr/local/src/multistreamer# luarocks --tree=lua_modules install luaposix
Warning: Failed searching manifest: Failed fetching manifest for https://rocks.moonscript.org - Failed downloading https://rocks.moonscript.org/manifest

from multistreamer.

jprjr avatar jprjr commented on July 20, 2024

Which begs my next question, what is the purpose of public and private url?

The idea there is your public URL might be something that has to traverse a WAF or something like that. I wanted to make sure that internal notification calls don't unnecessarily leave the box. On my setup, I have multistreamer listening on 127.0.0.1 and have another instance of nginx listening on my public IPs, providing SSL, etc.

Re: keys - they're needed for dealing with stream metadata, pulling comments, and so on. If you use the custom RTMP URLs, you only push video (and nothing else!).

The default URL for the chat widget only shows publicly-visible YouTube/Facebook//etc comments - so if you're using the "custom rtmp" type there's nothing to show. If you remove "&hide_irc" from the widget URL, it'll show IRC messages, which is a handy way to do a quick "is this working at all" kind of test.

For transcoding, you wouldn't use the FFMPEG Pull Args (on the add/remove accounts screen), you'd want to use the FFMPEG Args on the "edit metadata" screen, or on the screen for changing the custom RTMP account settings. Basically, you can setup transcoding per-stream, or have transcoding setup for that account on every stream, by doing it at the account-level. (note: I still need to add the screen for setting up account-wide transcoding settings for the youtube/facebook/etc accounts).

Here's the FFPEG args I use for transcoding to Periscope:

-c:v libx264 -x264opts keyint=60 -preset veryfast -b:v 900k -vf scale=960:540 -c:a copy

Basically:

  • -c:v libx264 - encode to libx264
  • -x264opts keyint=60 - setting my keyframe interval to 2s (60 frames at 30fps). This is pretty dependent on your stream's settings
  • -preset veryfast - x264 has encoding presets, I forget them all - but they're the same presets you see in OBS if you enable advanced settings
  • -b:v 900k - set the video bitrate to 900kbps
  • -vf scale=960:540 - use a scale filter to 960x540 (periscope's preferred resolution)
  • -c:a copy - copy the audio as-is

The FFMPEG Pull Args are used when you have other stream you want to pull from, so you could use something like "-i http://some-website.com/stream.flv" if you have some other stream you want to pull into multistreamer.

from multistreamer.

bugz8unny69 avatar bugz8unny69 commented on July 20, 2024

Thanks for the info!

keys - they're needed for dealing with stream metadata, pulling comments, and so on. If you use the custom RTMP URLs, you only push video (and nothing else!).

My problem with this, like I had with Restream, is that I like to create my events which Restream was using Stream Now to stream. How does that work with Multistreamer? Can I specifically pick an event?

Re: FFMPEG: I will be streaming later on and I'll evaluate how transcoding performs.

from multistreamer.

jprjr avatar jprjr commented on July 20, 2024

Multistreamer uses events, but it doesn't try to read in any events - when you stream, it creates a new event on-the-fly.

On the "edit metadata" screen, you can setup the basic event details - like title, tags, category, and description. So then you go live, it will automatically update the event with those details.

The overall idea is to present "Live Now"-type functionality to the user, but for multiple accounts on a single page. That was the reason I started writing this, actually - I was dual-streaming to Twitch and YouTube using RTMP, and I hated having to pull up multiple websites for updating the stream metadata. And since I'd been using Twitch first, I was only used to the "live now" concept (I learned about YouTube events while writing the youtube module!).

I think I could implement an event-picker. I could just have a drop-down that lists any upcoming events, and include a "Create new" option, so picking "create new" would just keep the existing functionality, and picking an event would make Multistreamer ignore whatever you set for the title, description, etc, and just push video to that event.

from multistreamer.

jprjr avatar jprjr commented on July 20, 2024

Hey there! I've got a new release out (9.1.0) that supports YouTube events. It's listed in a drop-down on the dashboard, if you choose an event all the other metadata settings are ignored, it will just use whatever you've already put into the event.

from multistreamer.

bugz8unny69 avatar bugz8unny69 commented on July 20, 2024

Sorry about being MIA, I haven't live stream for quite awhile. I was going to deploy this on my OpenVZ CentOS boxed hosted on cloud provider until I read the title I created for this ticket. Damn!

I'll try to give it a shot and offer my findings as well using this ticket as a reference to work through installation issues! :-(

from multistreamer.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.