video - FFMPEG YouTube Live Too Fast -
so streaming video , audio youtube follows
the context
1. first convert graphic gif mp4 file
ffmpeg -f gif -i graphic.gif -c:v libx264 -pix_fmt yuv420p -vf scale=1280:-1 temp.mp4
2. overlay png text on mp4
ffmpeg -i temp.mp4 -i overlay.png -filter_complex "overlay=10:10" '.$graphicspath.'/graphic.mp4
3. start stream video , combine audio using following code (sources.txt concat list *)
ffmpeg -f concat -i sources.txt -i music.mp3 \ -c:v libx264 -c:a aac -shortest -deinterlace \ -pix_fmt yuv420p -preset '.$encoding.' -r 30 -g 60 -b:v 2500k \ -acodec libmp3lame -ar 44100 -threads 6 -qscale 3 -b:a 712000 \ -maxrate 800k -bufsize 1400k \ -f flv rtmp://a.rtmp.youtube.com/live2/key
4. after stream ends, code starts on again new song mimic 247 stream.
the issue
so issue having appears streaming fast. it's opposite of buffering issues buffer way long (as in full song buffered time first 1 has finished if open stream)
does know how throttle output? have tried maxrate
, bufsize
no real result.
* sources.txt example file 'graphic.mp4'
file 'graphic.mp4'
file 'graphic.mp4'
file 'graphic.mp4'
file 'graphic.mp4'
file 'graphic.mp4'
, on
ffmpeg process input fast possible. slow down real time, add '-re' flag when streaming rtmp
Comments
Post a Comment