Files
danbooru/app/logical
evazion 7031fd13d7 ugoiras: encode .webm samples using VP9 instead of VP8.
Switch the codec for .webm samples from VP8 to VP9. All modern browsers
support VP9 (Safari was the last to add support in ~2020), so it should
be safe to provide only VP9 .webms without a fallback.

VP9 lets us use two-pass encoding, which should offer better compression.

Fixes ugoira samples still having poor quality even after 4c652cf3e.
4c652cf3e tried to remove the max bitrate limit by setting `-b:v 0`, but
this only worked in FFmpeg 4.2. In production Danbooru uses FFmpeg 4.4,
and apparently in 4.4 `-b:v 0` means "use the default max bitrate of
256kb/s" instead of "no bitrate limit".

https://trac.ffmpeg.org/wiki/Encode/VP9
https://developers.google.com/media/vp9/bitrate-modes
https://developers.google.com/media/vp9/settings/vod
http://wiki.webmproject.org/ffmpeg/vp9-encoding-guide
https://www.reddit.com/r/AV1/comments/k7colv/encoder_tuning_part_1_tuning_libvpxvp9_be_more/
2022-02-28 22:02:56 -06:00
..
2021-12-14 21:33:27 -06:00
2022-02-22 00:17:53 -06:00
2021-12-14 21:33:27 -06:00
2021-12-14 21:33:27 -06:00
2022-01-15 23:20:49 -06:00
2021-12-16 00:56:46 -06:00
2021-12-14 21:33:27 -06:00
2021-12-14 21:33:27 -06:00
2021-12-16 00:56:46 -06:00
2021-12-14 21:33:27 -06:00
2021-12-14 21:33:27 -06:00
2022-01-31 14:17:14 -06:00
2021-12-14 21:33:27 -06:00
2021-12-14 21:33:27 -06:00
2021-12-14 21:33:27 -06:00
2021-12-14 21:33:27 -06:00
2021-12-14 21:33:27 -06:00
2021-12-14 21:33:27 -06:00
2021-12-14 21:33:27 -06:00
2021-12-14 21:33:27 -06:00
2021-12-14 21:33:27 -06:00

Logical

This directory contains library code used through Danbooru. This includes things like defining API clients, dealing with sources, parsing tag searches, storing and resizing images, and so on.

Many of the files here use the Service Object pattern. Instead of putting complex code in models or controllers, it goes here, in plain old Ruby objects (POROs). This keeps models and controllers simpler, and keeps domain logic isolated and independent from the database and the HTTP request cycle.

External links