Help converting AVI h.264 to use in iMovie

Discussion in 'Digital Video' started by bobriot, Mar 5, 2012.

  1. bobriot macrumors member

    Joined:
    Feb 25, 2007
    #1
    Hello,

    Can I ask for some help...
    I bought a very cheap video camera that records files to the following...

    Input #0, avi, from 'IMAG0009.AVI':
    Metadata:
    date : 2012-02-26
    ICRT : 09:15:20
    comment :
    Duration: 00:00:05.60, start: 0.000000, bitrate: 9091 kb/s
    Stream #0.0: Video: h264 (Main), yuv420p, 1440x1080 [PAR 4:3 DAR 16:9], PAR 1:1 DAR 4:3, 29.97 fps, 29.97 tbr, 29.97 tbn, 59.94 tbc
    Stream #0.1: Audio: aac, 48000 Hz, stereo, s16, 128 kb/s

    I would like to be able to play with them in iMovie as they are with hopefully no image loss. I have been using ffmpeg command line to copy them to mp4 or mov.

    ffmpeg -i IMAG0009.AVI -y -vcodec copy myvideo.mp4

    It flashes through and creates a mp4 copy but iMovie will still not show it in the project.

    Does anyone have a command line that they know will work with this file in iMovie 09?

    Example movie is here...

    http://www.eggbanjo.com/vid/IMAG00009.AVI


    Really appreciate any help..

    Thanks
    Bob
     
  2. simsaladimbamba

    Joined:
    Nov 28, 2010
    Location:
    located
    #2
    • Get MPEG Streamclip.
    • Open the .avi file in MPEG Streamclip.
      [​IMG]
    • Go to File > Export to QuickTime (CMD+E).
      [​IMG]
    • Select "Apple Intermediate Codec" under Compression.
      [​IMG]
    • Leave the Sound at Uncompressed and uncheck Interlaced Scaling, as the footage is progressive.
      [​IMG]

    If you have several video files, you can use MPEG Streamclip's Batch List:
    [​IMG]

    Those .mov files now use the Apple Intermediate Codec, which is a codec iMovie understands and uses and doesn't need to transcode anymore.


    ____________________________________________________________

    Maybe have a look at Advanced Search to find similar threads:
    [​IMG]
    ____________________________________________________________
     
  3. bobriot thread starter macrumors member

    Joined:
    Feb 25, 2007
    #3
    Holy Moly that was quick!!!

    I'll give it a go now. Thanks
     
  4. bobriot thread starter macrumors member

    Joined:
    Feb 25, 2007
    #4
    Thanks thats worked! Only problem is that the 6.1 Mb file is now 48 Mb which means 6 mins of video weighs in at 3.3Gb. Any recommendations on how to keep the files size similar to the original?


    Again many thanks.

    Bob
     
  5. simsaladimbamba

    Joined:
    Nov 28, 2010
    Location:
    located
    #5
    That is to be expected, as the .avi file uses the highly compressive H.264 codec, which is not meant for editing, which also does not store every frame, thus the frames between two stored frames (keyframe) have to be calculated (interpolated) during playback, which results in higher CPU usage.
    Apple Intermediate Codec is an editing friendly codec, as it stores every frame, thus there is no need for interpolation, which results in less CPU usage during playback and frame precise editing.
    The drawback is the bigger file size.

    But if you use iMovie, there is no way around this. Just get an external 500 GB to 1 TB HDD connectable via Firewire 800 or USB 2.0 (if your Mac doesn't have FW 800) to have enough storage capacity and a better editing experience, as it is not recommended to use the HDD, where the OS resides on as place to store video on you will edit with.
     
  6. bobriot thread starter macrumors member

    Joined:
    Feb 25, 2007
    #6
    Thank you very much simsaladimbamba, that explains it very clearly.

    Bob
     
  7. Zwhaler macrumors 604

    Zwhaler

    Joined:
    Jun 10, 2006
    #7
    How about converting the source at 9091 kbps? There isn't any way he's getting more quality out of a larger filesize so you might as well do that to cut the size down and keep at the same quality.
     
  8. simsaladimbamba

    Joined:
    Nov 28, 2010
    Location:
    located
    #8
    What do you mean with that? Limiting the "data rate" on the Apple Intermediate Codec encoded .mov file or on what?
    [​IMG]
    :
    Again
    Since the H.264 encoded video does not store every frame, but only keyframes (let's say every 15th frame for example), the frames between those keyframes are calculated during playback. That is why H.264 encoded files can be so small and are quite CPU intensive.
    But since iMovie does not accept that codec and format (.avi), Apple Intermediate Codec is the alternative, but as the Apple Intermediate Codec stores every frame, the file gets bigger.
    If one were to reduce the data rate, if it would be possible, one would take away visual quality.
     
  9. cgbier macrumors 6502a

    Joined:
    Jun 6, 2011
    #9
    AIC works with a fixed bitrate. For import to iMovie I'd ONLY use AIC, as anything else would be transcoded to AIC in any way, thus there'd be another, quality-eating, transcoding process.
     
  10. Zwhaler macrumors 604

    Zwhaler

    Joined:
    Jun 10, 2006
    #10
    Okay, if you can't limit data rate, the only other way to reduce file size is to lower the "Quality" setting. If the resulting file looks lower quality than the original then stick with 100%. I'm just trying to find ways to reduce file size here because it sounds like it went up considerably.
     
  11. simsaladimbamba

    Joined:
    Nov 28, 2010
    Location:
    located
    #11
    But that is due to the Apple Intermediate Codec. As the source is 1440 x 1080, the Apple Intermediate Codec has a data rate of 12 to 14 MB/s, therefore the file size is expected.

    Final Cut Pro 5: About HDV and the Apple Intermediate Codec
     

Share This Page