Improving video export speeds in a cocoa app

Discussion in 'Mac Programming' started by andybudd, Oct 28, 2008.

  1. andybudd macrumors newbie

    Joined:
    Oct 28, 2008
    #1
    Hi there,

    We have a small cocoa app that captures screen activity and turns it into quicktime movies. We're encoding the videos via quicktime using h.264 and this process takes around 3-4 times the length of the recording. I was wondering if anybody had any suggestions about how we could increase encoding/export speeds and reduce the file sizes?

    Oh, and if you happen to know any great freelance Mac encoding experts, I'd love to hear from them.
     
  2. kainjow Moderator emeritus

    kainjow

    Joined:
    Jun 15, 2000
  3. andybudd thread starter macrumors newbie

    Joined:
    Oct 28, 2008
    #3
    ffmpeg

    I had a quick look at ffmpeg, but haven't played with it yet. Do you have experiencing using it and how does it compare with QT speed wise?
     
  4. HiRez macrumors 603

    HiRez

    Joined:
    Jan 6, 2004
    Location:
    Western US
    #4
    For one thing you can do 1-pass instead of 2-pass encoding, that can dramatically cut down on encoding time. This will decrease quality to some extent if you are using a variable bit rate, but the quality hit may be negligible compared to the time cost. As I understand it, if you're doing a constant bit rate, there is no need to do 2-pass encoding.
     
  5. kainjow Moderator emeritus

    kainjow

    Joined:
    Jun 15, 2000
    #5
    I wrote a utility for converting videos and I had a separate tool for converting QT movies. QT was almost always slower in every instance that I remember. I didn't do specific testing with timing but from general use it was obvious. I'd suggest you check it out.
     
  6. andybudd thread starter macrumors newbie

    Joined:
    Oct 28, 2008
    #6
    That's the first thing we tried and you're right. It did reduce export times by about 40%. We're using constant bit rate so like you say, it wasn't needed anyway.

    I'm not sure if there are any useful libraries out there that will help speed up encoding. However the one thing we are looking at doing is providing support for hardware encoding dongles like the Elgato Turbo264. However that will obviously only help a small number of users.

    Any other thoughts or ideas are welcome
     
  7. yeroen macrumors 6502a

    yeroen

    Joined:
    Mar 8, 2007
    Location:
    Cambridge, MA
    #7
    QT is known to be slow.

    x264 is probably your best chance of speeding up the conversion process.
     
  8. andybudd thread starter macrumors newbie

    Joined:
    Oct 28, 2008
    #8
    That's excellent, so will definitely check it out!

    Thx
     
  9. HiRez macrumors 603

    HiRez

    Joined:
    Jan 6, 2004
    Location:
    Western US
    #9
    Yeah, the x264 codec is great. I don't know about the speed of it, but I started using it because it doesn't have a problem with changing gamma profiles that the QuickTime one does.
     

Share This Page