Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|improve this question
    
Have you tried repairing the file? ffmpeg -i infile.avi -acodec copy -vcodec copy outfile.avi – slhck Mar 15 '11 at 19:34
    
Yes, outfile.avi has the same problem. – xralf Mar 15 '11 at 19:56

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
share|improve this answer

mpeg instead of mpg

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

share|improve this answer
    
This writes error message: Unknown encoder 'aac' – xralf Mar 15 '11 at 18:50
    
I edited my answer - try – jet Mar 15 '11 at 19:08
    
This writes: Error while opening codec for output stream #0.1 - maybe incorrect parameters such as bit_rate, rate, width or height – xralf Mar 15 '11 at 19:21
1  
ffmpeg -i file.avi -vcodec mpeg4 -s 320x240 -b 300k -r 23.98 -acodec libmp3lame -ar 48000 -ab 112k output.mp4 - you can play with size and bitrate – jet Mar 15 '11 at 19:50
    
The same error. – xralf Mar 15 '11 at 19:59

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.

share|improve this answer
    
I'm on Linux (Ubuntu). – xralf Mar 15 '11 at 18:51

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

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .