1. fps="-r 15" \
  2. vid="screencast"; \
  3. crf="23"; \
  4. preset="slower"; \
  5. pushd /tmp/ && \
  6. ffmpeg -y -f x11grab -show_region 1 -s 1920x1080 -i :0.0+0,0 -an -c:v libx264 -preset ultrafast -qp 0 -threads 0 /dev/shm/${vid}.mp4 && \
  7. ffmpeg -y -ss 00:00:02 -i /dev/shm/${vid}.mp4 -an -c:v libx264 -preset ${preset} -crf ${crf} -s 1920x1080 -s hd720 -sws_flags lanczos -threads 0 ~/${vid}_${crf}crf_${preset}_`date +%F_%H%M%S`.mp4 && \
  8. popd && ls -l /dev/shm/${vid}*.mp4 && ls -l ~/${vid}*.mp4 && rm --interactive /dev/shm/${vid}*.mp4
Comments powered by Disqus