The Computer Oracle

FFmpeg/avidemux: fix packed B-frames

--------------------------------------------------
Rise to the top 3% as a developer or hire one of them at Toptal: https://topt.al/25cXVn
--------------------------------------------------

Music by Eric Matyas
https://www.soundimage.org
Track title: Riding Sky Waves v001

--

Chapters
00:00 Ffmpeg/Avidemux: Fix Packed B-Frames
01:01 Accepted Answer Score 28
01:56 Thank you

--

Full question
https://superuser.com/questions/782634/f...

--

Content licensed under CC BY-SA
https://meta.stackexchange.com/help/lice...

--

Tags
#ffmpeg #videoconversion #avi #h264 #avidemux

#avk47



ACCEPTED ANSWER

Score 28


B-frames are a frame type used in video compression to represent frames of a video. B-frames can use information from both previous and future frames to represent each video frame.

Older DivX-encoded videos commonly use an ugly method called packed bitstream which puts several video frames into a single AVI chunk. Packed bitstream isn't standard MPEG-4, uses more space, requires more CPU power to encode/decode, and (most importantly) may cause problems if copied into another container type. This is the main reason for the warning.

Since you're re-encoding the video instead of just copying it, you should be fine. If you wanted to keep the original video, but copy it into another type of container (say MP4 or MKV), it'd be best to unpack the B-frames first using the FFmpeg filter mpeg4_unpack_bframes.

You could unpack the B-frames with something simple like

ffmpeg -i INPUT.avi -codec copy -bsf:v mpeg4_unpack_bframes OUTPUT.avi