Skip to content

Commit

Permalink
Add hevc change
Browse files Browse the repository at this point in the history
  • Loading branch information
remino committed Mar 31, 2024
1 parent 69b0ada commit 71cee94
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions vidmod
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ vidmod_main() {
change="$( echo "$1" | tr '[:upper:]' '[:lower:]' )"

case "$change" in
169|43|60fps|audio|butter|crop219|crossfade|loop|mono|mp4|mute|qt|reverse|rotate90|rotate180|rotate270|slowdown|twitter)
169|43|60fps|audio|butter|crop219|crossfade|hevc|loop|mono|mp4|mute|qt|reverse|rotate90|rotate180|rotate270|slowdown|twitter)
output="$( _add_tag "$input" "$change" )"
[ "$input" = "$output" ] && return
[ -z "$final" ] && echo "=> $output" || echo "=> $change"
Expand Down Expand Up @@ -80,8 +80,8 @@ Do rapid changes to video files using ffmpeg or other tools.
CHANGES:
169, 43, 60fps, audio, butter, crop219, crossfade, loop, mono, mp4, mute,
qt, reverse, rotate90, rotate180, rotate270, slowdown, twitter
169, 43, 60fps, audio, butter, crop219, crossfade, hevc, loop, mono, mp4,
mute, qt, reverse, rotate90, rotate180, rotate270, slowdown, twitter
OPTIONS:
Expand Down Expand Up @@ -127,6 +127,11 @@ vidmod_crossfade() {
vidcrossfade -f 2 -o "$output" "$input"
}

vidmod_hevc() {
# shellcheck disable=SC2086
ffmpeg -y -i "$input" -c:v libx265 -c:a aac -tag:v hvc1 $ffmpeg_opts "$output"
}

vidmod_loop() {
tmpfile="$( mktemp ".$scriptname.XXXXXX" )"

Expand Down Expand Up @@ -216,7 +221,7 @@ _add_tag() {
inext="$( echo "$inname" | grep -o '\.[^.]*$' )"

case "$tag" in
mp4|qt) echo "$outputdir/$innoext.mp4" ;;
hevc|mp4|qt) echo "$outputdir/$innoext.mp4" ;;
*) echo "$outputdir/$innoext-$tag$inext" ;;
esac
}
Expand Down

0 comments on commit 71cee94

Please sign in to comment.