0

I want to reduce WEBP file size. I'm using https://github.com/tanersener/ffmpeg-kit library to convert my video .mp4 to .webp
Input File MP4 Size - 800kb
Output File WEBP size - 5.22 MB

Commands which i used

ffmpeg.exe -i outputbitrate.mp4 -vcodec libwebp -filter:v fps=fps=20 -lossless 1 -loop 0 -preset default -an -vsync 0 -vf scale=512:512:force_original_aspect_ratio=decrease,format=rgba,pad=512:512:-1:-1:color=#00000000 finalout.webp

I tried with compress_level,quality also. which is not reducing the output size.
in mycase, the output should be less then 512kb. how to achieve this.

Any articles or sample code will be very helpful. Thanks

Dev007
  • 222
  • 2
  • 9
  • Are you using `-lossless 1` intentionally? Is the input mp4 file also lossless? – kesh Mar 03 '22 at 19:51
  • @kesh probably No, i'm directly trimming the video 10 seconds with following command `-i input.mp4 -ss 00:00 -to 10:00 -r $FRAME_RATE -preset ultrafast output.mp4` and doing bitrate compress `fmpeg -i input.mp4 -b 800k output.mp4 ` – Dev007 Mar 04 '22 at 03:58
  • Check out [this ffmpeg wiki article](https://trac.ffmpeg.org/wiki/Encode/VP9). I think it'll help your need. Definitely remove the lossless flag. – kesh Mar 04 '22 at 04:14
  • hey @kesh, tried that , same output same file size. i think ffmpeg already doing that itself. – Dev007 Mar 04 '22 at 16:46
  • Delete “-preset default”. It overrides your prams – cengaver Nov 16 '22 at 08:31

0 Answers0