caydey / ffshare

An android app to compress image, video and audio files through ffmpeg before sharing them
GNU General Public License v3.0
615 stars 30 forks source link

Support AV1 Codec #29

Closed gianni-rosato closed 1 year ago

gianni-rosato commented 1 year ago

Although not very fast right now, at least having the option would be great as AV1 gains widespread adoption in web browsers & apps everywhere. Even the rav1e AV1 encoder at speed 10 will produce decent results on a smartphone. See here:

ffmpeg -i input.mkv -pix_fmt yuv420p10le -c:v librav1e -qp 100 -speed 10 -tiles 4 -vf scale=720:720:force_original_aspect_ratio=increase:force_divisible_by=2:flags=lanczos:out_range=tv,format=yuv420p10le,setsar=1/1 -c:a copy output.mkv

I'm sure outputting as a WebM would be just as viable. I will add comments here if I find a faster config. This one currently runs at around 2fps on my Pixel 7.

caydey commented 1 year ago

2fps on a Pixel 7 is really bad speeds, ~5mins for a 10 second video. This could be possible once I implement #27