2

This is the best my actioncam can create.

Rollei Wifi 5S

My goal is to take advantage of this low quality and save as much harddrive space as possible so visible quality remains.

Which measurements can I take using which windows programs to exploit the already low quality and save as much space as possible?

1 Answer 1

3

There are a few video quality metrics available for you to use, primarily SSIM and also PSNR. You can use ffmpeg to convert the video and then compare the output.

Step 1 Convert the video

ffmpeg -i actioncamfile -c:v libx264 -crf 23 -c:a copy -map 0 compressed.mp4

The CRF value modulates the quality. Lower values produce better quality but larger file sizes. Typical values range from 18 to 28, but absolute range is 0 to 51, but 0 being lossless, which will produce an exact looking file but will be bloated.

If you want to test with only a small section, say 20 seconds of the source starting from 15 seconds into the file, you can use

ffmpeg -ss 15 -i actioncamfile -t 20 -c:v libx264 -crf 23 -c:a copy -map 0 compressed.mp4

Step 2 Measure the quality of the conversion

Run

ffmpeg -i compressed.mp4 -i actioncamfile -lavfi "ssim;[0:v][1:v]psnr" -f null -

This command output, at its end, will display lines like this

[Parsed_ssim_0 @ 000000000039ad80] SSIM Y:0.984483 U:0.980458 V:0.980921 All:0.983219 (17.751712)
[Parsed_psnr_1 @ 0000000000398320] PSNR y:42.63 u:43.19 v:44.09 average:42.90 min:42.07 max:46.16

You can aim for a SSIM All value to be at least 0.99, or set your own benchmark, based on what's acceptable.

3
  • For some reason, All: stays at 0.7 no matter what crf is like between 18 and 37. My commands: pastebin.com/asQrmmq0 Feb 10, 2016 at 13:51
  • Try without -ss
    – Gyan
    Feb 10, 2016 at 13:54
  • If you are just looking at SSIM to be over 0.99, do you need to include ;[0:v][1:v]psnr in the command? Apr 3 at 3:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.