Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

snomelc

macrumors newbie
Original poster
Jan 24, 2016
8
1
In Windows I right-click on an MKV file (or multiple MKV files) and choose Other Options > Send to > Remux.bat and it very quickly creates MP4 files in that same location with the same names.

My question: Is there a way to do this in macOS Ventura by creating a bash file, making it executable and renaming it with .command suffix then right-clicking on an MKV file and pointing to/executing the bash file?

This is the Windows batch file:

@echo off
if [%1]==[] goto :eof
:loop
C:\ffmpeg\bin\ffmpeg -i %1 -c copy -copyts %1.mp4
shift
if not [%1]==[] goto loop

I've run this command from Terminal successfully: ffmpeg -i example.mkv -c copy example.mp4

I don't know much at all about programming but was reading about bash files. I will need help with the creation of a macOS "batch" file with (hopefully) the option to right-click execute.
 
You can use the Shortcuts app to do this. You can create a Quick Action shortcut that can be called from the right-click menu in Finder and restrict it to media files. You can then use building blocks to provide the functionality you want, such as by checking for media type of file extension and then directing the file input to a shell script.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.