ffmpegvideo-streamingstreamingip-cameratwitch

Streaming a stream from website to Twitch with FFMPEG


Is it possible to stream a website with a livestream (i.e. ip-camera) via FFMPEG to Twitch? If yes, does anybody know how to achieve this?


Solution

  • Yes. FFmpeg has a built-in RTMP client (which is the protocol you'll use to send your video data to Twitch), FLV (the wrapper for your audio and video data), H.264 (the video codec), and AAC (the audio codec).

    First, find your RTMP ingest URL: https://help.twitch.tv/s/twitch-ingest-recommendation

    Now, just run FFmpeg as you normally would to ingest your input, but set some additional parameters for the output:

    ffmpeg [your input parameters] -vcodec libx264 -b:v 5M -acodec aac -b:a 256k -f flv [your RTMP URL]