GUI for simple script

Soldato
Joined
4 Oct 2019
Posts
3,039
Location
Queens Park - London
Hi all

I’m trying to take a video conversion script that I’ve added to Automator and create a GUI for it where I can select the videos I want to convert and the output file type from the interface to not have to go through 20+ videos one by one using a quick action script from the (right click) context menu.

I want to take 480P AVI video and convert it to 1080P MP4 X264 or X265.

I see many many Windows apps like BalenaEtcher which look great but are just a simple GUI to execute a scripted with custom variables.

Does anyone have any suggestions as to where I can learn to do this for OSX?

Thanks in advance.

Edit: I think I've found something that'll work for me. I'd still like to be able to create a GUI for my own scripts in the future though so please reply to this thread if you know how.

HBBatchBeast


maybe Tdarr will work too.


Right now, this is the script I'm running using quick action command added in Automator - I can only convert one video file at a time and select and highlighting more than 1 video doesn't convert all of them, just one.

Code:
originalFilePath=$1
uuid=$(uuidgen)
uuidFilePath="${originalFilePath%.*}-$i.mp4"

# Execute ffmpeg conversion
/opt/homebrew/bin/ffmpeg -i "$originalFilePath" -vf scale=1920x1080:flags=lanczos -c:v libx264 -preset slow -crf 21 "$uuidFilePath" > /dev/null 2>&1

# Check if ffmpeg was successful
if [ $? -eq 0 ]; then
    osascript -e 'display notification "Video conversion completed successfully" with title "Conversion Success"'
else
    osascript -e 'display notification "Video conversion failed" with title "Conversion Failure"'
fi
 
Last edited:
Back
Top Bottom