Add identify_resolution
This commit is contained in:
parent
f262d0b4a0
commit
9138e41b80
10
mybashrc
10
mybashrc
|
@ -785,6 +785,15 @@ _x265_encode() {
|
|||
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
|
||||
# some more ls aliases
|
||||
#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-audio=_TRANSFER_AUDIO
|
||||
alias ffmpeg-x265=_x265_encode
|
||||
alias ffmpeg-resolution=_identify_resolution
|
||||
alias ftpadd=_FTP_ADD
|
||||
alias fgrep='fgrep --color=auto'
|
||||
alias gg="ping google.fr"
|
||||
|
|
Loading…
Reference in New Issue