Skip to content

Instantly share code, notes, and snippets.

@visualblind
Created January 28, 2021 10:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save visualblind/b769710408301c2d63444d93e889be8d to your computer and use it in GitHub Desktop.
Save visualblind/b769710408301c2d63444d93e889be8d to your computer and use it in GitHub Desktop.
#!/usr/bin/env bash
inotifywait -m /mnt/pool0/p0ds0smb/temp/ffmpeg-inotify/. -e close_write -e moved_to |
while read dir action file; do
if [[ "$file" =~ ^.*\.(mp4|mkv)$ ]]; then
bash -c "/mnt/pool0/p0ds0smb/visualblind/Documents/Scripts/linux/ffmpeg_tcode_compat.sh -d /mnt/pool0/p0ds0smb/temp/ffmpeg-inotify -w /mnt/pool0/p0ds0smb/temp/ffmpeg-inotify/.working | /usr/bin/logger -t 'ffmpeg-inotify-transcode-acodec.sh'";
fi;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment