Celeb Glow
news | March 05, 2026

How can I convert AVI files into MPGs with ffmpeg?

I have this problem with some AVI files. The output of

ffmpeg -i file.avi

contains the line

[NULL @ 0x97c4d40]Invalid and inefficient vfw-avi packed B frames detected.

Someone advised me to use

ffmpeg -i file.avi -vcodec h263 -acodec aac -f mpg output.mpg

to convert the file to the correct format, but that produces the error

Unknown input or output format: mpg

How can I convert my files?

2

4 Answers

mpeg instead of mpg

ffmpeg -i file.avi -vcodec mpeg4 -f mpeg output.mp4

5

Thanks to Andreas Cadhalpun ffmpeg now has new filter: mpeg4_unpack_bframes (see ref).

Usage is as simple as:

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

I'd use MPEG Streamclip. It's really simple. Although they haven't updated the software in a while, I've been using the same version for years (most recently on my Intel Mac with OS 10.6.6). It's good for individual files. Not sure about batching. Good luck.

MPEG Streamclip is a powerful free video converter, player, editor for Mac and Windows. It can play many movie files, not only MPEGs; it can convert MPEG files between muxed/demuxed formats for authoring; it can encode movies to many formats, including iPod; it can cut, trim and join movies. MPEG Streamclip can also download videos from YouTube and Google by entering the page URL.

1

I had a similar case when I ran

ffmpeg -v 5 -i input.avi -f null -

and the following errors appeared:

[mpeg4 @ 02505f00] Invalid and inefficient vfw-avi packed B frames detected
[null @ 024eb020] Encoder did not produce proper pts, making some up.


The solution:

ffmpeg.exe -i input.avi output.mp4

As simple as that.

(Use output.mpg to convert to mpg.)

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

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