Last active
April 14, 2022 15:47
-
-
Save NeoChen1024/0d12d63b545717ed781e63a20cbbf1de to your computer and use it in GitHub Desktop.
Encode very low bitrate video / audio (H.265 / OPUS)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
VB="16k" | |
VBV="24k" | |
AB="8k" | |
time nice -n 20 ffmpeg -i "$1" -c:a libopus -ac 1 -b:a "$AB" -c:s srt -c:v libx265 -preset:v veryslow -profile:v main -x265-params "strict-cbr=1" -b:v "$VB" -minrate:v "$VB" -maxrate:v "$VB" -bufsize "$VBV" -vsync vfr -r 10 -filter:v "format=yuv420p,scale=-1:180,pad=ceil(iw/2)*2:ceil(ih/2)*2" "$2" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment