Stackposts Documentation Stackposts Documentation
  • Stackposts Documentation 2022
    • Stackposts | Social Marketing Tool
    • Waziper – WhatsApp Marketing Tool
  • FAQs
  • Download
  • Blog
  • Help Center
Get Support
Stackposts Documentation Stackposts Documentation
Get Support
Stackposts Documentation
  • Stackposts Documentation 2022
    • Stackposts | Social Marketing Tool
    • Waziper – WhatsApp Marketing Tool
  • FAQs
  • Download
  • Blog
  • Help Center

Docy

Stackposts | Social Marketing Tool (Main Script)

  • Folder icon closed Folder open iconStart Here!
    • License
  • Folder icon closed Folder open iconInstallation
    • Requirements
    • Install Detailed Steps
    • Configure Cron Jobs
    • Installing modules
  • Folder icon closed Folder open iconConfigure Facebook API App
  • Folder icon closed Folder open iconConfigure Twitter API App
  • Folder icon closed Folder open iconLogin Stackposts with Google
  • Folder icon closed Folder open iconPayment Gateways
    • Configure PayPal
    • Configure Stripe
  • Folder icon closed Folder open iconHow to
    • Install FFMPEG
    • How to Edit The Home Page
    • How to Use Blog for Stackpost
    • Edit Privacy Policy & Terms of Services Page
    • Compile FFmpeg with RTMPS for Facebook Live Stream
    • How to Change the TIMEZONE
    • How to Enable HTTPS for Stackposts?
    • How to Change your Logo on Stackpost?
    • How to Get Latest Updates on Stackpost?
    • How to use Package Manager on Stackposts?
    • How to Get the Latest Version Stackposts?
    • How to Configure Google Drive Integration?
    • How to use Spintax on Stackposts?
  • Folder icon closed Folder open iconMulti Language
  • Folder icon closed Folder open iconProblems & Solutions
    • Checkpoint Required on Instagram
  • Folder icon closed Folder open iconFrequently Asked Questions
    • Before Purchase
    • After Purchase
  • Folder icon closed Folder open iconConfigure API App
  • Folder icon closed Folder open iconSocial Login

Compile FFmpeg with RTMPS for Facebook Live Stream

Estimated reading: 3 minutes

Facebook announced that “Live Video streams on Pages and Workplace can use the non-encrypted standard RTMP protocol until November 1st, 2019, after which RTMP will no longer be supported”.

On May 1st, 2019, the Real-time Messaging Protocol (RTMP) has been deprecated from the Live API, GoLive Dialog, and Publisher Pages. RTMPS (RTMP over a TLS/SSL connection) will continue to be supported.

Live streaming to facebook need RTMPS, but unfortunately most FFmpeg not enable openssl which need.

Table of Contents

  • Install the dependencies
  • Prepare source code
  • Configuration
  • Build
  • Try

Install the dependencies

apt-get -y install build-essential autoconf automake cmake libtool git checkinstall nasm yasm libass-dev libfreetype6-dev libsdl2-dev libtool libva-dev libvdpau-dev libvorbis-dev libxcb1-dev libxcb-shm0-dev libxcb-xfixes0-dev pkg-config texinfo wget zlib1g-dev libchromaprint-dev frei0r-plugins-dev ladspa-sdk libcaca-dev libcdio-paranoia-dev libcodec2-dev libfontconfig1-dev libfreetype6-dev libfribidi-dev libgme-dev libgsm1-dev libjack-dev libmodplug-dev libmp3lame-dev libopencore-amrnb-dev libopencore-amrwb-dev libopenjp2-7-dev libopenmpt-dev libopus-dev libpulse-dev librsvg2-dev librubberband-dev librtmp-dev libshine-dev libsmbclient-dev libsnappy-dev libsoxr-dev libspeex-dev libssh-dev libtesseract-dev libtheora-dev libtwolame-dev libv4l-dev libvo-amrwbenc-dev libvpx-dev libwavpack-dev libwebp-dev libx264-dev libx265-dev libxvidcore-dev libxml2-dev libzmq3-dev libzvbi-dev liblilv-dev libmysofa-dev libopenal-dev opencl-dev gnutls-dev libfdk-aac-dev

Prepare source code

#clone source code (parameter list)
#git clone https://git.ffmpeg.org/ffmpeg.git ffmpeg
#git checkout 4154f89

wget https://github.com/FFmpeg/FFmpeg/archive/n4.1.3.tar.gz
tar -xvf n4.1.3.tar.gz

cd FFmpeg-n4.1.3

Configuration

To use RTMPS, module “openssl” is require.

sample 1

./configure --disable-shared --enable-static --enable-pthreads --enable-gpl --enable-nonfree --enable-libass --enable-libfdk-aac --enable-libfreetype --enable-libmp3lame --enable-libopus --enable-libvorbis --enable-libvpx --enable-libx264 --enable-filters --enable-openssl --enable-runtime-cpudetect --extra-version=patrickz

sample 2

./configure --disable-shared --enable-static --enable-pthreads --enable-nonfree --enable-version3 --enable-hardcoded-tables --enable-avresample --enable-ffplay --enable-gpl --enable-libmp3lame --enable-libopus --enable-librubberband --enable-libsnappy --enable-libtesseract --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libx265 --enable-libxvid --enable-libfontconfig --enable-libfreetype --enable-frei0r --enable-libass --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-librtmp --enable-libspeex  --disable-libjack --disable-indev=jack --enable-libsoxr --enable-openssl --enable-runtime-cpudetect --extra-version=patrickz

Build

make
make install

Please note that “make install” may replace (ffmpeg) old one or affect your current version. You can use absolute path (i.e. /root/FFmpeg-n4.1.3/ffmpeg) until you sure that it work as expected.

Try

./ffmpeg -f lavfi -re -i "life=s=300x200:mold=10:r=25:ratio=0.1:death_color=#C83232:life_color=#00ff00,scale=1200:800:flags=16" -f lavfi -re -i sine=frequency=1000:sample_rate=44100 -pix_fmt yuv420p -c:v libx264 -b:v 1000k -g 30 -keyint_min 120 -profile:v baseline -preset veryfast -c:a aac -b:a 96k  -f flv "rtmps://live-api-s.facebook.com:443/rtmp/{YOUR STREAM KEY}"

I use FFmpeg Filters to simulate as a video source. Don’t forget to change {YOUR STREAM KEY} to your stream key then enter the command.

FFmpeg stream to facebook

If you see a screen as above, seems it work and you could see the incoming video stream on the Facebook Live control panel.

Now you can live streaming to Facebook with RTMPS. Hope you enjoy it. Have a nice day!

—-

Please open the ticket here to get support detail from our developer team.

Still stuck? How can we help?

How can we help?

A premium WordPress theme with integrated Knowledge Base, providing 24/7 community based support

Was this page helpful? Yes No

Powered By Stackposts

Leaf Illustration

© 2022 All Rights Reserved by Stackposts