Broadcast stream directly in my rtmp server

Hi , I need to directly broadcast in my RTMP server , I wanted to change the YouTube RTMP URL without building the jitsi from scratch , its possible in previous version of jitsi with the help of additional configuration from ffmpeg , but now it doesn’t seems to be working , can anyone help with this

Here is the previous working configuration

Did you try to set your custom RTMP link as stream key?

I dont want things like that , and ofcos its working by that way , I am looking to change rtmp url from backend , for example if I enter “meetin72” as a stream key , it should broadcast directly to rtmp://192.168.0.1/live/lmeeting72

  • Create a fake ffmpeg in /usr/local/bin directory
  • Set the execute permission using chmod
  • Edit the code according to your previous script.
    See also fake ffmpeg sample

Did this , but not working , can you write and send exact ffmpeg script with my above mentioned exact use case scenarios

Are you sure your fake ffmpeg is triggered?
You may add a log command into the script and check the log after starting the stream.

New here , how can I do that?

You may use the sample fake ffmpeg which I sent in my previous post and check the log file which is /tmp/ffmpeg.log

Log is not there , does this mean , script doesn’t trigger???

If you use the sample ffmpeg code and if there is no log, this means that it is not triggered.

then , how can i fix it??

Hey emrah , can you just please send a example script , lets say my rtmp url is “rtmp:///100.00.00.1/live”

First, you need to solve the untriggred script issue.

You may check $PATH for jibri user

How?

I , genuinely need help , now this script is working in my other old server with older jitsi installed, but dont know why not working with the same steps in fresh installation of jitsi

#!/bin/bash

COMMAND="/usr/bin/ffmpeg"

while test $# -gt 0
do
    T="$1"
    if [ "${1:0:32}" == "rtmp://a.rtmp.youtube.com/live2/" ]; then
        # T  will contain the rtmp key from jitsi meet page. Make sure you use the correct IP Address OF the rtmp server you setup earlier
        COMMAND="$COMMAND rtmp://myserver.com/live/${T:32}"             
    else
        COMMAND="$COMMAND $T"
    fi
    shift
done

echo "RUNNING FFMPEG: «$COMMAND»."

exec $COMMAND
PROCESS_FFMPEG=$!

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

First you must be sure if it is triggered or not… Change the script like the following:

#!/bin/bash

COMMAND="/usr/bin/ffmpeg"
echo "Hello from fake ffmpeg"
exit

Then switch to jibri account and try to run ffmpeg. What do you see?

su -l jibri
ffmpeg

this is what I see

ffmpeg version 4.2.7-0ubuntu0.1 Copyright (c) 2000-2022 the FFmpeg developers
  built with gcc 9 (Ubuntu 9.4.0-1ubuntu1~20.04.1)
  configuration: --prefix=/usr --extra-version=0ubuntu0.1 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --arch=amd64 --enable-gpl --disable-stripping --enable-avresample --disable-filter=resample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librsvg --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opencl --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-nvenc --enable-chromaprint --enable-frei0r --enable-libx264 --enable-shared
  libavutil      56. 31.100 / 56. 31.100
  libavcodec     58. 54.100 / 58. 54.100
  libavformat    58. 29.100 / 58. 29.100
  libavdevice    58.  8.100 / 58.  8.100
  libavfilter     7. 57.100 /  7. 57.100
  libavresample   4.  0.  0 /  4.  0.  0
  libswscale      5.  5.100 /  5.  5.100
  libswresample   3.  5.100 /  3.  5.100
  libpostproc    55.  5.100 / 55.  5.100
Hyper fast Audio and Video encoder
usage: ffmpeg [options] [[infile options] -i infile]... {[outfile options] outfile}...

This means that the fake ffmpeg isn’t triggered.

  • where do you put this script?
  • Does it run when using the full path? like /usr/local/bin/ffmpeg
  • Is the path in Jibri’s $PATH?
su -l jibri
echo $PATH
  1. its in /opt/util/ffmpeg
    2.still no
    3./usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin