Activity › Forums › Apple Final Cut Pro Legacy › split video file into pieces using EDL
-
split video file into pieces using EDL
Posted by David Wishnie on March 14, 2008 at 2:17 pmHello,
I have an EDL file that describes scenes in a video file, and video file itself.
Is there any tool/way to split that video file using EDL into several video files using EDL (so for each scene, a movie file is created).
I’m more interested in doing this outside of FCP, but it would be nice if you can suggest how to do this in fcp too.
I’m very interested if created small files be “datarefs” to original big file (so they would just point to original big file and specify offset and duration of each file).
Thanks in advance for your answers!
-DavidNick Meyers replied 18 years, 4 months ago 3 Members · 3 Replies -
3 Replies
-
Steven Gonzales
March 14, 2008 at 3:38 pmI would just use Final Cut, but you might be able to use applescript to accomplish this if you have quicktime pro.
The applescript dictionary for Quicktime includes:
select?v : Select a range of time
select reference : the movie whose selection is to be set
[at integer] : starting time of the selection
[to integer] : end time of the selectionand
trim?v : Remove all content before and after the current selection
trim reference : movieand
export?v : Export a movie or track to a file
export reference : the movie or track to export
to file : the destination file
as AIFF/AVI/BMP/DV stream/Fast Start QTVR Movie/FLC/hinted movie/image sequence/interframe compressed VR object movie/iTunes/MuLaw/MPEG2/MPEG4/picture/QuickTime media link/QuickTime movie/QuickTime TeXML/standard MIDI/System 7 sound/text file/ThreeGPP/wave : the desired file type
[using default settings/most recent settings] : the export settings to use
[using settings preset string] : the name of the export settings preset to use
[using settings file] : the file containing the export settings
[replacing boolean] : should the original file be deleted first?Here’s a collection of quicktime scripts that you might be able to adapt:
https://www.apple.com/applescript/archive/quicktime/
I’m not sure how applescript handles time. Time is an integer, so some conversion will have to take place of your timecode numbers.
I think time is explained in the Quicktime Movie Internals Guide:
-
Steven Gonzales
March 14, 2008 at 3:54 pmI found a couple scripts to deal with timecode conversions at https://bbs.applescript.net/viewtopic.php?id=22304
******QuickTime time -> SMTPE:
Open this Scriplet in your Editor:
property TimeOffset : 10tell application “QuickTime Player”
tell document 1 to set {currentTime, timeScale, theDuration, FrameCount} to {current time, time scale, duration, count (frames of track “Video track”)}
end tellset FrameRate to (FrameCount * timeScale) / theDuration div 1
tell (currentTime / timeScale) to set {hr, mn, sc} to {it div 3600, it mod 3600 div 60, it mod 3600 mod 60 div 1}
set fr to (currentTime mod timeScale div (timeScale / FrameRate))
set SMPTE to addZero(TimeOffset + hr) & “:” & addZero(mn) & “:” & addZero(sc) & “:” & addZero(fr)
display dialog “TCR ” & SMPTEon addZero(v)
return text -2 thru -1 of (“0” & v)
end addZero*****SMTPE –> QuickTime time:
Open this Scriplet in your Editor:
property TimeOffset : 10
set SMTPE to “10:20:24:20”set {hr, mn, sc, fr} to words of SMTPE
tell application “QuickTime Player”
tell document 1 to set {timeScale, theDuration, FrameCount} to {time scale, duration, count (frames of track “Video track”)}
end tell
set FrameRate to (FrameCount * timeScale) / theDuration div 1
set QT_time to ((((hr as integer) – TimeOffset) * 3600 + mn * 60 + sc) * FrameRate + fr) * (timeScale / FrameRate) -
Nick Meyers
March 23, 2008 at 12:46 pmi’d do it manually in FCP;
import the EDL, and you’ll get a sequence of off-line clips
line your movie up against that in a sequence,
select al,
then step thu and add markers to it
down arrow = next edit
m to add a marker.drag your marked up clip into the browser,
toggle it open,
select all the markers and dag them into a new bin.
they will now be sub-clips called “marker 1”, “marker 2” etc
then you can batch export
and use a batch re-namer to tidy up the names on the new files.but it;s late and i might be missing some really obvious simpler way to do this.
cheers
nick
Reply to this Discussion! Login or Sign Up