6

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?

Pops
  • 8,623
xralf
  • 64

4 Answers4

4

mpeg instead of mpg

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

jet
  • 2,733
3

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
malat
  • 1,374
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.

Diogo
  • 30,792
0

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.)

Adriano P
  • 535