Magnum – The Edit Detector Demo Video This script has a dockable UI, click for an installation video tutorial

Automatically detects edits in footage. Like Magic. Crazy, we know.

"Name Your Own Price"
You can pay anything you want, the amount displayed in the cart is only a suggested amount.
View Cart

Magnum – The Edit Detector Compatible with After Effects CS3Compatible with After Effects CS5Compatible with After Effects CS5.5

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.

**CS4 Compatibility note: Even though we’ve tested Magnum with CS4 and it works consistently for us here, there’s been a significant number of users telling us that it does not work for them in CS4 so we have removed the CS4 badge until we can figure out why that is.  CS3 and CS5, however, we have not received any complaints for and therefore encourage you to use those versions if possible with Magnum.

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

Last updated June 21st, 2010
39,637 views
Tags: , , , , , , , , , , , ,

Share      

About the author

I am a freelance art director and After Effects artist in New York City. I aim to provide high quality scripts that provide clever solutions for After Effects workflows.

Pingbacks

138 Comments

  • 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);
    ” +

    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!

  • 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.

  • yeah, this is SWEEET!!!!!! thank you, thank you.

  • I LOOOOVE 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! :D

  • 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

  • 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.

  • 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

  • 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

  • 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.

  • 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

  • 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

  • This doesn’t seem to work on AE CS5 in English. Any chance of an update?

  • The script does not work in 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.

  • Lloyd,

    Great script and worth the asking price. I am however having a problem with it in CS4. Works fine using the same clip in CS5 but does not detect any edits in CS4. I did notice that while it is running in CS4 the Detect Level slider inside the _Magnum_at_Work_ effect control is 0.00 all the time. In CS5 it displays values like 7.54. Maybe that is a clue?

    Thanks,

    JT

    • One thing I found in CS4 is sometimes doesn’t find any edits on the first try but then simply running the script again seems to work. The script works with cached footage so the second time seems to go much faster if that’s any consolation.

  • Hi. Suddenly the script not detect nothing, where before it detected all edit, now it no works!!
    I try it in same clip, and also in more clips and the same result: it not works.
    Please, I need a solution.

    Win7 64, CS5 10.0.1

  • Works perfectly wth cs5. i really need it!
    Nice work, thanks!!

  • It doesn’t work on my cs5 10.0.1.19 latest update. I’ve tried with different codecs. Does it work with Dpx?

  • I think there’s something wrong with the detect level slider.

  • so slow, unusable for me :(

  • Doesn’t work for me (CS5 10.0.1.19) on Snow Leopard 64bits. :( Nothing append.

  • Hello, thank you very much for making this script!

    I work with mostly green screen footage, and I’d love to use this script as part of my workflow.

    But I’ve noticed that the sensitivity slider is not very consistent: edits detected at higher (less sensitive) values do not necessarily show up at lower (more sensitive) values. Maybe the lack of a changing background (always green) interferes?

    I’m on CS4 using DV footage. (AvidDV codec).

    Thanks!

    • Yes, the script works by averaging the whole frame and then compares it to the next frame (also averaged) and if the difference is more than the threshold (the sensitivity slider) then it considers it a cut. If the image before and after are more than 50% green it is very possible that it is making the averaged frame look the same to the script. In a future version I will add the option to focus the area of the frame where the script should look for changes to avoid this situation.

      • Thanks for the reply! I can understand how it would be tough to detect edits when the image seems the same. But the main problem that I’m seeing is this: Edits detected at a low sensitivity do not consistently show up when a higher sensitivity scan is run. One would expect the number of false positives to increase as the sensitivity is increased, and I don’t mind dealing with those, but it is strange that correctly detected edits would not be detected when the sensitivity is increased.

  • Just downloaded the script – running it in CS4 on Snow Leopard – it can’t seem to detect any edits on any clip I try it on?

    • Have tried it on very low sensitivity levels as well btw

      • Adobe changed something in CS4 that made sampleImge() (the expression Magnum relies on to work) give inconsistent results. Users that have had issues in CS4 reported success with the same footage using CS3 or CS5. Since it is hard for me to reproduce here this is the best advice I can give right now.

  • Same here. No edits detected no matter the codec. Hope the CS4 issue gets solved.

  • This is very usefull. Thanks.

  • is there any way on how to make this work with large files ? i have 105GB RGB file, 2 hours of video … it crashes After Effects at about 2600 frames (note even 2 minutes) so .. only option would be to do this process 120x times in 1 minute intervals, which is not really that neat

    • After Effects loads all of the footage into RAM when it is processing it so depending on how much ram you have, 2 minutes might be more than you can handle. I would suggest processing smaller chunks at a time. Also before CS5, AE can only access around 3GB no matter how much ram your machine has installed.

      • thanks, used lowrez proxy (figured out details doesnt matter much for average), works great so far … awesome script, should be implemented into CS6 AE+Premiere :D

  • Hello. Today Magnum was not working, again (it not finds any cuts).

    But I discovered the problem: the AE comp not began in 00:00:00:00. When I changed the initial time of the comp to zero, Magnum works perfectly.

    I hope this help you.

  • Hi Lloyd.

    I had you script purchased by the company where I work for now.
    I tried it in AE CS5 (French Version) and it won’t find any cut…
    I tried it in AE CS4 and it does work perfectly.
    Any clue to be able to use it in CS5?

    Thanks a lot for

  • Yes I tried from default setting (1.7) to the lowest in CS5 and it won’t find any cuts.
    Default setting worked right away in CS4. (trying on the video)
    Some people told me that the French language (on CS5) might be causing the trouble.

    • That used to be the case but the new version should work in any language. Are you getting any error or extra comps in your project after you run it? And I know this is not ideal but if it is working for you in CS4 can you detect the edits in CS4 and import that comp into CS5?

  • Guess what… I just forced AE to switch to English language and now Magnum works perfectly.
    French language seemed to be the only cause.
    Very usefull tip (language switch using .txt file) that I have found on this website.

    • You must be running an old version then. Please download the latest version. Not only will it run in French but it also has many other improvements.

  • Hello Lloyd!

    Your script is gorgeous :) !
    Excatly the one I need.
    But, there is one problem. I am from Serbia and I really don’t know how to download it :( ….
    Can you please help me with that?

    Best Regards,
    Djordje Stojiljkovic;

  • I just started using the Magnum script in CS3 but before I apply the script, I have to restart AE and run the script before anything else. If I have another layer to split, the script will not find the edits properly until I restart AE again. Any ideas?

    • Never heard of this before. Are you running the latest version? I added some auto-purging code in the last version that might help but not sure as I am not sure why I would stop working after one go. Are you letting Magnum finish or are you hitting the Stop button? Maybe try processing shorter chunks in case this is a memory leak or something like that.

      • I’m running AE 8.0.2.27 and Magnum 2.0. Magnum goes all the way to it’s congrats screen reporting that it has found either no edits to as high as two when it should have found several more. Changing the detect level didn’t change the results. I am typically working with 1080i 29.97 timelines that are 30 seconds in length.

  • I don’t have any idea why this certain footage doesn’t work with magnum at all. Here is a sample
    http://itaki.com/magnumtest_jpeg.mov

    I’ve changed codecs and tried pushing in. Just every time Magnum just skips right over EVERY edit. I’ve tried Magnum with other foot, however, and it works just great.

    Any ideas?

  • Hi Lloyd, very cool script. Here’s a new function I’d like: can you have the auto chop mode work on markered audio (or video) tracks instead of scene detection? I’m thinking that for use on music videos or vocal tracks, I’d have an audio track with markers where I’d like cut points. Then your script could chop up the track and break the music into individual trimmed pre-comps that would be scene numbered. This would allow me to easily create lots of shots based on arbitrary marker points instead of audio amplitude or visual scene changes. Your thoughts?

  • Hey Lloyd!

    I couldn’t get any edits found no matter what until I changed my Project Settings Frame Count to start at 0 instead of 1 (got the tip from reading through the user comments above). This is in CS5.5 on OSX 10.6.8.

    Once I changed to Start at 0, it detected edits. Just passing along the info.

    Thanks!

    - Jance

  • Wow, works like a charm! Saves me a lot of time.

  • Works just fine in CS4 for me! Better than fine! This script is great!!! Such a time saver.

  • After Effects warning: Timeout while waiting for the engine
    Expression disabled.

    Error occurred at line 5.
    Comp: ‘Comp 1’
    Layer: 2 (‘_Magnum_at_Work_’)
    Property: ‘Slider’

    Uuuuuhhh… Help? Magnum is not working in CS5 or 5.5.

    • How long of a work area are you running Magnum on? AE will run out of memory eventually if it’s a very long work area. Depends on the size and type of footage as well as your machine’s capabilities. I would try running Magnum on short bits at a time. You can test to see how long you can go at one time.

  • I have a video that appears to have been edited but is claimed to be untouched, will this determine if the video has been edited “after” it was originally recorded?

    Thanks,
    Mike

Leave a comment

(to reply to a specific comment use the "Reply to this comment" link next to the author's name)

For support related issues please contact support or post your issue in the forums