dotfiles/local/bin/pre-process-media.sh: update

Add support for Pixel TopShot videos.
This commit is contained in:
Alan Orth 2024-06-17 21:56:45 +03:00
parent 17e5212f76
commit 418c44e47d
Signed by: alanorth
GPG Key ID: 0FB860CC9C45B1B9

View File

@ -121,6 +121,9 @@ perl-rename 's/^([0-9]{4})([0-9]{2})([0-9]{2})_([0-9]+)\.mp4/$1-$2-$3_$4.mp4/' *
# Rename PXL_20210714_145336054.mp4 to 2021-07-14_145336054.mp4
perl-rename 's/PXL_([0-9]{4})([0-9]{2})([0-9]{2})_([0-9]+)\.mp4/$1-$2-$3_$4\.mp4/' *.mp4
# Rename PXL_20240101_142720131.TS.MP4 to 2024-01-01_142720131.mp4 (Pixel 7a TopShot feature)
perl-rename 's/PXL_([0-9]{4})([0-9]{2})([0-9]{2})_([0-9]+)\.TS\.mp4/$1-$2-$3_$4\.mp4/' *.mp4
# Optimize JPEGs with jpeg-archive
find . -name '*.jpg' | chrt -b 0 parallel --no-notice "jpeg-recompress -q high {} {}"