How do I change YOUTUBE Live Stream to another RTMP server url?

you can only start 1 stream with 1 jibri

you need multiple jibri instances, for the above tip to work

instead setup a NGINX rtmp proxy … way easier to implement

will this work with “rtmps” streams?

If it is supported by ffmeg, yes. But I’m not sure.

Hi,

 Could you provide any documents or steps for setup a NGINX rtmp proxy and achieve the multiple live steaming.

will do a write up a bit later…

2 Likes

Hi, I can’t edit previous post to correct it, so I write some modifications because previous script didn’t stop correctly.

New version:

#!/usr/bin/bash

COMANDO="/usr/bin/ffmpeg"

while test $# -gt 0
do
    T="$1"
    if [ "${T:0:32}" == "rtmp://a.rtmp.youtube.com/live2/" ]; then
	COMANDO="$COMANDO rtmp://my-server-for-rtmp:1935/sub-rtmp-url/${T:32}"
    else
	COMANDO="$COMANDO $T"
    fi
    shift
done

echo "Llamando a ffmpeg sustituyendo rtmp si hay: «$COMANDO»."

exec $COMANDO 
PROCESO_FFMPEG=$!

echo "Esperando finalización del proceso: ${PROCESO_FFMPEG}."
wait $PROCESO_FFMPEG

Bash (first line) must be same than results of:

$ which bash
/usr/bin/bash

More info in previous post.

3 Likes

thanks

was wondering why it didnt stop earlier and i usually do it twice

i know this is the spanish command set

what is the equivalent for PROCESO? Do i use PROCESS

i got COMMAND for COMANDO

Does this survive JItsi Meet packages updates ?

Yes, and sorry.

yes. this is a separate script. all it does is runs this script when ffmpeg is called by jibri

1 Like

I don’t understand you.

the question was if they updated jibri, will this script work OR be overwritten

Maybe take a closer look at the jibri service file.

In other packages the update overwrite them, so if a change there is needed then the change has to be re-applied after upgrade.

Cheers!

I’ve uninstalled, reinstalled and updated and I haven’t need to reapply service changes. Service configuration was preserved.

Yeah, but you are using the same version package right?

I’ve seen updates rewrite service files, maybe just the ones that have changes on service files.

I would backup anyway.

Regards

No, I was testing with stable, unstable and recompiled (making deb package from sources) packages.

Will wait that interesting info too!

I’ve written up the guide to stream to multiple rtmp destinations

thanks to @lodopidolo & @Woodworker_Life

5 Likes

If i use this script on my jibri, is this jibri still able to record ?

Quoting some advice,

DO THIS ONLY IF YOU KNOW WHAT YOUR’RE DOING

Please remember that changes might (or might not) break your system, and most of the instructions at this forum are considered to be done at your own risk.

Lastly, make backups, snapshots or apply on test instances, that said.

Test and enjoy!

Cheers!