Unpacking b-frames

General questions or discussion about HandBrake, Video and/or audio transcoding, trends etc.
Post Reply
Hinulog
Posts: 8
Joined: Tue Aug 30, 2016 7:27 am

Unpacking b-frames

Post by Hinulog »

I have source files that are Xvid encoded with packed b-frames.
This is not a Good Thing [TM].
I wish to transcode them to per spec x264 files for trouble free playback on the widest range of devices.

I'm guessing I insert bframes=0 into the "more settings" field of the video tab of the GUI from the 'Normal' preset?
Will this give me clean compliant MP4 files per the spec or should I use FFMpeg with the mpeg4_unpack_bframes filter first?
Do I need to worry about this at all IOW will 'normal' preset drop the bframes during transcoding & output per spec x264 files regardless?

H
Last edited by Hinulog on Tue Aug 30, 2016 11:20 pm, edited 1 time in total.
User avatar
Ritsuka
HandBrake Team
Posts: 1656
Joined: Fri Jan 12, 2007 11:29 am

Re: Unpacking b-frames

Post by Ritsuka »

If you transcode (instead of remuxing), you don't have to do any additional thing.
Hinulog
Posts: 8
Joined: Tue Aug 30, 2016 7:27 am

Re: Unpacking b-frames

Post by Hinulog »

Ok, got it.
Many thanks.
Deleted User 11865

Re: Unpacking b-frames

Post by Deleted User 11865 »

More specifically, packed B-frames are strictly an AVI thing. As soon as the video track is re-encoded and written to a non-AVI container format, packed B-frames simply cannot exist.
Hinulog
Posts: 8
Joined: Tue Aug 30, 2016 7:27 am

Re: Unpacking b-frames

Post by Hinulog »

Yes Rodeo these are AVI's encoded with the dreaded Xvid/packed b-frames. My brief non pro understanding was they are not part of x264 spec & specifically unsupported in other containers.
My question was how does Handbrake handle this. My answer is : automagically. :-)
Thanks very much to you both for help clarifying.
Deleted User 13735

Re: Unpacking b-frames

Post by Deleted User 13735 »

Just to be clear, predictive frames when decoded have nothing to to with predictive frames during encoding. The encoder does not "see" anything that was there before your material was decoded to raw bits.

"Packed" b-frames are only one kind of kludge to be able to put bipredictive interframe material inside an AVI wrapper, and that's all. Once decoded, they are no different than any other video frame. x264vfw does not use b-frames at all.
Hinulog
Posts: 8
Joined: Tue Aug 30, 2016 7:27 am

Re: Unpacking b-frames

Post by Hinulog »

I'm all about platform agnostic, space efficient & long term playability.

My workflow was to run these AVI's through FFmpeg with the unpack filter then transcode with Handbrake into x264/AAC/MP4. But it's clear from your explanation that this extra step is not needed.

Thanks to all for clarifying for laymen.
Deleted User 13735

Re: Unpacking b-frames

Post by Deleted User 13735 »

The decoders in Handbrake are "essentially" the same as ffmpeg, except that updates occasionally lag a bit.
Hinulog
Posts: 8
Joined: Tue Aug 30, 2016 7:27 am

Re: Unpacking b-frames

Post by Hinulog »

Yes, for simple tasks (changing containers etc) I use FFmpeg in a terminal. For more complex tasks I retreat to the Handbrake GUI. I did try to parse the Handbrake cli but got lost :-/ lol!
Post Reply