1
0
Fork 0

Add identify_resolution

This commit is contained in:
VirtuBox 2020-09-24 17:13:11 +02:00
parent f262d0b4a0
commit 9138e41b80
Signed by: virtubox
GPG Key ID: 22EB296C97BAD476
1 changed files with 10 additions and 0 deletions

View File

@ -785,6 +785,15 @@ _x265_encode() {
fi fi
} }
_identify_resolution() {
for i in "$PWD"/*.mp4; do
width=$(ffprobe -v error -print_format json -show_format -show_streams -show_chapters "$i" | jq .streams[0] | jq -r .width)
mv "$i" "${i%.*}-$width.mp4"
done
}
# enable color support of ls and also add handy aliases # enable color support of ls and also add handy aliases
# some more ls aliases # some more ls aliases
#alias wp='/usr/bin/wp --allow-root' #alias wp='/usr/bin/wp --allow-root'
@ -814,6 +823,7 @@ alias ffmpeg-cut-start=ffmpeg_start_time
alias ffmpeg-merge=_MERGE_VIDEO alias ffmpeg-merge=_MERGE_VIDEO
alias ffmpeg-audio=_TRANSFER_AUDIO alias ffmpeg-audio=_TRANSFER_AUDIO
alias ffmpeg-x265=_x265_encode alias ffmpeg-x265=_x265_encode
alias ffmpeg-resolution=_identify_resolution
alias ftpadd=_FTP_ADD alias ftpadd=_FTP_ADD
alias fgrep='fgrep --color=auto' alias fgrep='fgrep --color=auto'
alias gg="ping google.fr" alias gg="ping google.fr"