I found a bash script for my Synology NAS that is looking for *.mp4 files in a folder, strips the video out and saves them as *.m4a. (The purpose is an automatic 'YouTube to podcast converter').
for f in *.mp4; do mv -- "$f" "$(date +%Y-%m-%d -r "${f}") $f"; done
for f in *.mp4; do ffmpeg -i "$f" -vn -acodec copy "${f%.mp4}.m4a"; done
Sometimes the *.mp4 file names contain periods, e.g. 'This video...mp4', resulting in the podcast player not recognizing such files.
Is there a line I can add to the script to remove period(s) in front of the extension or to just remove them all?