brarcher / video-transcoder

Android app for video and audio transcoder, based on FFmpeg
GNU General Public License v3.0
481 stars 57 forks source link

[Q] which x264 preset is used? #119

Closed utack closed 5 years ago

utack commented 5 years ago

Quick question, which x264 preset is currently being used? The default medium one?
According to newest findings the "faster" preset seems to offer the best speed<->quality balance:
https://streaminglearningcenter.com/blogs/saving-encoding-adjust-encoding-configuration-increase-capacity.html
It is found to be 70% faster than the default with quality difference that should not be perceptible
Maybe you could make sure it is the one this app uses?

brarcher commented 5 years ago

The default preset defined by FFmpeg is used, which is 'medium' [source].

Your suggestion is to override the default with 'faster', right? That does seem to be about the knee of the curve shown in that article. The article does give a convincing argument for the change. Making that change should be fairly straightforward. I'll look into it.

utack commented 5 years ago

VMAF is the Netflix method to determine quality, it should be very close to human perception.
I think on mobile where battery and performance is an issue, we should sacrifice the imperceptible bit of quality for the 70% more speed.
Thank you for looking into it!

Edit: However I find that for my 8 core phone there is barely any difference for 720p encoding, seems like the majority of time is used to decode the 1080p input

brarcher commented 5 years ago

Testing this myself I did observe that the 'faster' option was quicker. Take a look at the change in the next release and let me know your feedback if you have any.

utack commented 5 years ago

Thank you!
Did you check if the output looked different for you in any way?

licaon-kter commented 5 years ago

What's the size impact? It's nice that it takes less time to encode, but if we trade file size aka more time to send, it might not be a net gain.

utack commented 5 years ago

The article tested with the same bitrate, and the quality stayed the same
It should not have any impact

brarcher commented 5 years ago

The experiment that I ran used an example 1MB video file. Encoding with the preset of 'medium' resulted in a 660K file, and 'faster' resulted in a 664K file. I could not tell a difference in the files. The 'faster' file did encode a bit faster. All other settings were the same between the two files.