简体   繁体   中英

What is the recommended settings for video editing using ffmpeg?

I am quite new for using FFmpeg , and I am using FFmpeg in screen recording. I checked the online documentation in this link ffmpeg documentation "Capturing your Desktop / Screen Recording" , but I didn't find sufficient information.

I have a 4k laptop with invidia GPU, and I am using the below command to screencast the video (4k, 60 f/s), and audio from my laptop.

ffmpeg -video_size 3840x2160 \
 -framerate 60 \
 -f x11grab -i :1 -f pulse -ac 2 -i default \
 -c:v libx264 \
 -crf 0 \
 -qp 0 \
 -preset ultrafast videoname.mp4

I have some problems in these settings as following:

  1. The output video is too large, and I need to reduce the size without touch the quality at all.
  2. The output video seems to be not a row video, and it takes too much time in video editing decoding and encoding. I am not sure if there is a recommended setting for video editing. As I did some search and found the above is advised, but in practice perspective, it is not efficient.

Below is my Linux distro information:

Distributor ID: Ubuntu
Description   : Ubuntu 20.04.1 LTS
Release       : 20.04
Codename      : focal

Use a proxy

4k footage is often edited by using a smaller (1280x720 for example) proxy video. This allows the editor to be more responsive and less slow during the editing process. When the final edited video is exported the editing software will refer to the original 4k footage to create the output, so using a proxy does not reduce the quality of the final output.

Intra-frame H.264:

ffmpeg -i input.mp4 -vf "scale=-2:720,format=yuv420p" -c:v libx264 -crf 18 -preset fast -tune fastdecode -g 1 -c:a copy -movflags +faststart output.mp4

If you prefer ProRes:

ffmpeg -i input.mp4 -vf "scale=-2:720" -c:v prores_ks -profile:v proxy -c:a pcm_s16le output.mov

Refer to the documentation for your editor to see if this is an option for you.

you coul could use -crf 17 as that is visually indistinguishable and way faster

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM