Magnum – The Edit Detector


Version: 2.0 Sign up to be notified by email when a new version of this script is posted
Automatically detects edits in footage. To use it you simply select a footage layer in a comp, set the work area to the region you’d like to find edits and tell Magnum to go to work!
After it detects the scenes or edits you have 5 options:
- Split into new layers: This mode will split the selected layer into individual layers at every edit.
- Trimmed pre-comps: This mode will split the layer and then pre-comp it into a comp that is the length of the split layer.
- Full-length pre-comps: This mode will split the layer and pre-comp it into a comp that is the same length as the original comp.
- Trimmed adjustment layers: This mode will create a new adjustment layer that is trimmed to the length of every detected scene.
- Place markers on layer: This mode will create and place markers at every detected edit point.
There is also a very customizable naming system for the newly created layers, comps, markers, etc. You can set the name however you want with the assistance of some special keywords:
- [layername]
- [compname]
- [projectname]
- [clip#] (the number of #’s indicates the number of leading zeroes)
It works very well at the default detect level of 1.7, but tricky footage might need this adjusted. Lower values make it more sensitive to finding edits. So if it didn’t find all the edits, undo and lower the level. If it found more edits then raise the level.
There is a built-in help and help-tips that are shown when hovering over the UI.
- Magnum 2.0 UI
version history (click ? on the script palette to find the version):
- 2.0 – 06/2010
- Added 3 new result modes: Trimmed pre-comps, full-length pre-comps, adjustment layers
- Added a new smart layer naming system
- Made compatible with non-english languages
- Made CS5 compatible
- Much improved detection speed
- Added a Stop button (finally!!)
- 1.051 fixed windows english launching instructions to -L en_US 06/2009
- 1.05 english language detection, added progress bar on mac cs4. 09/2008
- 1.04 further fixed detection algorithm – 02/2008
- 1.03 optimized cut detection algorithm, fixed no selected layer bug – 02/2008
- 1.02 minor bug fix that incorrectly identified Comp’s as a null – 01/2008
- 1.01 minor bug fix to add error correction for null and stretched layers – 01/2008
- 1.0 initial release – 01/2008








This is pretty sweet!! I can’t tell you how many times I’ve had to do this by hand.
Thank you very much for the Magnun script. As you know this is a fairly frequent operation in AE so this is a real life/time-saver. Brilliant work!
Nice one Lloyd, I’ve been waiting for this. JD
Thanks for making this script available!
this is one of the coolest scripts I have seen. I have spend hours just hitting control + right for this task
Perfect! You’re a genius. Adobe owes you a cool two-hundred grand for your app! Make ‘em pay you, cuz a lot of folks will love using this in AE.
You CoderKids never cease to amaze!
oh man you are the bomb. how does this work??!??! never mind, it works. it works well. it aced some pretty tough test clips i gave it, including a black and white cartoon where most of the shots were very similar. nice work, i can’t thank you enough.
would love to have this work on my mac.
looks amazing.
First, sorry for my poor english and thank you so much for this awesome script
I finaly succeed to run it on my french version of after effects after many tries.
In foreign languages, after use other name for the expression effects.
For exemple, “slider effect” appears as ‘Paramètre glissière’
and the property “slider” appaears as ‘Curseur’
And the script stop without any warning after the first error.
So I ues index instead of name at lines
180: myThresEffect.property(1).setValue(threshold);
185: myExpEffect.property(1).expression …….
190: “thres=effect(2)(1);\n” +
It’s working great now for me. But i’m not a code writer, so if anyone wants to correct me..
The script is not localized, so it will only run properly when AE is run in english. If there is enough interest I could modify the script so that it can be localized and then maybe ask for volunteers to do some translating.
This is so cool! Thanks so much!
That’s awesome…
…so what will happen if I try to run it on CS2?
-Bugh
The script relies on a new CS3 only function called sampleImage which is what allows me to analyze the images and determine if there is a cut or not, so unfortunately it won’t work on After Effects 7 or below.
You rule. This will save me a ton of time. I have to break up QT files by hand about 20 times in a normal production month. Awesome, Awesome, Awesome.
Thanks.
Thank you very much for the script ……
This is possible to create a script to import a final cut project. ?
I see one script : FCPTOAE but it’s not very cool
I prefer to asking you because you very strong
hehehe
thnak and sorry for my english
RMAX
awesome stuff!!
such a simple idea … so useful.
Hello,
For people who use Final Cut: I’ve found this tool for scene detection:
http://www.scene-detector.com
Didn’t try it though.. Not free, alas..
Magnum does not work with my french/german/… version of AfterEffects?
Solution (windows): At your desktop or your quickstart bar, right click the shortcut of your After Effects installation, select Properties. Under Target, where you see the path to AfterFX.exe, ADD the following text at the very end, behind quotes if present:
-L EN
This will start After Effects with english as a menu language and everything will work fine, no messing around inside the script required. Of course, you now have to use After Effects in english and your settings will be reset.
P.S: Great script, thanks a lot!
Please note that this method does not work in CS4. For instructions on how to switch CS4 to run in English refer to this FAQ: http://aescripts.com/faq/force-after-effects-to-run-in-english/
I’d prefer reading in my native language, because my knowledge of your languange is no so well. But it was interesting! Look for some my links:
Lloyd,
Totally brilliant! You’ve automated my most dreaded chore.
Wow! This is something I’ve dreamed of for a long long time… No, I’m not joking, Is that bad? Anyway – thanks!
The easyest way to run AE in English is to open the LANGUAGES Subfolder and Select the English Version. Basically, this does nothing more than putting the -L EN Addition to the Shortcut, but its already prepared and ready to go.
Please note that this method does not work in CS4. For instructions on how to switch CS4 to run in English refer to this FAQ: http://aescripts.com/faq/force-after-effects-to-run-in-english/
yeah, this is SWEEET!!!!!! thank you, thank you.
I LOOOOVE YOU!!!
thank you
Hi, you should definetly put a readme-file to the .zip where people with different languages are informed about the -L ENG trick!
Btw.: THIS IS A GREAT THING!
For some reason, with the footage I’m using, no matter what I set the threshold to it won’t detect any edits. I’ve exported out a quicktime from Final Cut that was all shot against a greenscreen and I’m try to do the compositing in AE.
It would be nice some wariant to this script which can create flashes of all keyframes (scene change) in one clip.
In other words, I want to make some “media or photo flash noise” taken by isolating all single keyframes (scenes change) in a movie clip, finally receiving few seconds clip made of flashes of first frame from all single shots. Is it clear?
At this time with this script I can isolate all shots, but then I need to shift all layers to = [begining of the timeline+(1 frame*layer index)]. Optionally every layer’s OUT point may be trimmed to [layer's IN point+1frame]. Of course “1 frame” can be variable and the user can have to set more that only one first frame from each scene to put in his “flashed noise” sequence. Possible?
Can you make an option to add a marker to the layer instead of split it? In this case it would be possible to use your other script “Render Frame at Markers” to render first frame of all shots.
Max:
That feature is already there, just select it in the Result pulldown.
reeeeeally looking forward to the cs4 version of this – it’s a fave!
Thanks man,
// jayse
Works perfect !!! thank you for sharing
Thanks alot!! that saves a bundle of work!
Great script!!
Is it possible use this script for create a another “posterize time” to keep the cut edit of a clip ?
thx,
Ogilvy
@Andy – I don’t think I am understanding your question.
The posterize time plugin in after effect change the frame rate to a footage but then change the cut edit time position too (sync with audio for example..)
with this script maybe would be possible keep this cut edit ..
i mind to another script “posterize time” with bit of code of magnum edit detector inside
@Andy – Apply posterize time to your clip in a pre-comp and select the preserve frame rate when nested option in the advanced comp settings. You can then run Magnum on that pre-comp.
But i don’t need apply magnum detector on a clip with time posterized on, but a need a script for posterize the time and keep the original edit cut in sync into the clip.
If you change the frame rate of the comp it should “posterize time” and keep things in sync.
yes the sync is the same but the cuts edit time position are traslate
Amazing work indeed. This would be a very iinteresting tool for us because we often export videos from final cut to after effects to do special effects. And that always needs to split the video in pieces. Unfortunately the script only works in englisch. I would really like to sit down and do the changes for a german version but I am no code writer and would need some help. It would also be interesting if the french version from the user ManuV would also work in Germany…
please reply to indigobluemail@gmx.de
Thanx, Andi
v2.0 will work in any language
Any word as to when this might be available for CS4? Its been a great help in CS3, looking forward to continuing to use it.
v2.0 is now compatible with CS3, CS4 and CS5
Is this supposd to work in AE CS4 cause I just did it and it worked like a charm? Unbelievable!
Thanks for the script, it works great.
However, the script cannot detect any edit even the level is 0.1 after installing the system.
Thanks for the script, it works great.
However, the script cannot detect any edit even the level is 0.1 after re-installing the windows.
It says it detects the edits but it won’t add a marker or split the layer? How do I get it to do that?
great script. works well in CS3. no luck in CS4. when could we expect the update for CS4?
will this ever work on a mac?
brilliant script
It was written and designed on a mac, so it definitely works on mac
Hi, I’m having trouble switching my German CS4-Version to English. The -L EN-trick doesn’t work; I’ve looked in some tutorials and forums, but none knows anything about CS4, they’re all talking about CS3. When purchasing that version, I had to choose a specific language version; maybe thus the switching is not possible. Do you know anything about it? I could definitly use your script, so I’d be happy if it was running on my machine.
Thanks a lot!
Sven, Hamburg, Germany
In CS4 they changed it a bit so that switching to english requires slightly different syntax. Please refer to this FAQ for instructions on how to switch to english in CS4 http://aescripts.com/faq/force-after-effects-to-run-in-english/ And all language versions include the US English installation so switching is definitely possible. Please let me know if you are not able to switch.
Hi, I tried it on an imported video in Avid DNxHD185-Codec. It didn’t work. Magnum couldn’t find any edits, no matter which detection-level I chose. Maybe it’s because I could really offer him a drink. But then, the same video in QT DV-PAL worked perfectly. Whereas with the DNxHD-video, the script took only 4 seconds, the DV-video took much longer, I could see it counting up the “processing frames” in a row in the infopanel. Do you have any idea or hint for me to work this out?
Regards, Sven
Hmm, I have never tried any Avid DNxHD185-Codec compressed footage so it is hard for me to say why it didn’t work. However, the fact that it worked with DV footage makes me think that it might have something to do with the proprietary Avid codec. Magnum uses After Effects sampleImage() function to “view” the frames so one test you could do is try sampleImage() on some footage and see what the result is. If it doesn’t see it then it’s a bug you can file with Adobe here: http://adobe.com/go/wish
Is there a reason why I can’t get this to work on my SD footage while sitting in an HD comp.
Hello, I have few questions/enhancements suggestions:
1. I have found that display Resolution, doesn’t have any effect on the speed of the edits processing. so it is possible to speed up this process by using lower resolution when “Quater” or “Half” setting was set?
2. Is it possible to add “cancel” button in the script’s panel to break edits processing?
1. I would have to take a look to see if I could still be able to detect edits at a lower resolution, I will add this to the list of future possible improvements.
2. Due to limitation in the way scripting works, a cancel button is not really feasible, but you can always try to press Ctrl (or Cmd on Mac) and a period and in many cases it will cancel the search. You will then need to restart the script to continue using it.
Check out the new version (2.0) just posted. It runs faster now by scanning at a lower resolution and it also now has a STOP button to stop the scanning after it has started.
First of all I want to thank you for this great script! I really use it all the time and it works perfectly. Now here comes the 10.000 dollar question : Would it be possible to modify the script that it adds an “adjustment layer” on top of every detected edit ? To carry it to the extremes
it would love to see a color picker in the floating panel, which would allow you to select a color for the adjustment layers which will be generated.
I would love to buy the script a second time if those changes could be made.
Thanks again, and all the best
YR
Check the new version (2.0) just posted. That is one of the new features.
Just translated the code to work in german version of AE CS5. Write me a mail if you are interessted in using it.
Best, Jake
Thanks for the offer, but v2.0 now runs in any language without needing to be localized.
This doesn’t seem to work on AE CS5 in English. Any chance of an update?
Working on an update as we speak that will not only make it CS5 and non-english compatible but will also add a few big new features. Stay tuned.
v2.0 will run in any language not just english.
The script does not work in CS5
What platform are you on and what problem are you experiencing? It works on Mac and Windows CS5.
Windows 7 CS5
The script cannot recognize any edit point. I did try it on several video sources.Thanks
What codec are your videos encoded in? We’ve had random reports of some codecs not being compatible but it was a long time ago so I don’t recall which ones they were. Is it possible to try a different codec? Not sure what else it might be as we can’t seem to replicate anything here. Every works as expected with the footage we use. If you need some neutral footage to test with, we use h264 encoded trailers from the quicktime trailers site.