New v.2\. How to encode h264 to get best playback?



  • There are many ways to encode your movie with h264. There are many tips to be found in internet. Most of these talk about encoding for youtube or vimeo and often are many years old.

    What has been your experience with the settings for h264?


  • Well, for my testing of 1920x1080 in v2, I've been using FCP X, using the "slow but better" option. (I can't remember what it's called exactly.) Mostly because that's the most obvious tool I have, and I reckon a lot of pros would be using it or Premiere.

    I have no idea if, for instance, the old QT Player 7 would give similar results for encoding. (Something to try I suppose.)
    My test clips are mostly dance video of my heroes (William Forsythe, Pina Bausch, et. al.) that I grabbed from one place or another; with the amount of movement in the frame, I would expect they would be at least sort of demanding. (I chose these because the dance movement lets me know pretty quickly if playback isn't steady. I also burned in timecode, and a white bar that moves from left to right to also help me detect "lumpy" playback.)
    Maybe that offers a bit of insight?
    Best Wishes,
    Mark
    Data rate on these clips hovers around 11 Mbit/s.

  • Tech Staff

    I find that spending the time for the multi-pass encoding is worthwhile. It could be me but feel the image looks cleaner, as well as, providing a tighter file size.

    However I have also been using higher mbps/bitrates.. I have not tested the low end of the quality spectrum


  • I have seen suggestion for After Effects(I got it somewhere, but can't find the source right now).

    Datarate: 5000 kbits/sec 8000kbs

    Imagesize: 1280x720 HD 1080p(1920x1080)

    key frame: Automatic

    Video options: Main, best quality

    However I use bitrate 10Mbs(10000) and Main, the best is 5.1.

    There supposed to be a lossless h264 I see with

    https://trac.ffmpeg.org/wiki/Encode/H.264


  • Tech Staff

    For encoding to .h264 I am using handbrake and I think the software makes a really good job. You can get it for free for Mac, PC and Linux.

    Best
    Michel



  • I would like to ask your experience with best settings as well.

    BTW I did a quick test with handbrake - I have not used it for many years. From ProRes to h264 - encoding went really fast and result was black video without an image whatsoever.

  • Tech Staff

    I use the Normal settings under the Regular tab with constant framerate set.
    Just made a test with a pro res file and the output was fine.

    are you on mac or pc?

    Best
    Michel


  • Tech Staff

    Thanks for the handbrake tip, looks like a tool I need.

    Will give it a run later tonight.


  • Thanks for reminding about the handbrake, indeed.

    However I would like to see some tips about the settings as well. I am able to produce imageless video in many instances. But good results too. Only the gamma is a bit screwed comparing to the original. Has anybody used Advanced settings? It would be great to get this info into knowledge base how to make the best h264.
    some stuff to dig into
    http://mattgadient.com/2013/06/12/a-best-settings-guide-for-handbrake-0-9-9/


  • For the videos I need to be able to reverse/jump to frame etc. the bottom line is NOT to use H264 still? Inversely, a high-quality smooth one-directional playback is the only case one should use h264. Right?

    What about HAP in the above scenarios?
    --8


  • As far as I understand only h264 and ProRes are special by AVFoundation. So for reversing and jumping one should use ProRes.

    HAP is pretty fast by itself played with Quicktime or AVF.


  • @eight, you are correct in saying that reverse playback and jumping are not good in AVFoundation. And jumping is not good in AVFoundation in general. (See my comparison at ISADORA 2.0 QUICK START: MOVIE PLAYBACK)

    As a rule, reverse playback will not be good for any codec where frame _n+1_ relies (at least in part) on frame _n_ to be decoded first, which is true for H264 and MP4.
    For efficient reverse playback and jumping, you want a codec where each frame can be decompressed without referencing any other frames. That's true for Apple ProRes, Photo JPEG, DV, and Animation, as well as HAP. So HAP would be a fine choice to replace Photo JPEG for reverse and/or jumping around.
    However, @vanakaru you are partially correct about what AVFoundation will play. It also supports Photo JPEG and DV, though I don't see these as being any more efficient than QuickTime. For sure, AVFoundation can't play HAP and Animation.
    But as noted in the KB article above, AVFoundation has many drawbacks when it comes to interactivity. In short: AVFoundation is at its best when it's playing a movie forward at normal speed; when you do that, it can be super efficient. But for anything else, you may still need QuickTime.
    I hope that makes things clearer.
    Best Wishes,
    Mark


  • My results (running 10.8.5) are so far favoring...

    AppleProRes or H264 in AVFoundation / Performance playback mode
    HAP in Quicktime / Interaction playback mode

    Most of my performance clips are NTSC 30fps Photo Jpeg, so that means I have lot of transcoding to do.
    Does anyone have recommendations for a high quality batch encoder?
    I have generally used Compressor from Final Cut 7 Studio suite, for batch exporting, and Final Cut Pro or QKT 7 when I only have a few files to convert, but I am sure there must be other good options?

    Jamie



  • Since handbrake seems to do very nice job, it may be the best

    http://www.osomac.com/2013/08/08/handbrake-adds-real-batch-processing/


  • I use extensively Compressor and I find it perfect for the job, presets for codec and destination, can be used directly from FCPX, good quality. I find Handbrake a bit more difficult to tune for my needs and to produce all the different setting I need (vimeo, blue ray, archive, isadora with hap or h264…). But surely mac only…



  • I've used QTAmateur for years;-) It's mac only. https://www.mikeash.com/software/qtamateur/



  • Could you post some good settings you use as well. It is obvious that there are many good apps for the task. That is the reason I started this discussion - so many apps with so many settings. I have seen spectacular quality h264 video but blotchy crap as well. As long we can not tell to the app: "make me fabulous video" lets talk about Mbs and b-frames.

    Also if I use AE default settings for instance I do not get acceptable results(for h264). The same is true with many other apps as well. I think that all the different apps are just a face and it does not matter witch one to use - the work is done by the same algorithm in anyway. However some apps may provide good presets. And some apps have no option to tinker with presets.
    One more thing - how much the setting depend of the content? Will fast and lotsa moving video need different settings than slow one?


  • @john I have not used QTA for years because it opens the movie only as large as you screen is. You can render the movie to the size you need, but often I forget to check the size and I need to redo specially if my movie is larger. Also it is one of the slowest among the ones I have used(Mpeg Streamclip, handbrake, Quicktime 7, AE).



  • If I use something originated in AVC/H.264 video format, the best I've being using in the past few years is 5dtorgb (http://rarevision.com/5dtorgb/) to convert to DPX, ProRes and DNxHD otherwise Compressor



  • QTAmateur is one of the slowest:-(  The only reason I still use it was that I liked Photo-Jpeg clips for Izzy and some of the fastest batch compression algorithms didn't have Photo-Jpeg as an output option.  At one point I tried Wondershare Video Converter Ultimate to try and get a super fast batch compression work flow but like I said it was one of a few render options that didn't work with Photo-Jpeg. The Wondershare Video Converter works really well for other codecs though. It has a lot of useful presets and handles multiple videos at once;-) 


Log in to reply
 

Looks like your connection to TroikaTronix Community Forum was lost, please wait while we try to reconnect.