Skip to content

Instantly share code, notes, and snippets.

@PythonCoderAS
Created May 9, 2025 18:33
Show Gist options
  • Select an option

  • Save PythonCoderAS/a2561da1d2be01da64e6e80fe0c47789 to your computer and use it in GitHub Desktop.

Select an option

Save PythonCoderAS/a2561da1d2be01da64e6e80fe0c47789 to your computer and use it in GitHub Desktop.
for file in huge/*.mp4
do
ffprobe -loglevel error -show_entries stream_tags:format_tags -of json "$file" | jq -r '.format.tags.creation_time' | sed -E 's/\-0(4|5):00//g' | sed -E 's/[T:\.\-]/ /g' | read year month day hour minute second _
[[ "$year" = "null" ]] && { echo "Could not parse year from $file, got null, aborting"; break }; mv -vi $file "$(dirname "$file")"/"Dailies $year-$((month))-$((day)) $((hour))-$((minute))-$((second)).mp4"
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment