I'm attempted to stream an already recorded video file to twitch servers using FFMPEG but I only get audio so far no video. I've tried several settings, and different files (avi,etc) but I still get audio only. Here is my FFMPEG settings:
ffmpeg -re -i test.mp4 -vcodec libx264 -preset fast -crf 30 -acodec aac -ab 128k -ar 44100 -strict experimental -f flv rtmp://live-dfw.twitch.tv/app/"TWITCHKEY"
Has anyone nailed this? I'm using ffmpeg 0.8.17-6:0.8.17-1 under Ubuntu.
I'm not sure this needs so many options as the other answer. I have
ffmpeg -re -nostdin -i "$file" \
-vcodec libx264 -preset:v ultrafast \
-acodec aac \
-f flv rtmp://live.twitch.tv/app/STREAM_KEY
and it seems to be working ok so far. ultrafast
seems to be making my server melt less too.
The -re
flag tells ffmpeg to read settings from the input file, so don't see why -r
, -g
etc are needed.
ffmpeg -re -i ~/INPUT_FILE -vcodec libx264 -profile:v main -preset:v medium -r 30 -g 60 -keyint_min 60 -sc_threshold 0 -b:v 2500k -maxrate 2500k -bufsize 2500k -filter:v scale="trunc(oha/2)2:720" -sws_flags lanczos+accurate_rnd -acodec libfdk_aac -b:a 96k -ar 48000 -ac 2 -f flv rtmp://live.twitch.tv/app/STREAM_KEY
But please read the Twitch Rules of conduct before you post that Charle Sheen video.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With