Last active
May 2, 2018 11:38
-
-
Save dimalyshev/299a6d2ada1d83675174f09f3634fa5f to your computer and use it in GitHub Desktop.
convert & organize (by dates) video & photos
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for /F "delims=;" %%i in ('dir /b/s "%~1\%2"') do ffmpeg -i "%%i" -strict -2 "%%~ni.mp4" && move "%%~ni.mp4" "%%i" | |
for /F "delims=;" %%i in ('dir /b/s "%~1"') do ffmpeg -i "%%i" -strict -2 "%%~ni.mp4" && del "%%i" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for file in *.*; do | |
#convert | |
ffmpeg -i ${file} -map_metadata {0:g} -strict -2 ${file%%.*}.mp4 | |
# change ext | |
mv ${file} ${file%%.*}.mp4 | |
#sort with help of exiftool | |
#https://www.sno.phy.queensu.ca/~phil/exiftool/exiftool-10.94.zip | |
exiftool -o out/ '-filename<createdate' -d %Y/%m/%Y%m%d_%H%M%S%%-c.%%e ${file} | |
mkiso -r -J -o YYYY.iso -V photo_YYYY YYYY/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
for /F "delims=;" %%i in ('dir /b *Full-HD*.mp4') do ( | |
call:loop "%%i" | |
) | |
goto:eof | |
:loop | |
set xxx=%~1 | |
set xxx=%xxx:~0,-19% | |
set xxx="%xxx%.mp4" | |
set xxx=%xxx:..=.% | |
::echo "%1" --^> %xxx%.mp4 | |
echo | |
move %1 %xxx% | |
goto:eof |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
README
Housekeeping my videos, cam rolls and so on
Video