Go Back   MacRumors Forums > Special Interests > Visual Media > Digital Video

Reply
 
Thread Tools Search this Thread Display Modes
Old Dec 11, 2012, 05:00 PM   #1
gnychis
macrumors 6502
 
Join Date: May 2009
how to trim 1000 videos to 2 sec each, merge

It's been a while since I've tried to edit any sort of videos, and I'm new to Mac OS so I'm even less familiar with the software or tools available for it. But I kind of have a "special" request.

I have somewhere around 1000 videos that I've captured over the past 10 years of my life, some small clips (10 seconds), some longer (20 minutes). I want to do something "simple" like take the first 2 seconds of each video (for simplicity) and then merge them all together.

Of course, these videos are in all sorts of different formats and resolutions. So I'd like to be able to define the video to be the resolution of the highest resolution video, and just fit the others in with black backgrounds or something.

If anyone has any suggests on where to even start with this (e.g., trimming) I'd greatly appreciate it. Thanks a bunch!
gnychis is offline   0 Reply With Quote
Old Dec 11, 2012, 07:09 PM   #2
ppc_michael
Guest
 
Join Date: Apr 2005
Location: Los Angeles, CA
Send a message via AIM to ppc_michael
I've you're comfortable with the command line (Terminal), you could install ffmpeg and write a script to chug through and do that for you.
ppc_michael is offline   1 Reply With Quote
Old Dec 11, 2012, 08:40 PM   #3
floh
macrumors 6502
 
Join Date: Nov 2011
Location: Stuttgart, Germany
That's the first thing that came to mind for me as well. I am sure you can automate such a process with other tools, but I know for a fact that it can be done with ffmpeg, and that it can handle a huge amount of video formats.

So, the questions really is if you are okay with working in the Terminal or if you would like to have a graphical user interface to work with.
floh is offline   0 Reply With Quote
Old Dec 12, 2012, 01:54 AM   #4
gnychis
Thread Starter
macrumors 6502
 
Join Date: May 2009
for sure, I am comfortable with the command line. I will look up some details of ffmpeg and keep you updated if I have any issues. Thanks a bunch for the guidance!
gnychis is offline   0 Reply With Quote
Old Dec 12, 2012, 02:55 AM   #5
floh
macrumors 6502
 
Join Date: Nov 2011
Location: Stuttgart, Germany
I guess for this case, the most important options for you will be:

-ss <position> (start at position)
-t <duration> (where duration is in seconds or "hh:mm:ss[.xxx]" format)
-i concat:"file1.mov|file2.mov|file3.mov" (concatenate several files)

So, this could mean something like this script as an example:

Code:
#!/bin/bash

# make temporary files directory
mkdir tempfiles

# take seconds 1 through 3 from each .mov file in current directory
for file in *.mov; do
ffmpeg -i "$file" -ss "00:00:01" -t "00:00:02" -f mpegts -c copy -bsf:v h264_mp4toannexb "tempfiles/$file.mpeg.ts"
allfiles="$allfiles|tempfiles/$file.mpeg.ts"
done

# take away starting pipe from filenames variable
allfiles=${allfiles#\|}

# concatenate all files
ffmpeg -isync -i "concat:$allfiles" -c copy output.mp4

# remove temporary folder
rm -rf tempfiles
This will probably work, but only for files with some kind of mpeg codec, and if they have the same codec. If they have different codecs, you will have to re-encode them first, and add something like "-codec:v libx264 -b:v 5000k -codec:a mp3 -b:a 192k" to the options of the first ffmpeg-line.

You can download the newest version ffmpeg here. Just pick the newest zip file (currently 1.0.1, I think).
floh is offline   0 Reply With Quote
Old Dec 12, 2012, 12:49 PM   #6
jonjiv
macrumors newbie
 
Join Date: May 2012
An alternative solution if the terminal one doesn't work and you have Final Cut Pro compatible media:

Download the Final Cut X 30 day trial: http://www.apple.com/finalcutpro/trial/

1. Go to File: Import Media
2. Import all your media into a new event. (You can uncheck all the boxes that come up in the new event box)
3. Go to File: New Project
4. Select all media you imported in the Event Library.
5. Hit the "E" Key to insert the clips into your project (or drag them over).
6. Select all the clips in the project
7. Right click on selected clips and select "Change Duration"
8. Type 200 (for 2:00 seconds) and hit enter. All clips should resize to the first two seconds
9. Go to File: Share and select your preferred export format.
jonjiv is offline   0 Reply With Quote
Old Dec 13, 2012, 02:23 PM   #7
Kevin Monahan
macrumors regular
 
Join Date: Feb 2011
 
Of course, you could do this easily in Premiere Pro CS6, as well.
__________________
Kevin Monahan
Support Product Manager, Digital Video
Adobe
Kevin Monahan is offline   0 Reply With Quote

Reply
MacRumors Forums > Special Interests > Visual Media > Digital Video

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Similar Threads
thread Thread Starter Forum Replies Last Post
Trim videos to save HDD space MacMan988 Mac Applications and Mac App Store 6 Dec 18, 2013 11:53 AM
1000 Minutes, 1000 Texts, 1000MB for 10 in the UK EbookReader iPhone 0 Jan 31, 2013 10:14 PM
Ssd samsung series 840 to trim o not to trim gianlucadr MacBook Pro 7 Jan 22, 2013 02:39 AM
Partition Merge Problem (Can't Merge Empty Space) Zanon OS X 10.8 Mountain Lion 1 Sep 24, 2012 10:59 PM

Forum Jump

All times are GMT -5. The time now is 10:03 PM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Copyright 2002-2013, MacRumors.com, LLC