Take the 2-minute tour ×
Video Production Stack Exchange is a question and answer site for engineers, producers, editors, and enthusiasts spanning the fields of video, and media creation. It's 100% free, no registration required.

I know that it's very hard to find out best encoding parameters for a whole video file. Wouldn't it be easier to just go through the video and find out the best parameters for different parts (or scenes).

Does it make sense or probably there is software that already allows that?

share|improve this question
1  
No need to use two-passes. See the FFmpeg and x264 Encoding Guide; specifically the section on using a constant rate factor (CRF) for examples and more information. All you need to do is pick your crf value which controls your quality, and your encoding preset which controls your encoding speed/compression efficiency. –  LordNeckbeard Mar 15 '13 at 21:34
add comment

2 Answers

up vote 5 down vote accepted

What you are describing is effectively what 2-pass VBR does for you. It makes a first path that calculates the level of change for each particular time in the video and then uses this information to make the best possible use of the available storage space.

It is, however, entirely possible to do the process manually by doing multiple encodings with different parameters. In fact, many formats even support having multiple encodings with different parameters within the same file. This is how you are able to change the resolution on the fly when streaming videos on YouTube and how Netflix automatically adjusts the quality on the fly as you watch to try to avoid buffering issues.

Any professional level encoder should allow you to specify multiple formats for the file in queue and many will even let you specify multiple outputs for one instance of the file. (For example, the render queue in After Effects allows for this.)

In general, I would recommend running a 2-pass VBR and then adjusting the keyframe and total bandwidth accordingly. If you are using a format that works based on the motion in the scene, then generally keyframes need to be more often if the video gets lots of motion artifacts (where it diverges from where it actually should be too much in high motion). If the video is simply too low quality and "pixelly", then the bandwidth generally needs to be raised or the keyframes lowered.

share|improve this answer
    
Do you know of software that allows scene/regional parameters for MPEG-2 or AVC encoding? I have read that Hollywood DVDs are mastered by a 'compressionist' who uses tools which allow such fine-grained tweaking. –  Mulvya Mar 22 '13 at 9:45
    
@Mulvya - I have used such a package once when I was using a hardware encoder and Sonic DVD Producer for MPEG-2. The software was however very complex, unstable and unwieldy and was, in short, the largest waste of $5 grand I have ever spent. There may be cheaper options that allow that level of control now, but unless you are thoroughly knowledgeable about the algorithms and looking through for particular artifact problems, you will probably have better luck with 2 pass VBR. –  AJ Henderson Mar 22 '13 at 13:12
add comment

Variable bit rate and adaptive codecs are common in the audio world, and work very well. The most obvious example is VBR MP3s. Encoding video is a fundamentally similar problem, so I would be surprised if adaptive codecs don't exist there too.

share|improve this answer
    
That would be good to know they are exist. However, I wonder if there are semi-automatic applications for professionals who wish to adjust quality of the output to the best. –  Kentzo Mar 14 '13 at 8:54
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.