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,393
  • 29
  • 76
  • 95
xralf
  • 64
  • 2
  • 4
  • 18

4 Answers4

4

mpeg instead of mpg

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

jet
  • 2,743
  • 18
  • 17
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,223
  • 2
  • 15
  • 36
  • I get `buffer underflow` error. When it finished converting, the video works, but there is no sound – parsecer Jun 17 '21 at 11:51
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,192
  • 65
  • 150
  • 222
user71865
  • 11
  • 1
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
  • 5
  • 12