Skip to content

Instantly share code, notes, and snippets.

@nukisashineko
Last active September 25, 2017 08:47
Show Gist options
  • Save nukisashineko/8c9498ff04b2659c39c9a627bcb3e597 to your computer and use it in GitHub Desktop.
Save nukisashineko/8c9498ff04b2659c39c9a627bcb3e597 to your computer and use it in GitHub Desktop.
ffmpegで動画の撮影日時を保ったまま画素数を増やすスクリプト
mkdir mp4 -p
for file in `/bin/ls -r *.3G2`; do
datetime=`ffprobe -v quiet $file -print_format csv -show_entries format_tags=creation_time|cut -d ',' -f 2`
datetime_iso=`date --iso-8601=minutes -d "${datetime}+00:00"`
ffmpeg -i ${file} -metadata creation_time=$datetime_iso -strict -2 mp4/${file%.*}.mp4 -s 640x480 -y
touch -d $datetime_iso mp4/${file%.*}.mp4
done;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment