Skip to content

Instantly share code, notes, and snippets.

@zflat
Created February 3, 2021 20:31
Show Gist options
  • Save zflat/12a96fa28709a4db35f36e6421b8e2fb to your computer and use it in GitHub Desktop.
Save zflat/12a96fa28709a4db35f36e6421b8e2fb to your computer and use it in GitHub Desktop.
#!/bin/bash
# Synology DLNA server does not recognize mp4 audio files
# but does recognize them if ther are .M4A.
# https://www.synology.com/en-global/dsm/software_spec/audio_station
find "${HOME}/Music/tmp" -name "*.mp4" | while read filename
do
name=$(echo "${filename}" | sed -e "s/.mp4$//g")
echo "${name}"
mv "${filename}" "${name}.M4A"
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment