av1encode
This commit is contained in:
parent
e8a57d883c
commit
61e2b5e1e6
1 changed files with 24 additions and 0 deletions
24
functions/av1encode.fish
Normal file
24
functions/av1encode.fish
Normal file
|
@ -0,0 +1,24 @@
|
|||
function av1encode
|
||||
if test (count $argv) -lt 1
|
||||
echo "Usage: av1encode <input-file> [crf] [preset]"
|
||||
return 1
|
||||
end
|
||||
|
||||
set input $argv[1]
|
||||
set crf (or $argv[2] 28)
|
||||
set preset (or $argv[3] 6)
|
||||
|
||||
set base (basename $input)
|
||||
set name (string replace -r '\.[^.]+$' '' $base)
|
||||
set output "$name.av1.mkv"
|
||||
|
||||
echo "Encoding: $input -> $output (CRF $crf, preset $preset)..."
|
||||
|
||||
ffmpeg -i "$input" \
|
||||
-map 0 \
|
||||
-c:v libsvtav1 -crf $crf -preset $preset \
|
||||
-c:a libopus \
|
||||
-c:s copy \
|
||||
-movflags +faststart \
|
||||
"$output"
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue