Created
May 18, 2020 08:55
-
-
Save shinmiy/fed984efc15d968910eac101826a9aae to your computer and use it in GitHub Desktop.
つながってるAndroid端末からいい感じに動画を拾ってくるスクリプト
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
#!/bin/bash | |
DIRECTORY="/sdcard/DCIM/Camera/" | |
SCALE="720" | |
fullpath=$(adb shell exec ls ${DIRECTORY}*.mp4|peco) | |
filename=$(basename -- "$fullpath") | |
extension="${filename##*.}" | |
name="${filename%.*}" | |
adb pull $fullpath . | |
ffmpeg -i $filename -vf scale=-1:${SCALE} -an ${name}_${SCALE}p.${extension} | |
rm -i $filename | |
open . |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment