-1

I'm using Handbrake to re-encode an MKV video with the goal of shaving a hundred or so megabytes off it to keep it under FAT32's 4.2GB file size limit.

During encode, Handbrake's status bar shows a frame rate of 1.2, and an average frame rate of 1.7, which is ridiculously low:

Handbroke encoding

However, when I use MPC-HC's CtrlJ to show the frame on the output file (by pausing the encode job and playing the partially-encoded file) it shows a frame rate fluctuating at much more normal FPS speeds:

MPC-HC showing FPS of 23-35

What relevance do the frame rates shown in Handbrake's status bar while encoding have to the frame rates of the output video, and why are they so low? Would I be correct in thinking that the FPS shown in the status is nothing but a measure of performance, and has no direct bearing on the quality of the output?

  • Why was this downvoted? – Hashim Jan 7 at 23:04
3

The value for encoding a video is different from the value for playing a video.

For example, videos use to play a 24 (Film), 25 (PAL), 29.97 (NTSC) Frames-per-second(FPS).

But creating a video stream of one second may consume more processor time for a second of video than one second. So to create one second of video, several seconds of encoding time on the CPU may be necessary. Therefore the FPS of the encoding may be lower that the FPS of playing and you can experience that you need 10 hours to encode an 1:30h movie.

If you encoded a movie using an old codec like MJPEG, you could get a FPS higher than your playing FPS.

The encoding FPS is independent from the playing FPS.

Would I be correct in thinking that the FPS shown in the status is nothing but a measure of performance, and has no direct bearing on the quality of the output?

Not exactly. The FPS shown are a measure of performance in encoding a video, and the output FPS of the video is fixed. But the higher the quality of the encode, the longer it (usually) takes (and the better the quality). The FPS of the playback is - unsurprisingly and as desired - constant.

  • Good answer, but I think it might be confusing to call the FPS of the encoded file "constant" - in my case it's actually variable, although I understood your meaning. – Hashim Jan 7 at 3:02
  • There is no video format with a variable FPS so no it should not be confusing – silmaril Jan 7 at 11:29
  • @silmaril Handbrake seems to disagree with you, see the first screenshot. – Hashim Jan 7 at 23:05
  • In the newer h.264 video streams the (playback) frame rate can be adjusted in the SPS (Sequence-Parameter-Set) of a NAL (Network Abstraction Layer) with the fields num_units_in_tick : value,time_scale : ... and fixed_frame_rate_flag. If you're interested in that, I found this posting about SPS. You always want to watch a video that appears to have a constant frame-rate. – zx485 Jan 8 at 0:03
2

Encoding a video is generally more computationally expensive than playing it and is also not bound by the video playback speed.

Depending on the speed of your processor the encode may be faster or slower than the actual playback speed and it is that performance that handbrake is showing.

It is how many frames per second are being processed, not the actual playback speed.

0

The FPS of the video itself is show in the top bar, next to the source panel, and details the various settings of the video you're trying to encode (resolution, FPS, # of audio/subtitle tracks). The FPS show in the status bar at the bottom is how many frames per second Handbrake is encoding to the new video file, and will vary significantly based on computer speed, source resolution, and the encoding settings you choose.

As a side note: you're also using the 'placebo' encoder preset, which is designed to be ridiculously slow, and the encoding speed difference between 'placebo' and 'very slow' modes can still be pretty significant, while the difference in file size is negligible.

When you use CRF quality settings ("constant quality", the slider in the top-right), the quality of your video has already been determined, and the "encoder preset" (slider, bottom-left) will determine how much work goes into compressing the video to make the file size smaller, and directly relates to how long the process takes. 'Very Slow' is about the max recommended, as 'Placebo' is just that; an intensive processes with very little real effect.

You can also use the "Encoder Tune" drop-down beneath the pre-set slider to help it work better, so it can use various tricks to help compress different types of video. Generally, 'film' is good for anything live-action or CG, 'animation' is good for 2D animation (cell animation or anime), and 'grain' helps to retain grain detail in grainy sources. YMMV, but there's no harm in using them and they usually result in a better process.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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