Skip to content

Commit 7880364

Browse files
kevinmcmurtriebenoit74
authored andcommitted
Update presets.py
Better tuning for very low motion and very high motion.
1 parent d143c98 commit 7880364

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

src/zimscraperlib/video/presets.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ class VideoWebmLow(Config):
3232
"""Low Quality webm video
3333
3434
480:h format with height adjusted to keep aspect ratio
35-
200k target, 300k max video bitrate
35+
128k target video bitrate but stay within quality boundaries.
3636
48k audio bitrate"""
3737

3838
VERSION = 1
@@ -43,10 +43,9 @@ class VideoWebmLow(Config):
4343
options: ClassVar[Dict[str, Optional[Union[str, bool, int]]]] = {
4444
"-codec:v": "libvpx", # video codec
4545
"-quality": "best", # codec preset
46-
"-b:v": "200k", # target video bitrate
47-
"-maxrate": "300k", # max video bitrate
48-
"-bufsize": "512k", # target bitrate window
49-
"-qmax": "30", # Max quantizer scale. Cap loss to reduce VP8 shimmer bug.
46+
"-b:v": "128k", # Adjust quantizer within min/max to target this bitrate
47+
"-qmin": "18", # Reduce the bitrate on very still videos once the quality is good enough.
48+
"-qmax": "40", # Increase the bitrate on very busy videos once the quality degrades too much. Also reduce key shimmer bug.
5049
"-vf": "scale='480:trunc(ow/a/2)*2'", # frame size
5150
"-codec:a": "libvorbis", # audio codec
5251
"-ar": "44100", # audio sampling rate

0 commit comments

Comments
 (0)