0

I like to compress large video files before storing them to hard disk. In Fedora-29-bash, I currently use the following ffmpeg command for re-encoding; it balances compression with quality:

ffmpeg -i $in_path -b:v 960k -bufsize 9600k -strict -2 $out_path

When executing the above command against a 2gb video file that has a 30 minute runtime, the execution will take about 20 minutes. My hardware is shown at the end of this query. Can this video re-encoding be sped up?

In other words, if I abandon ffmpeg in favor of any other software (e.g. handbrake), will I attain faster re-encoding? Based on my experiences copying files via bash (e.g. the cp or rsync commands) vs using the (nemo) file manager, my intuition is that nothing will beat the bash-ffmpeg performance.

I am submitting this query just to double check my intuition.

My Hardware

os         :  64 bit fedora 29
cpu        :  Intel I5-4440 Processor BX80646I54440
mobo       :  (64 bit) Gigabyte H97 SATA Express M.2 SSD UEFI DualBIOS  
           :  DDR3 1600 LGA
memory     :  32 gb : 2 x [G.Skill F3-1600C10D-16GAO Ares 16GB (2x8GB) 
           :  DDR3-1600Mhz Memory RAM]
psu        :  corsair cx series 600 watt
hdisk      :  1tb internal western digital wd10ezex sata
video card :  none - I use mobo's onboard video at 1920x1080.
sound card :  none - I use mobo's onboard audio
2
  • Which format are you saving to? MP4? MKV?
    – Gyan
    Mar 25, 2019 at 4:38
  • @Gyan Although my understanding is that mkv is superior, mp4 gives me good video, so that is what I am saving to. Mar 25, 2019 at 21:36

1 Answer 1

1

For MKV or MP4, the default video codec is libx264, which has a set of presets, with different speed and quality tradeoffs. The default preset is medium. You can switch to a faster preset like veryfast. See list at https://trac.ffmpeg.org/wiki/Encode/H.264#crf

1
  • Interesting answer, thanks. I wonder who downvoted my query, and why. Mar 26, 2019 at 12:22

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .