AUTOMATICALLY reduce the TIME of multiple MP4s in Adobe Premiere/Encoder
June 9, 2020 6:51 AM   Subscribe

I have 2000+ MP4s of varying lengths that I need to automatically chop down to the first 3 minutes in length, and end up with new MP4s each 3 minutes long.

I have a bunch (2000+) MP4s that i created over the years in Adobe Premiere and rendered with Adobe Media Encoder.

All of these MP4s are anywhere from 10 to 45 minutes in length.

I need to take all 2000+ and chop off everything after 3 minutes. I need be left with a new bunch of 2000+ three-minute MP4s. All the resulting videos would only be the parts of the MP4s between 00:00 and 03:00.

Obviously I could take all of them and manually chop off and export the video 2000+ times in premiere. Or manually chop them all off and use media encoder to make a list of the videos to create. and then do that 2000+ times

But i need this to happen AUTOMATICALLY.

Just like you can create an action in Photoshop for doing the EXACT same thing for multiple files then Automate/Batch process in Photoshop, is there a way to mimic that functionality, or is there something similar in premiere/media encoder? (like an : Open-Chop-Export-Rinse-Repeat)

Thanks, Gang

P.S. For various reasons (including that premiere like to make previous .prproj obsolete and they exist in different locations or archived - were talking many many years here) I do not want to edit the original or copies of the .prproj files.
posted by sandra_s to Computers & Internet (6 answers total) 1 user marked this as a favorite
 
I'm a Linux user, and the first thing I would try would be to write a script using ffmpeg. You don't mention whether you're using Mac/Windows. If you're on Mac I bet you can do this (relatively) easily. Not sure the state of things on Windows.

If you can get ffmpeg working from the command line on a single file (something like this), then you can memail me if you want help writing a script to batch process them all.
posted by jpziller at 6:57 AM on June 9, 2020 [3 favorites]


Sorry, I just had a call -- also if you want a hand setting up ffmpeg or testing it you can memail me.
posted by jpziller at 7:51 AM on June 9, 2020


Best answer: Seconding ffmpeg. Here's a download site with Mac/Windows builds.

If you're using Windows this script should clip all mp4 files in the same folder as it to the first three minutes:
for %i in (*.mp4) do ffmpeg -ss 00:00:00 -i "%i" -c copy -t 00:03:00 "%i-clipped.mp4"
(Note that ffmpeg doesn't have a path specified, so for a default Windows install of ffmpeg you'd need to copy all the mp4 files to c:\ffmpeg-[version]\bin then open a command prompt there and run the script.)

If you're on a Mac the script will look a bit different, and you can use this Stack Overflow discussion (which is where I got the syntax for batch processing) as a guide.

And here's more background on cutting.
posted by implied_otter at 8:24 AM on June 9, 2020


I've not used it for this specific purpose but I believe MP3DirectCut can do the same thing and without loss of quality. I believe that using ffmpeg would reencode the audio, creating a decrease in quality.
posted by Candleman at 8:46 AM on June 9, 2020


This totally works in ffmpeg, I just tried it:

ffmpeg -i input.mp4 -t 180 -c copy output.mp4
posted by neckro23 at 9:29 AM on June 9, 2020


As others have said - ffmpeg is superb at this. It can be a little obtuse if you're not familiar with command line tools, but something like this would work -

ffmpeg -y -i source.mp4 -c:v copy -c:a copy -t 00:03:00 out.mkv

That can be looped on a whole directory of inputs, on a mac (which I don't have so can't test) I imagine something like this would work -

for i in *mp4 ; do ffmpeg -y -i "${i}" -c:v copy -c:a copy -t 00:03:00 "${i}.out.mp4" ; done

The "-c:v copy" and "-c:a copy" options are telling it to use the "copy" codec, and hence avoid any alterations or re-encoding.
posted by samworm at 9:30 AM on June 9, 2020 [1 favorite]


« Older Weird scalp stinging   |   Games like Diplomacy Newer »
This thread is closed to new comments.