FORUMS: list search recent posts

H.264 Encoder Comparisons

COW Forums : Compression Techniques

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
Andrew Saliga
H.264 Encoder Comparisons
on Dec 1, 2009 at 9:41:28 pm

I'm testing out different H.264 encoders with settings meant to target the iPhone for playback over a cellular network. I guess this post is more of a "here are my results" kind of post rather than a question. Please do raise any questions that may come from this post.

I'll specify the video encoding parameters as they are what I'm interested in for this post.

Main Concept H.264 - Sorenson Squeeze
  • 1,228Kbps
  • Multi Pass (I think Squeeze does 5-pass)
  • 480x272
  • Baseline@L2.1
  • 4 Ref Frames
  • Keyframe Every 300 and Auto on Scene Change On (Frequency 50)


Sorenson H.264 - Sorenson Squeeze
  • 1,228Kbps
  • 1 Pass CBR
  • 480x272
  • Baseline@L2.1
  • 1 Ref Frame
  • Keyframe Every 300 and Auto on Scene Change On (Frequency 50)


Apple H.264 - Sorenson Squeeze
  • 1,228Kbps
  • 1-Pass
  • Auto Key Frame On
  • 480x272
  • Main@L2.1
  • 2 Ref Frames


x.264 - DV Kitchen
I used the iPhone preset in this app, but settings according to MediaInfo are as follows.
  • 715Kbps
  • 480x270
  • Baseline@L3.0
  • 1 Ref Frame


NOTES:
  • Apples encoder ditched frames. Frame count jumps from 881 to 892 and does not complete the encode, as the video's last frame is 902!

  • Apple's encoder changed the 29.97 fps video to 29.63.

  • Main Concept's encoder handles the fade to black at the end horribly. Horribly! (Daniel Low, we've talked about this before, I still have not found a solution. Everyone seems to say the MainConcept H.264 or Dicas H.264 are the best, but I don't see it in the MC encoder. I'll run some more test and adjust key frame settings, although I'd think the 5-pass encode would solve this.



  • Here is a screen shot of my results. The image is dark because it's 5 frmaes into the fade to black, just where the Main Concept encoder started to have issues. Left to Right, Top to Bottom...
    • Main Concept
    • Sorenson
    • Apple
    • x.264






    -Andrew Saliga

    Steelehouse Productions
    http://www.steelehouse.com (undergoing a much-needed redesign)
    http://www.vimeo.com/steelehouse


    Return to posts index

    Daniel Low
    Re: H.264 Encoder Comparisons
    on Dec 1, 2009 at 11:16:51 pm

    Hummmmmm.

    Interesting.

    Can you do the same screen shots with the files opened in VLC rather than the QT player?

    And just so I've got the layout of the screen grabs correct, are you saying that bottom left is Apple and bottom right is x.264?

    __________________________________________________________________
    "There's no chance that the iPhone is going to get any significant market share. No chance."
    Steve Ballmer To USA Today: 30 April 2007


    Return to posts index

    Andrew Saliga
    Re: H.264 Encoder Comparisons
    on Dec 2, 2009 at 12:00:04 am

    Yes, you are correct on the order.

    Here are the same files in the same order, but opened in VLC player. Whoa! Quite different.




    -Andrew Saliga

    Steelehouse Productions
    http://www.steelehouse.com (undergoing a much-needed redesign)
    http://www.vimeo.com/steelehouse


    Return to posts index


    Andrew Saliga
    Re: H.264 Encoder Comparisons
    on Dec 2, 2009 at 12:01:35 am

    Oh, sorry. I didn't see a way to switch to frames. I did my best to get the screen grab as soon as the counter went to 29 seconds. This is right before the fade begins.

    -Andrew Saliga

    Steelehouse Productions
    http://www.steelehouse.com (undergoing a much-needed redesign)
    http://www.vimeo.com/steelehouse


    Return to posts index

    Andrew Saliga
    Re: H.264 Encoder Comparisons
    on Dec 2, 2009 at 12:06:09 am

    I'm not sure what it is, but when I scrub through a clip in VLC it gets that extreme artifacting. It's not nearly as bad when it's played back.

    -Andrew Saliga

    Steelehouse Productions
    http://www.steelehouse.com (undergoing a much-needed redesign)
    http://www.vimeo.com/steelehouse


    Return to posts index

    Andrew Saliga
    Re: H.264 Encoder Comparisons
    on Dec 2, 2009 at 12:14:22 am

    Maybe I should wait until I'm done testing to post, haha.

    So Sorenson encoded version will let me scrub and skip back and forth without any issues as will the x.264 encode.

    The Apple and Main Concept encodes to not, and the extreme artifacting is introduced.

    -Andrew Saliga

    Steelehouse Productions
    http://www.steelehouse.com (undergoing a much-needed redesign)
    http://www.vimeo.com/steelehouse


    Return to posts index


    Daniel Low
    Re: H.264 Encoder Comparisons
    on Dec 2, 2009 at 12:22:22 am

    Done correctly, x264 will be way ahead of all of the others.

    So my scoring would be:

    1st: x264
    2nd: Dicas
    3rd: Mainconcept/Sorenson.
    4th: Apple

    __________________________________________________________________
    "There's no chance that the iPhone is going to get any significant market share. No chance."
    Steve Ballmer To USA Today: 30 April 2007


    Return to posts index

    Andrew Saliga
    Re: H.264 Encoder Comparisons
    on Dec 2, 2009 at 12:33:42 am

    Here is a redo of the above screen shot without any scrubbing involved in playback. Main Concept on top, Apple on bottom.




    -Andrew Saliga

    Steelehouse Productions
    http://www.steelehouse.com (undergoing a much-needed redesign)
    http://www.vimeo.com/steelehouse


    Return to posts index

    Daniel Low
    Re: H.264 Encoder Comparisons
    on Dec 2, 2009 at 12:48:34 am

    Are you sure?

    Every other test I've seen would have Apple as the top picture and MC below.

    __________________________________________________________________
    "There's no chance that the iPhone is going to get any significant market share. No chance."
    Steve Ballmer To USA Today: 30 April 2007


    Return to posts index


    Andrew Saliga
    Re: H.264 Encoder Comparisons
    on Dec 2, 2009 at 12:54:57 am

    Sorry, maybe I wasn't clear. If you look at the last two posts, you'll see the encode setting in the file name at the top of the player window.

    MC has been on the top and Apple on the bottom.


    -Andrew Saliga

    Steelehouse Productions
    http://www.steelehouse.com (undergoing a much-needed redesign)
    http://www.vimeo.com/steelehouse


    Return to posts index

    Daniel Low
    Re: H.264 Encoder Comparisons
    on Dec 2, 2009 at 1:03:43 am

    I know. All I'm saying is, is that there is no way the Apple codec is better than the Mainconcept one. It's a fact. Your settings MUST be different or the way Squeeze is addressing them must be different or something else

    Please see the below.

    http://www.nxtbook.com/nxtbooks/streamingmedia/0808/#/58



    __________________________________________________________________
    "There's no chance that the iPhone is going to get any significant market share. No chance."
    Steve Ballmer To USA Today: 30 April 2007


    Return to posts index

    Andrew Saliga
    Re: H.264 Encoder Comparisons
    on Dec 2, 2009 at 6:21:37 pm

    I agree, the MC encode should look better, at least according to what I've read. I recall reading that article awhile I ago; I think I found it on one of your posts.

    I ran some more tests with many variation on the Main Concept encoder. It really only seems to struggle at then end with the fade to black.

    I'll describe the settings (variations only) in these two screenshots in the order of top left, top middle, top right, bottom left, etc.

    The top left is the Apple encoder, and the others are the MC encoder.
    • Apple Encode (same as before, except enable multi-pass)
    • MC Encode (same as before)
    • MC Encode - Keyframe every 60 no auto scene change
    • MC Encode - Keyframe every 100 auto to 85 frequency
    • MC Encode - Keyframe every 100 auto to 50 frequency
    • MC Encode - Keyframe every 100 no auto scene change


    In retrospect, I may not have varied the keyframe and auto-kf rates enough to show much of a difference. All files weigh in at 4.9MB. (these are iPhone/Pod encodes)







    -Andrew Saliga

    Steelehouse Productions
    http://www.steelehouse.com (undergoing a much-needed redesign)
    http://www.vimeo.com/steelehouse


    Return to posts index


    Daniel Low
    Re: H.264 Encoder Comparisons
    on Dec 2, 2009 at 7:06:15 pm

    I'd suggest using a forced keyframe setting that is 10x your frame rate and let the codec figure out where best to insert the others. (eg at 30 fps, use a setting of 300)

    Forced Keyframe rates of 100 or below are only generally used for HD material.

    __________________________________________________________________
    "There's no chance that the iPhone is going to get any significant market share. No chance."
    Steve Ballmer To USA Today: 30 April 2007


    Return to posts index

    Andrew Saliga
    Re: H.264 Encoder Comparisons
    on Dec 2, 2009 at 7:43:31 pm

    Keyframe every 300. Still doesn't like the fade at the end.

    I may be hitting a brick wall with this now and stick to the Sorenson encoder until I find a solution.

    I don't want to use anymore of your time Daniel, but can you explain why VLC and QT show me totally different frames when playing back the same clip? I assume they have different decoders, but which is "correct". QT displays what I think I should see, but VLC displays a mess. I tried uploading a portion of the clip (spot hasn't aired yet) to the COW uploader, but the frames it displays are seconds off.

    -Andrew Saliga

    Steelehouse Productions
    http://www.steelehouse.com (undergoing a much-needed redesign)
    http://www.vimeo.com/steelehouse


    Return to posts index

    Daniel Low
    Re: H.264 Encoder Comparisons
    on Dec 2, 2009 at 8:52:54 pm

    [Andrew Saliga] "but can you explain why VLC and QT show me totally different frames when playing back the same clip?"

    Quicktime uses the Apple decoder, VLC uses open source decoders.

    [Andrew Saliga] "I assume they have different decoders, but which is "correct"."

    The correct one is the one that your 'client' uses to view your video. QT sometimes does some funky post-processing to make the clip look better (and occasionally worse), VLC doesn't force post-processing on you, but you have the options there to apply some. VLC sometimes get's it totally wrong BTW.





    __________________________________________________________________
    "There's no chance that the iPhone is going to get any significant market share. No chance."
    Steve Ballmer To USA Today: 30 April 2007


    Return to posts index


    Andrew Saliga
    Re: H.264 Encoder Comparisons
    on Dec 2, 2009 at 10:14:20 pm

    Makes sense. Thanks Daniel.

    I hate to resurrect this thread, so give me a yes or no answer, but do you have any idea why I wouldn't be able to encode x264 with MP4 container in Squeeze? I can do x264 with QT...

    -Andrew Saliga

    Steelehouse Productions
    http://www.steelehouse.com (undergoing a much-needed redesign)
    http://www.vimeo.com/steelehouse


    Return to posts index

    Daniel Low
    Re: H.264 Encoder Comparisons
    on Dec 2, 2009 at 11:57:57 pm


    [Andrew Saliga] "but do you have any idea why I wouldn't be able to encode x264 with MP4 container in Squeeze? I can do x264 with QT... "

    It's probably due to the GPL, the open source licensing laws. If Sorenson allowed x264 to work within their application then they'd have to give up all their source code to the Open source community.

    Seeing as Apple don't charge for Quicktime and they make most of it available as source codec, the same does not apply.


    __________________________________________________________________
    "There's no chance that the iPhone is going to get any significant market share. No chance."
    Steve Ballmer To USA Today: 30 April 2007


    Return to posts index

    Andrew Saliga
    Re: H.264 Encoder Comparisons
    on Dec 3, 2009 at 3:47:23 pm

    You're likely right. I can use x264 to encode a MOV though, but it appears I can't adjust the bitrate.

    -Andrew Saliga

    Steelehouse Productions
    http://www.steelehouse.com (undergoing a much-needed redesign)
    http://www.vimeo.com/steelehouse


    Return to posts index

    << PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
    © 2017 CreativeCOW.net All Rights Reserved
    [TOP]