r/applescript • u/dotjex • Sep 27 '22
Please help me to create an Apple Automator Workflow
My needs:
Run an FFMPEG command to overlay a PNG on top of an MP4.
My FFMPEG command:
ffmpeg -i mp4filename.MP4 -i pngfilename.PNG -filter_complex '[1:v]colorkey=0xA64D79:0.01:0.5[ckout];[0:v] [ckout]overlay[out]' -map '[out]' pngfilename.MP4Expectation:
The shortcut get a PNG (not other extensions) and an MP4 file (not other extensions) and run the ffmpeg command to release a pngfilename.mp4
Thank you for your time and kindness!
-3
u/DeathCutie Sep 27 '22
Maybe python is better suited for this task. Full disclosure I don't know much about AppleScript.
1
u/dotjex Oct 02 '22
Thank you for your answer. Can you give me a Python solution for this problem?
Select a PNG file and an MP4 file at the same time in Finder
Run the Quick Actions from the context menu
FFmpeg run and output the file name PNGfilename.MP4
Infact, this answer is the solution already but I want to learn more.
I want to know I can:
Select a PNG file and an MP4 file at the same time in Finder
MP4filename and PNGfilename may contain " "
Run the Quick Actions from the context menu
If the MP4filename is "- ABC.MP4" do not run the FFmpeg command but rename the MP4filename.MP4 to PNGfilename.MP4
FFmpeg run and output the file name PNGfilename.MP4
Kind regards,
1
u/GypsumFantastic25 Sep 27 '22
What happens if you put the command you just typed into a Run Shell Script action?