6

I'm trying to re-encode (H.264) some videos from my movie library in order to put them on a NAS and stream them to a smartTV through WiFi.

In order to do so, I'm using HandBrake on MacOS and – among my experiments – I noticed that it promotes more B-frames.

If I have understood correctly, those B-frames needs more CPU time and a larger buffer in memory in order to be properly elaborated and I'm not sure if a device such as a general smartTV (of few years) can take advantage of that (with 1080p sources, I used the 4.1 high profile).

Here is an example plotted from FFprobe on the same video source (1080p) before and after re-encoding (and a little filter to reduce noise) at the target bitrate (2-pass VBR): Before After

What do you think or suggest ?

I ask because the resulting file size is very similar and I can't really notice a difference (apart from the noisier frames).

Thanks in advance!

1 Answer 1

6

"Q: Is it better to have more B-frames or more P-frame for video streaming?".

From: https://en.wikipedia.org/wiki/Video_compression_picture_types

The three major picture types used in the different video algorithms are I, P and B. They are different in the following characteristics:

I‑frames are the least compressible but don't require other video frames to decode.

P‑frames can use data from previous frames to decompress and are more compressible than I‑frames.

B‑frames can use both previous and forward frames for data reference to get the highest amount of data compression.

So for the sake of better compression and equal quality: B Frames are better.

In your case better means that your TV better be able to decode and properly play your videos after spending hours/days transcoding them.

So try one video using B-Frames, if there are glitches or you can't rewind properly use P-Frames. Be careful using a large number of B-Frames as that will use more Buffer.

The "CPU time" you refer to applies on your computer, for the TV's Hardware decoding ASIC it shouldn't be a problem. As for Memory the reverse is true, your computer will have enough memory for many B-Frames but your TV might only have enough memory for a few.

Blu-Ray uses 3 B-Frames so your TV ought to accept that many.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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