Trying to get a Terminal Script to work in Hazel

Get help. Get answers. Let others lend you a hand.

Moderator: Mr_Noodle

Hi, the below terminal script works in Terminal (if I specify the video name), but I can't seem to get to work in Hazel.
I'm trying to setup a watch folder that compressed video to webm.
Can anyone here set me on the right path?
Thanks
[Hazel Rule: if extension is .mov]
Code: Select all
in="$1"
OUT = "test.webm"; \
CORES="3"; \
CRF="53"; \
ffmpeg -i "$1" -c:v libvpx-vp9 -pass 1 -pix_fmt yuv420p -b:v 0 -crf $CRF -threads $CORES -speed 4 -an -tile-columns 6 -frame-parallel 1 -an -y -f webm /dev/null; \
ffmpeg -i "$1" -c:v libvpx-vp9 -pass 2 -pix_fmt yuv420p -b:v 0 -crf $CRF -threads $CORES -speed 2 -an -tile-columns 6 -frame-parallel 1 -auto-alt-ref 1 -lag-in-frames 25 -c:a libopus -b:a 320k -f webm $OUT

[Hazel rule: Move to folder 'Compressed"]
grahama
 
Posts: 1
Joined: Sat Mar 18, 2017 5:40 pm

Make sure you use full paths (especially for ffmpeg).

Also, turn on debug mode: https://www.noodlesoft.com/kb/hazel-debug-mode/

After doing that, any output from the script should appear in the logs, which should help in diagnosing where it's going wrong.
Mr_Noodle
Site Admin
 
Posts: 11872
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City


Return to Support