m1k1o / neko

A self hosted virtual browser that runs in docker and uses WebRTC.
https://neko.m1k1o.net/
Apache License 2.0
7.24k stars 532 forks source link

RTMP is unable to stream in any other bitrate/framerate other than the default #429

Open ScarsTRF opened 2 weeks ago

ScarsTRF commented 2 weeks ago

Currently I'm trying to stream some HD content using the RTMP feature, but I can't seem to grasp where to change the RTMP bitrate or framerate. It seems locked to 30 even though the screen in the webUI is set to 60. Having a option on the webUI for the bitrate and framerate would be welcomed.

m1k1o commented 2 weeks ago

You can set custom broadcast pipeline in config and adjust all parameters of gstreamer.

https://neko.m1k1o.net/#/getting-started/configuration?id=neko_broadcast_pipeline

ScarsTRF commented 2 weeks ago

Alright, Out of curiosity, What is the default set stuff for that parameter anyways? Can't seem to find it anywhere to just modify it.

Edit: Just wondering as I keep getting an error even using this Pipeline here (pipeline error) no property "device" in element "rtmpsink0"

ScarsTRF commented 2 weeks ago

Ok... after sitting with this for a bit I finally got it. It seems setting NEKO_BROADCAST_PIPELINE will make the application completely ignore the WebUI URL input completely. Each time I would change it and try it, the URL would be empty, but as soon as I added NEKO_BROADCAST_URL It worked right out of the box. Only issue now is swapping the stream URL mid session no longer works either. Setting the URL to something to another server, endpoint, whatever, it will still stream to the same URL no matter the input of WebUI

m1k1o commented 1 week ago

You need to use {url} placeholder in your broadcast pipeline. A good example is here: https://neko.m1k1o.net/#/getting-started/?id=nvidia-gpu-acceleration

NEKO_BROADCAST_PIPELINE: "flvmux name=mux ! rtmpsink location={url} pulsesrc device={device} ! audio/x-raw,channels=2 ! audioconvert ! voaacenc ! mux. ximagesrc display-name={display} show-pointer=false use-damage=false ! video/x-raw,framerate=30/1 ! videoconvert ! queue ! video/x-raw,format=NV12 ! nvh264enc name=encoder preset=low-latency-hq gop-size=25 spatial-aq=true temporal-aq=true bitrate=2800 vbv-buffer-size=2800 rc-mode=6 ! h264parse config-interval=-1 ! video/x-h264,stream-format=byte-stream,profile=high ! h264parse ! mux."
ScarsTRF commented 1 week ago

You need to use {url} placeholder in your broadcast pipeline.

Thing is, I did, yet the output of the logs and everything else was null, I wasn't getting anything from the WebUI when enabling the stream which is odd.

And the parameter you gave me here is the exact thing I tried yet got the same odd issue...

If you'd like for me to provide a clip for what I'm trying to say, I'd be glad to, just let me know.

m1k1o commented 1 week ago

Could you try with m1k1o/neko:v3? Same configuration. Just to know if it works in the upcoming release.