georgmartius / vid.stab

Video stabilization library
http://public.hronopik.de/vid.stab/
Other
850 stars 109 forks source link

How to use single pass for video livestream with FFMPEG? #105

Closed gunslinger closed 3 years ago

gunslinger commented 3 years ago

Hello,

can I know how to use vidstab with single pass for video live stream with ffmpeg? I use rtmp as an input and send it to rtmp as an output in my ffmpeg command.

currently I use this command :

/usr/local/bin/ffmpeg -i rtmp://localhost:1935/live/$name -s 1280x720 -r 60 -f flv -ac 2 -b:a 360k -ar 44100 -vcodec libx264 -g 120 -keyint_min 60 -b:v 6000k -minrate 6000k -rc-lookahead 60 -preset medium -profile:v high -level 4.1 -x264-params "nal-hrd=cbr:analyse=all:no-scenecut=1" -direct-pred spatial -deblock -3:2 -maxrate 6000k -pix_fmt yuv420p -s 1280x720 -acodec aac -threads 0 -strict normal -bufsize 6000k rtmp://128.199.185.238/live/;

georgmartius commented 3 years ago

Hi Yuda,

single pass is not supported at the moment. I only had a single pass version for transcode. The problem is that the one would need to buffer some frames to look into the future, but his is not supported by ffmpeg.

Georg