GoLive with facebook rtmps transport issue using ffmpeg

1k Views Asked by At

I am having an issue trying to figure out facebook rtmps Go Live suitable configuration for ffmpeg with below configuration without success!

rtmpUrls = `[f=flv]rtmp://a.rtmp.youtube.com/live2/xxxxxxx|[f=flv]rtmps://live-api-s.facebook.com:443/rtmp/xxxxxxxx`;
    });

        this.ffmpeg = child_process.spawn('ffmpeg', [

          // FFmpeg reads the input from STDIN write
          '-i', '-',
           '-flags', '+global_header',
          '-vcodec', 'copy',

          // AAC audio is required for Facebook Live.
          '-acodec', 'libfdk_aac',
          //'-ab', '32k', 
          //'-ar', '44100',
          '-bsf:a', 'aac_adtstoasc',

          '-framerate', '60',
          '-g', '30',

          '-f', 'tee', 
          '-map', '0:v',
          '-map', '0:a',
          // The output RTMPs.
          rtmpUrls
        ]);

I received this from facebook events log

Facebook has not received video signal from the video source for some time. Check that the connectivity between the video source and Facebook is sufficient for the source resolution and bitrate. Check your video encoder logs for details. If problems persist, consider improving connection quality or reducing the bitrate of your video source.

When i change the framerate from 60 to 30, it will flash a black blank screen trying to receive signal and then immediately go back to default page. While youtube works flawlessly!

This is the log coming ffmpeg, but the log also comes when with only youtube rtmp. log

1

There are 1 best solutions below

0
General Omosco On

The problem was with ffmpeg which doesn't include openssl enable from yum built package by default. So, I uninstalled the ffmpeg package and get it installed from source using below command-line before everywhere could worked fine.

PKG_CONFIG_PATH="$HOME/ffmpeg_build/lib/pkgconfig" ./configure --prefix="$HOME/ffmpeg_build" --extra-cflags="-I$HOME/ffmpeg_build/include" --extra-ldflags="-L$HOME/ffmpeg_build/lib -ldl" --bindir="$HOME/bin" --pkg-config-flags="--static"  --enable-gpl --enable-nonfree --enable-libfdk_aac --enable-pthreads --enable-libass --enable-libfreetype --enable-libmp3lame --enable-libopus --enable-libvorbis --enable-libvpx --enable-libx264 --enable-filters --enable-openssl --enable-runtime-cpudetect --extra-version=ffmpeg --disable-shared --enable-static