Skip to content

Commit

Permalink
ffmw#optimize: first check for stream information, then for .original
Browse files Browse the repository at this point in the history
  • Loading branch information
XPhyro committed Jan 23, 2024
1 parent d6e8a74 commit 23fd8ef
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/sh/soft-wrapper/ffmw
Original file line number Diff line number Diff line change
Expand Up @@ -917,14 +917,14 @@ optimize() {
exit 1
}
[ "$norepeat" = "1" ] && {
[ "$backup" = "1" ] && [ -f "$fl.original" ] && {
printf "File [%s] already has an original variant, skipping.\n" "$fl" >&2
ffprobe -hide_banner -v error -select_streams v:0 -show_entries stream_tags=encoder -of default=nokey=1:noprint_wrappers=1 -i "file:$fl" | grep -Exq 'Lavc[0-9.]+\s+libx265' && {
printf "File [%s] is already encoded with libx265, skipping.\n" "$fl" >&2
printf "%s\n" "$fl"
continue
}
ffprobe -hide_banner -v error -select_streams v:0 -show_entries stream_tags=encoder -of default=nokey=1:noprint_wrappers=1 -i "file:$fl" | grep -Exq 'Lavc[0-9.]+\s+libx265' && {
printf "File [%s] is already encoded with libx265, skipping.\n" "$fl" >&2
[ "$backup" = "1" ] && [ -f "$fl.original" ] && {
printf "File [%s] already has an original variant, skipping.\n" "$fl" >&2
printf "%s\n" "$fl"
continue
}
Expand Down

0 comments on commit 23fd8ef

Please sign in to comment.