0

Using FFmpeg on Devuan derivative: ffmpeg version I have been struggling to record desktop with ffmpeg, below are my attempts so far.

Script 1

ffmpeg -f x11grab -i :0.0 -vcodec libx264 -pix_fmt yuv420p -loglevel warning -r 12 ~/Videos/screencast_$(date +%s).mp4

Records only partial region x=0, y=0

partial recording

Desktop Resolution current resolution

Script 2

Another attempt with -s or -video_size option:

ffmpeg -s $(xdpyinfo | grep 'dimensions:'|awk '{print $2}') -f x11grab -i :0.0 -vcodec libx264 -pix_fmt yuv420p -loglevel warning -r 12 ~/Videos/screencast_$(date +%s).mp4

Above partial recording gets scaled to 1376x770, instead of capturing entire screen

scaled video

Log dumped by ffmpeg with above #script 2 warning

Script 3

With -frame_size option, results are same as #script 1

ffmpeg -frame_size $(xdpyinfo | grep 'dimensions:'|awk '{print $2}') -f x11grab -i :0.0 -vcodec libx264 -pix_fmt yuv420p -loglevel warning -r 12 ~/Videos/screencast_$(date +%s).mp4

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.