New DI Codec

I wanted to start a new discussion so that others might have the opportunity to post without drawing an earlier thread off topic.
For a while now I've been using Lagarith as my codec of choice for Digital Intermediate work.  Lags is a free, lossless video codec that provides all the quality of Uncompressed, but at smaller file sizes (though still somewhat larger than DV and other camera formats).  Lags has served it's purpose very well as an intermediate export format that I use to create my MPEG files with.  (HC Encoder just does a much better job than AME, but it needs an exported file to work with.  It can't encode directly from a Premiere sequence.)  And recently, under the premise that fewer compression steps is better, Lags has served well as a source format for editing.  I convert my DV clips to 24p Lags files using the dv2Film process, then bring those Lags clips in to Premiere for editing.  I then create a Lags export for MPEG conversion.  This process has only two compression steps, the original DV (which is unavoidable when shooting with a DV camera), and the final MPEG stage.  All in between steps use the lossless codec Lagarith.
After some recent testing, I have switched over to the UT codec (v 7.0).  While I am relying somewhat on the testing of another regarding it's visual quality*, I have not noticed any problems with the picture using my own media and tests.  What I HAVE noticed is that the final MPEG encodes at about 2.5 times the speed of a Lags DI when I export a UT_YUV420 file from Premiere.  I have also noticed that the UT_YUV422 option works very well for my dv2Film process.  The files it creates are smaller than Lags, use less resources during playback than Lags, and seems to have all the visual quality that I need for the job.
Now one might ask why use a YUV 4:2:2 or 4:2:0 'compromised' color space format instead of the full 4:4:4 of RGB?  There are a couple of reasons.  While theoretically 4:4:4 might seem the better option (and in some very professional cases it may well be), given the media I work with and export to, it's just plain overkill.  DV is a 4:1:1 format (NTSC) and MPEG2 on DVD is a 4:2:0 format.  While technically inferior, these color spaces are yet capable of producing some excellent results.  Witness DVCPRO HD and even AVC-I are both 4:2:2 color space codecs.  And AVC-I is comparable to Master Quality D-5!  So On the one hand, I figure if it's good enough for such professional codecs, it's good enough for me.  And indeed I cannot see any difference between a UT RGB export and a UT YUV export.  What I DO see is considerably smaller files in the YUV export, as well as faster encoding times to MPEG.  So, that is what I use.
To sum up:  Lagarith is an excellent codec for intermediary work.  But I feel UT is every bit as good vidually, and offers performance and file size improvements that make it hard to ignore.
Comments?  Opinions?  Questions?
*"I did a pretty extensive study of...video quality with Lagarith,  Huffyuv, and UT, and...UT-RGB and Lagarith-RGB provide 100%  identical output quality (confirmed with the MSU video quality  measurement tool)"

My notes:
1. Exporting at HD resolution from a Pr sequence using the UT codec is 3 - 4 times faster than exporting the same sequence using the Lagarith codec!
2. With 8 cores pegged in the AME, there was absolutely no difference in encoding speed between Lagarith SD source files and UT SD source files when encoding to MPEG2 DVD.  Both were very, very fast.
3. Decoding UT HD files using MT AviSynth crashes the host application, in my case, VirtualDub.  Conversely, decoding UT HD files using AviSynth with MT disabled works perfectly in VirtualDub.
4. Lagarith HD source files, in concert with hd2sd() and MT AviSynth, only export from VirtualDub twice as fast as UT HD source files with hd2sd() and AviSynth with MT disabled.
5. UT SD source files can be used with MT AviSynth without crashing VirtualDub.  It's only the HD UT files that cause a crash.
Summary:
Since the time saved by using UT on initial export from a Pr HD sequence overcomes the speed limits imposed by non-MT AviSynth as compared to MT AviSynth and Lagarith, and since all SD workflows with UT that I've tested are solid and faster than comparable Lagarith workflows, my new DI codec of choice is UT.
Thanks, Jim!
-Jeff

Similar Messages

  • Does downloadable ProRes decoder work with the newer ProRes codecs

    Lengthy title says it all. I'm wondering if the ProRes decoder that Apple offers as a free download (http://support.apple.com/kb/DL1) works for the newer ProRes codecs LT, Proxy, and 4:4:4. I don't have a non-FCP equipped Mac to test this. Anyone?

    Hmmmm....lemme go check...
    Yup. I have a drive that only has Avid installed on it, and it views ProRes LT just fine.
    Shane

  • New Opus codec support?

    Will iTunes support playing or converting music to the new open source "Opus" codec? The codec has many advantages compared to AAC and MP3 and it is royalty free. It could be used easily in podcasts but also implemented in the iTunes store for better quality.
    This shows comparisons of Opus against other audio standards http://www.opus-codec.org/comparison/
    "Opus can handle a wide range of audio applications, including Voice over IP, videoconferencing, in-game chat, and even remote live music performances. It can scale from low bit-rate narrowband speech to very high quality stereo music. Supported features are:
    Bit-rates from 6 kb/s to 510 kb/s  ---That 's even lower than AAC or mp3 go and nearly 2x the max bitrates of each, it's nearly as good as lossless cd/DVD quality!--
    Sampling rates from 8 kHz (narrowband) to 48 kHz (fullband)
    Frame sizes from 2.5 ms to 60 ms
    Support for both constant bit-rate (CBR) and variable bit-rate (VBR)
    Audio bandwidth from narrowband to full-band
    Support for speech and music  --- can be used in podcasts and music--
    Support for mono and stereo
    Support for up to 255 channels (multistream frames)
    Dynamically adjustable bitrate, audio bandwidth, and frame size
    Good loss robustness and packet loss concealment (PLC)
    Floating point and fixed-point implementation"
    Here are some reference and news links:
    Opus codec website:
    http://www.opus-codec.org/
    http://gigaom.com/2012/09/11/opus-audio-codec-ietf/
    https://hacks.mozilla.org/2012/09/its-opus-it-rocks-and-now-its-an-audio-codec-s tandard/

    Hopefully.
    Opus does have formal industry standardization through IETF (http://tools.ietf.org/html/rfc6716).
    According to IETF's new "mandatory-to-implement" idea, Opus would be required in the future for browsers supporting the WebRTC. It's not clear how effective the mandatory-to-implement directives will be, but if Apple goes along with it, Opus would probably wind up as a QuickTime component and available in a number of applications.
    I highly doubt you'll see Apple selling or using Opus files however.

  • 2 ideas for AppleTV: hybrid HD/blu-ray on Apple TV and a new video codec

    I was impressed with the keynote but I have 2 suggestions for Apple -- one regarding Apple TV and one regarding a new possibility for movie rentals and/or quicktime and/or itunes:
    1. Apple TV - to make this a truly revolutionary device, all you need to do is add a blu-ray/hd-dvd hybrid drive! Now THIS would be a breakthrough the stockholders could have put more money in for :\. You'd have rentals covered digitally through iTunes - regular format & HD, and it would 'just work' with ALL physical media too. Shortly, it would trivialize the format and precipitate the digital rental model even further because instead of paying for two players, consumers have an easy option to cover ALL bases. Once those are covered, the clarity of renting digitally becomes obvious, and iTunes dominates this arena.
    2. You should look into ESPRE Solutions for your video codec and also for live streaming events through iTunes. They have a proprietary codec that can STREAM live HDTV resolutions at very low bandwidths. The latest story is here:
    http://money.cnn.com/news/newsfeeds/articles/prnewswire/NYF05925012008-1.htm
    http://www.espresolutions.com/
    Imagine: Next Keynote. Live. HD. They can actually make that happen for you right now.
    I'm an apple user and investor - I love this company and it's products. These are just things that occurred to me during the keynote to make things even better.

    As much as I would love it if the Apple TV was to have a Blu-Ray player, that will never happen. That is not what Apple is trying to do with this product. If you also look at the direction they are going, it would seem that Apple thinks everyone can do away with all types of media and just go strictly wireless and buy everything through iTunes. This is a real shame. It would appear that Apple just doesn't understand that most people, such as myself, do not want to be pushed into something they don't want. If the Apple TV had a blu-ray drive it would be the only thing I needed for my media center. Since it doesn't I have to either buy one or get something that already has it such as a PS3.

  • Having Trouble with 5.1 Output with the New SurCode Codec in PPro CC

    I've got a 5.1 audio track and I'm using the trial for the SurCode codec, but they've changed a lot of stuff around since I last used it with Premiere Pro CS5.
    Here is my timeline:
    And my current settings for the CurCode Codec:
    When I open the exported .ac3 file in Audicity this is what I get:
    So it has basically just mixed everything down to the front left and right channels, but still exported a 5.1 file.  And I did check to make sure Audicity would open a 5.1 .ac3 file and show audio on all the tracks.
    I'm assuming that some of my settings with the SurCode Codec are incorrect.  Could someone let me know what I'm doing wrong?
    Thanks!

    SOLUTION
    Sorry, I feel dumb.  I figured out what my problem was.  I had created the sequence as a stereo sequence rather than 5.1.  Once I changed that, everything worked fine.
    Hopefully if someone else makes the same mistake this post will help them out.
    Maybe someone could explain some of the settings for the SurCode Codec, though.  For instance, I have no idead what "Primary Level" means.  Or what I should set the dialog level to (I just guessed -12 because that's usually what I like dialog to be around).
    Some tips on these settings would be greatly appreciated.  I found this page on Minnetonka's website, but it doesn't have a manual for this version of the codec (at least not that I could find): http://minnetonkaaudio.com/index.php?option=com_content&view=article&id=61&Itemid=66http:/ /

  • Where to insert/install new QT Codec in hard drive?

    I have a bunch of .avi files from a Casio Exilim camera. I found out I need the EXM4S2 codec which I downloaded. The instructions say to put EX_M4S2 component into /Library/QuickTime however I can't find this in my hard drive ANYWHERE?
    I can't seem to find any Quicktime application support file or anything - just the application file itself.
    Anyone know where I can stick this codec so it will work?
    Any help is appreciated.
    Thanks,
    Andy

    Click on your hard drive icon. This will open up, click on the library folder and look for the Quicktime folder. Place the codec in that folder.
    Repair permission, you'll find this in the disk utility program in the utility folder. Restart you computer...done

  • IMovie 11 and Canon XF Codec used in Canon XF300 and 305

    Does anyone know if iMovie11 will support the new video codec Canon is using their just-released professional camcorders, the XF200 and 305?
    Canon's description states:
    "Canon's adaptation of MPEG-2 for the XF305 Professional Camcorder, named the Canon XF Codec, ensures the widest compatibility with existing industry infrastructure and non-linear editing (NLE) systems. And by using an MXF file wrapper, video and audio can be wrapped in a single file along with important metadata. The codec's 50Mbps constant bit rate provides the bandwidth needed to capture the XF305's superior resolution and color in spectacular detail."
    Thank you.

    No, it will not work in iMovie.
    This is a bit of a mismatch. A $7500 camera with a $20 editing app.
    You can edit with this camera using Final Cut Pro and ProRes422 intermediate codec.
    See these threads, for example...
    [http://discussions.apple.com/thread.jspa?messageID=12247532&#12247532|http://di scussions.apple.com/thread.jspa?messageID=12247532&#12247532]
    [http://discussions.apple.com/thread.jspa?messageID=12253057&#12253057|http://di scussions.apple.com/thread.jspa?messageID=12253057&#12253057]
    [http://discussions.apple.com/thread.jspa?messageID=12130886&#12130886|http://di scussions.apple.com/thread.jspa?messageID=12130886&#12130886]
    Having said that, if you have Final Cut Pro installed on, say, a Mac Pro with a fast eSata drive array, it might be worth trying in iMovie, just to see. But you would need FCP just to get the codec.
    Message was edited by: AppleMan1958
    Message was edited by: AppleMan1958

  • AVCHD codec importing problems

    Hey Guys,
    We are trying to test out some new that has been shot with the new AVCHD codec. We got it transfered to a HD in teh P2 wrapper format. And now im tryin to log and transfer the footage. I have downloaded the AVC Intra Decoder from the Panasonic website. I can see the footage and scrub through it in the Log and Transfer window , but when i 'add the clip to the queue' it spins as if it was importing it. Then it stops and gives me a red circle with an exclamation mark in teh middle. As though it has failed. Any one experienced this as well, or know what the problem is? Thanks!
    PS I have all the correct requirements (Intel, OSX 10.4.11, FCP 6.0.2, 5GB Ram)

    thanks for joing in. may be a space problem or even a bad file, not sure , should work from what i have read. had trouble on ms machine too. will post back. thought someone else might have already run in to unable to select problem. guessing this means i could do it if there was not an issue. figuiring out the issue is problematic. later

  • Best codec for dvd release

    I'm finishing two extras for a dvd re-release of a film I made in 1980, and am very new to codecs and HD, would like to know the best quality transfer/conversion and/or codec for putting into a DVD release format with a digi-beta master.

    Thanks for all the suggestions; to clairify, I wrote, directed and produced Ghostkeeper, am editing the extras which I want included on the DVD, so distrib said go ahead but he's not paying for it. So I'm doing 2 extras (actor & DP) on my own. I've had FCP3 (DV) for years and finally upgraded some time ago to, still not all that familiar with HD needs and requirements.
    Distrib will make the dvds, he made a digi-beta copy from a 35mm film print and said all he needs is a QT file, but he's not really tech-savvy, thus my enquires. I will definitely be speaking with whomever is actually making the DVD's, they'll be re-released in a week or two.
    I'm editing on FCP Studio 3 and downloaded two different files; the movie itself from a dvd straight from the digi-beta copy and the extras interview ftg comes from a Canon 5D with separate sound recording, thus having to sync it (got someone better than me to do that). I made the mistake of conflicting codecs, but still managed to stumble my way through.
    Movie was released in 1980 via theater and VHS and was lost in obscurity until a cult following began. You can see my first cut on youtube at:

  • Can't open video project--missing codecs and offline media

    I tried opening a project in Elements 7 (old, I know), but it said that "this type of file is not supported, or the required codec is not installed." When I close the dialog box the project opens and the music is there, but the pictures and videos have been replaced with a red screen that says "media off-line." I tried opening a different project I created a few weeks ago and it opened just fine.  I store all my projects on an external hard drive.  Any thoughts on how I can get my video back?

    Great news!
    CODEC's are a subject that could fill a good-sized book (and has), plus new ones, or heavily tweaked ones, appear almost quarterly, so that book would need to be updated every 3, or so, months. For general discussion on CODEC's, there is a link in that mentioned article, down a bit, and more detail is offered.
    What often happens is that one will have many CODEC's installed on a computer, and much AV material is covered by those. Then, if the OS gets upgraded, or one moves to another computer, the list of installed CODEC's does not include one that is necessary. In those cases, knowing the exact CODEC required, is the first step (MediaInfo, or G-Spot will be helpful here), and then downloading (might be free, or for pay) and installing the required CODEC, will usually solve the issue - so long as one's NLE (Non Linear Editor) can use that CODEC. Many will just be a simple install and reboot, but some are quite specific, and might, or might not be useful for editing, depending on the NLE. An example of this is DivX, and Xvid, which can be used for playback, and DivX for Encoding out of PrE, but PrE usually does NOT edit material with either of those CODEC's, even if properly installed on a system.
    Glad that you got it sorted out, and happy editing,
    Hunt

  • Cineform-How to read this codec on pre-2014.1 systems

    What is involved for pre 2014.1 systems to read the new cineform codec that ships with PPro 2014.1? I am looking to use in both AE CC-v12 and PPro 2014 and CC 7.2.

    Try and find out ...and let us know.
    You wont break anything.

  • Allowed codecs for import?

    Hello,
    I'm new to PE 7 and I'm having some problems with the import of a video. I captured it with the program FRAPS (FPS1 codec) which I know is not supported for import. But when I search the manual, there only is a list of allowed filetypes for import, but not the codecs.
    I'm looking for a lossless codec that PE 7 can handle. Does anyone know?

    There will always be that "trial and error" aspect. With the number of programs, cameras, etc., that use various CODEC's and new ones coming out monthly (or variations on existing ones), a user has to do their homework to stay current. As I stated up-thread, camera mfgr's. are always looking to squeeze a touch more quality into a smaller package, so their coders are always looking to tweak what's already out there, or create a new CODEC.
    Some of these play-nice with existing NLE's, but many do not. For SD work, the goal is to get to DV-AVI Type II, in the fewest possible steps. With HD material, the water is very muddy right now. It appears that AVCHD is in the lead, though working with that format is very taxing on one's system, and the need to upgrade to the "latest and greatest" is very high, indeed. Even with AVCHD, there is a "lite" version, that is causing some a bit of grief.
    In the pro ranks, the Red camera and its files are right around the corner for Adobe. There is much speculation that Red and Adobe will have it all working with the CS4 4.1 release - due any day now. A new CODEC for Adobe is on the horizon. Some of the older "players" like CineForm have yet to update their output to match what is currently available. There material works well in CS3, but has yet to be updated to CS4, or had not been, last time I checked.
    One reason that the Sony Vegas products work so well with some of the Sony CODEC's is that the development labs are right next door and projects are usually a dual effort. Companies, like Adobe, have to wait until the format/CODEC has been released, and then re-code for it. There is a definite lag with this method. Some users and potential users bash Adobe (and others), because Vegas can do it, so why can't Adobe? If they got the code and the specs, before they were released, they could, to a degree. Vegas gets to time their releases to coincide with the release of a new format/CODEC on Sony cameras. Adobe has no such luxury.
    A good book on all things DVD, DVD Demystified, by Taylor, Johnson & Crawford, Mc Graw Hill, has a lot of great info on CODEC's, but because it's printed material, will never be at the cutting edge. Even though it just covers the CODEC's used in the production of DVD's and BD, it will always be behind the development curve with regards to the latest developments. Even on-line material lags behind. Catching pod-casts from all of the "players" is about as good as we can get, and then one often has to "read between the lines."
    Yes, the world of CODEC's is a wonderous and mysterious realm. In video (and still) production, we need them daily, and will always be behind the curve, but we usually do not need to know how to write them. With tools like G-Spot, Google and fora like this one, we can pretty much stay as current, as we need to be.
    Last comment: I am a firm believer in only having the CODEC's that I need on my system. There are no bonus points for having the most CODEC's on one's machine. I also look for the paid version from the developer of any that I do need, and will spend $, rather than go for a possibly hacked, or reverse-engineered free version. This does not mean that free CODEC's are bad - only that I will pay to get as close to the source, as is possible. I want something that always works with my system and something that will do the best job possible.
    Hunt

  • Does FCPX have H 265 codec support?

    As Apple issued a new update support for H 265 codec for FCPX?

    Wildrex wrote:
    …  who do we have to beg to get h.265 in fcpx ????
    I guess, a consumer cam from *YouKnowWho* is no real trigger for Apple …
    as mentioned before: Only the iPhone6 utilizes h.265 yet in the  ecosphere.- But not for 'broadcast' but FaceTime only …
    BUT ....
    as mentioned too:
    aerial UHD paws the ground (big discussion actually here in Germany: all DBVT hardware obsolete 2017!) …
    on consumer computers h.264 encoding is hardware accelerated… so, it probably needs some really coding 'tricks' to encode new h.265  on 'old' GPUs within a comparable time-frame..... who will be first egg or hen new chips or new software-codecs?
    whoooo, we scratch along the Terms of Use of this boards real close ............................... (no speculation about future products)

  • Creative Cloud evaporates - billing fiasco

    This is both a plea for help and a rant:
    I've been trying to subscribe to the Cloud for nearly a month now and my trial versions are about to run out leaving me with numerous cleint projects in limbo. I still have CS6 (and 5 & 5.5 because I am a bit paranoid about legacy issues) but most new projects I've been shooting on Sony's new 4K codec which is only available on CC (not sure why they can't offer a new codec in CS6 but that's another topic).
    For some reason, every time I order Creative Cloud I get this message: "We'll look into that and get back to you You should get an email from us by next business day. If you don't hear back from us, you can check your order status on your account page or call us at +1 800-585-0774" and every time I get no answer and the order does not show up in my account. I've wasted nearly six hours with tech support (at my hourly billing rate I could have paid for the full Creative Suite for a year in that time) and am no closer to resolving this issue than when it started. I've placed the order on Chrome, Safari and Firefox in case it was a browser issue, but receive the same message each time.
    Beyond the fact that in a few days my trial versions will expire and I'll have to explain to my clients that I can't finish their projects because I can't pay my subscription fees, I am deeply worried that even if I can magically fix this problem that billing issues like this will arise in the future. By now I have absolutely no faith left in Adobe's ability to provide Cloud services and am looking for any and all options outside of Creative Suite for high-end productions. I know for editing there are options (FCP and Avid) but for motion graphics AE seems the best from my experience. I'd hate to switch back after all the time and cost of moving to a predominately Adobe video workflow the past three years (not to mention all the third party plug-ins) but I need a platform that is reliable and this Cloud seems to evaporate far too easily.
    Does anyone have any aswers on how I can possibly get CC to work? If not, anyone have suggestions on other platforms that are comparible?

    Hi geophrian
    Have you tried amazon.com?
    Digital subscription through amazon
    http://www.amazon.com/Adobe-Creative-Membership-Digital-Subscription/dp/B00CS74YQO/ref=sr_ tr_sr_1?ie=UTF8&qid=1375651497&sr=8-1&keywords=adobe+creative+cloud
    3-month pre-paid CC 149.97$
    http://www.amazon.com/Adobe-Creative-Membership-Pre-Paid-Product/dp/B007W76ZLW/ref=sr_1_6? ie=UTF8&qid=1375651497&sr=8-6&keywords=adobe+creative+cloud
    I don´t know if they reject you or not, but worth a try?
    Peter

  • Re: how to capture a frame from a video file and save it as a jpeg

    package com.snn.multimedia;
    * @(#)FrameAccess.java     1.5 01/03/13
    * Copyright (c) 1999-2001 Sun Microsystems, Inc. All Rights Reserved.
    * Sun grants you ("Licensee") a non-exclusive, royalty free, license to use,
    * modify and redistribute this software in source and binary code form,
    * provided that i) this copyright notice and license appear on all copies of
    * the software; and ii) Licensee does not utilize the software in a manner
    * which is disparaging to Sun.
    * This software is provided "AS IS," without a warranty of any kind. ALL
    * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES, INCLUDING ANY
    * IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR
    * NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN AND ITS LICENSORS SHALL NOT BE
    * LIABLE FOR ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING
    * OR DISTRIBUTING THE SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR ITS
    * LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR DIRECT,
    * INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES, HOWEVER
    * CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY, ARISING OUT OF THE USE OF
    * OR INABILITY TO USE SOFTWARE, EVEN IF SUN HAS BEEN ADVISED OF THE
    * POSSIBILITY OF SUCH DAMAGES.
    * This software is not designed or intended for use in on-line control of
    * aircraft, air traffic, aircraft navigation or aircraft communications; or in
    * the design, construction, operation or maintenance of any nuclear
    * facility. Licensee represents and warrants that it will not use or
    * redistribute the Software for such purposes.
    import java.util.Date;
    import java.util.Arrays;
    import java.util.Iterator;
    import javax.imageio.ImageIO;
    import javax.imageio.stream.ImageOutputStream;
    import javax.imageio.ImageWriter;
    import java.awt.*;
    import java.awt.image.BufferedImage;
    import java.awt.image.DataBufferByte;
    import javax.media.*;
    import javax.media.control.FramePositioningControl;
    import javax.media.control.TrackControl;
    import javax.media.Format;
    import javax.media.format.*;
    import javax.media.util.BufferToImage;
    import javax.media.util.ImageToBuffer;
    import java.io.FileOutputStream;
    import java.io.OutputStream;
    import com.sun.image.codec.jpeg.*;
    * Sample program to access individual video frames by using a
    * "pass-thru" codec. The codec is inserted into the data flow
    * path. As data pass through this codec, a callback is invoked
    * for each frame of video data.
    public class FrameAccess extends java.awt.Frame implements ControllerListener
    Processor p;
    Object waitSync = new Object();
    boolean stateTransitionOK = true;
    * Given a media locator, create a processor and use that processor
    * as a player to playback the media.
    * During the processor's Configured state, two "pass-thru" codecs,
    * PreAccessCodec and PostAccessCodec, are set on the video track.
    * These codecs are used to get access to individual video frames
    * of the media.
    * Much of the code is just standard code to present media in JMF.
    public boolean open(MediaLocator ml)
    try
    p = Manager.createProcessor(ml);
    catch (Exception e)
    System.err.println("Failed to create a processor from the given url: "
    + e);
    return false;
    p.addControllerListener(this);
    // Put the Processor into configured state.
    p.configure();
    if (!waitForState(p.Configured))
    System.err.println("Failed to configure the processor.");
    return false;
    // So I can use it as a player.
    p.setContentDescriptor(null);
    // Obtain the track controls.
    TrackControl tc[] = p.getTrackControls();
    if (tc == null)
    System.err.println("Failed to obtain track controls from the processor.");
    return false;
    // Search for the track control for the video track.
    TrackControl videoTrack = null;
    for (int i = 0; i < tc.length; i++)
    if (tc.getFormat() instanceof VideoFormat)
    videoTrack = tc[i];
    break;
    if (videoTrack == null)
    System.err.println("The input media does not contain a video track.");
    return false;
    VideoFormat currentFormat = (VideoFormat)videoTrack.getFormat();
    System.err.println("Video format: " + videoTrack.getFormat() );
    videoTrack.setFormat(new VideoFormat("RGB", currentFormat.getSize(), currentFormat.getMaxDataLength(), currentFormat.getDataType(), currentFormat.getFrameRate()));
    // Instantiate and set the frame access codec to the data flow path.
    try
    // Try to retrieve a FramePositioningControl from the player.
    FramePositioningControl fpc = (FramePositioningControl) p.getControl("javax.media.control.FramePositioningControl");
    if (fpc == null)
    System.err.println("The player does not support FramePositioningControl.");
    System.err.println("There's no reason to go on for the purpose of this demo.");
    return false;
    Time duration = p.getStopTime();
    long totalFrames = 0;
    if (duration != Duration.DURATION_UNKNOWN)
    System.err.println("Movie duration: " + duration.getSeconds());
    totalFrames = fpc.mapTimeToFrame(duration);
    if (totalFrames != FramePositioningControl.FRAME_UNKNOWN)
    System.err.println("Total # of video frames in the movies: "
    + totalFrames);
    } else
    System.err.println("The FramePositiongControl does not support mapTimeToFrame.");
    } else
    System.err.println("Movie duration: unknown");
    long[] frames;
    if (totalFrames > 0L)
    double intervalDouble = Math.floor(totalFrames / 5.0);
    long interval = new Double(intervalDouble).longValue();
    frames = new long[5];
    frames[0] = 1;
    frames[1] = frames[0] + interval;
    frames[2] = frames[1] + interval;
    frames[3] = frames[2] + interval;
    frames[4] = frames[3] + interval;
    } else
    frames = new long[1];
    frames[0] = 1;
    // Codec codec[] = { new PreAccessCodec(), new PostAccessCodec()};
    Codec codec[] = { new OverlayCodec(frames)};
    videoTrack.setCodecChain(codec);
    catch (UnsupportedPlugInException e)
    System.err.println("The process does not support effects.");
    // Realize the processor.
    p.prefetch();
    if (!waitForState(p.Prefetched))
    System.err.println("Failed to realize the processor.");
    return false;
    // Display the visual & control component if there's one.
    setLayout(new BorderLayout());
    Component cc;
    Component vc;
    if ((vc = p.getVisualComponent()) != null)
    add("Center", vc);
    if ((cc = p.getControlPanelComponent()) != null)
    add("South", cc);
    // Start the processor.
    p.start();
    setVisible(true);
    return true;
    public void addNotify()
    super.addNotify();
    pack();
    * Block until the processor has transitioned to the given state.
    * Return false if the transition failed.
    boolean waitForState(int state)
    synchronized (waitSync)
    try
    while (p.getState() != state && stateTransitionOK)
    waitSync.wait();
    catch (Exception e)
    return stateTransitionOK;
    * Controller Listener.
    public void controllerUpdate(ControllerEvent evt)
    if (evt instanceof ConfigureCompleteEvent
    || evt instanceof RealizeCompleteEvent
    || evt instanceof PrefetchCompleteEvent)
    synchronized (waitSync)
    stateTransitionOK = true;
    waitSync.notifyAll();
    } else
    if (evt instanceof ResourceUnavailableEvent)
    synchronized (waitSync)
    stateTransitionOK = false;
    waitSync.notifyAll();
    } else
    if (evt instanceof EndOfMediaEvent)
    p.close();
    System.exit(0);
    * Main program
    public static void main(String[] args)
    if (args.length == 0)
    prUsage();
    System.exit(0);
    String url = args[0];
    if (url.indexOf(":") < 0)
    prUsage();
    System.exit(0);
    MediaLocator ml;
    if ((ml = new MediaLocator(url)) == null)
    System.err.println("Cannot build media locator from: " + url);
    System.exit(0);
    FrameAccess fa = new FrameAccess();
    if (!fa.open(ml))
    System.exit(0);
    static void prUsage()
    System.err.println("Usage: java FrameAccess <url>");
    * Inner class.
    * A pass-through codec to access to individual frames.
    public class PreAccessCodec implements Codec
    * Callback to access individual video frames.
    void accessFrame(Buffer frame)
    // For demo, we'll just print out the frame #, time &
    // data length.
    long t = (long) (frame.getTimeStamp() / 10000000f);
    System.err.println("Pre: frame #: " + frame.getSequenceNumber()
    + ", time: " + ((float) t) / 100f + ", len: "
    + frame.getLength());
    * The code for a pass through codec.
    // We'll advertize as supporting all video formats.
    protected Format supportedIns[] = new Format[] {
    new VideoFormat(null)
    // We'll advertize as supporting all video formats.
    protected Format supportedOuts[] = new Format[] {
    new VideoFormat(null)
    Format input = null, output = null;
    public String getName()
    return "Pre-Access Codec";
    // No op.
    public void open()
    // No op.
    public void close()
    // No op.
    public void reset()
    public Format[] getSupportedInputFormats()
    return supportedIns;
    public Format[] getSupportedOutputFormats(Format in)
    if (in == null)
    return supportedOuts;
    } else
    // If an input format is given, we use that input format
    // as the output since we are not modifying the bit stream
    // at all.
    Format outs[] = new Format[1];
    outs[0] = in;
    return outs;
    public Format setInputFormat(Format format)
    input = format;
    return input;
    public Format setOutputFormat(Format format)
    output = format;
    return output;
    public int process(Buffer in, Buffer out)
    // This is the "Callback" to access individual frames.
    accessFrame(in);
    // Swap the data between the input & output.
    Object data = in.getData();
    in.setData(out.getData());
    out.setData(data);
    // Copy the input attributes to the output
    out.setFormat(in.getFormat());
    out.setLength(in.getLength());
    out.setOffset(in.getOffset());
    return BUFFER_PROCESSED_OK;
    public Object[] getControls()
    return new Object[0];
    public Object getControl(String type)
    return null;
    public class OverlayCodec extends PreAccessCodec
    long[] myFrames;
    BufferedImage work;
    byte[] workData;
    int width;
    int height;
    int dataLen;
    RGBFormat supportedRGB = new RGBFormat(null, // size
    Format.NOT_SPECIFIED, // maxDataLength
    Format.byteArray, // dataType
    Format.NOT_SPECIFIED, // frameRate
    24, // bitsPerPixel
    3, 2, 1, // red/green/blue masks
    3, // pixelStride
    Format.NOT_SPECIFIED, // lineStride
    Format.FALSE, // flipped
    Format.NOT_SPECIFIED); // endian
    public OverlayCodec(long[] frames)
    // force specific input format
    supportedIns = new Format[] {
    supportedRGB};
    myFrames = new long[frames.length];
    System.arraycopy(frames, 0, myFrames, 0, frames.length);
    public String getName()
    return "Capture Codec";
    public Format setInputFormat(Format format)
    if ((format != null) && (format instanceof RGBFormat)
    && format.matches(supportedRGB))
    // set up working image if valid type
    // (it should be since we insisted!)
    Dimension size = ((RGBFormat) format).getSize();
    width = size.width;
    height = size.height;
    dataLen = width * height * 3;
    if ((dataLen > 0)
    && ((work == null) || (work.getWidth() != width)
    || (work.getHeight() != height)))
    // working image - same 3-byte format as buffer
    work = new BufferedImage(width, height,
    BufferedImage.TYPE_3BYTE_BGR);
    // reference to pixel data
    workData = ((DataBufferByte) work.getRaster().getDataBuffer()).getData();
    return format;
    * Callback to access individual video frames.
    void accessFrame(Buffer in)
    try
    if (Arrays.binarySearch(myFrames, in.getSequenceNumber()) >= 0)
    BufferToImage stopBuffer = new BufferToImage((VideoFormat) in.getFormat());
    Image stopImage = stopBuffer.createImage(in);
    BufferedImage outImage = new BufferedImage(140, 96,
    BufferedImage.TYPE_INT_RGB);
    Graphics og = outImage.getGraphics();
    og.drawImage(stopImage, 0, 0, 140, 96, null);
    FileOutputStream fout = new FileOutputStream("image"
    + in.getSequenceNumber() + ".jpg");
    writeImage(outImage, fout);
    catch (Exception e)
    e.printStackTrace();
    public int process(Buffer in, Buffer out)
    try
    accessFrame(in);
    BufferToImage stopBuffer = new BufferToImage((VideoFormat) in.getFormat());
    Image stopImage = stopBuffer.createImage(in);
    ImageToBuffer outImagebuffer = new ImageToBuffer();
    out = outImagebuffer.createBuffer(stopImage, p.getRate());
    // Swap the data between the input & output.
    in.copy(out, true);
    catch (Exception e)
    e.printStackTrace();
    return BUFFER_PROCESSED_OK;
    void writeImage(BufferedImage outImage, OutputStream os) throws Exception
    Iterator writers = ImageIO.getImageWritersByFormatName("jpg");
    ImageWriter writer = (ImageWriter) writers.next();
    ImageOutputStream ios = ImageIO.createImageOutputStream(os);
    writer.setOutput(ios);
    writer.write(outImage);
    ios.close();

    Hi,
    I have a jpeg movie file 60 mins long and a text file tell me five time-lines for breaking the movie. For example, break the movie at 10:21, 16:05�
    The final output should be five small jpeg movie files. Each file contains a 90 sec (30 sec before the break time and 60 sec after the break time).
    Do you know any java library (jar) contain the library that can help me on programming this? Any existing source code? Any SDK for a movie editor can do that?
    Please help.
    Thanks
    Kenny

Maybe you are looking for