[FFmpeg-user] FFmpeg decode to MJPEG avi

Ffgdfg Fdfgd 67546723 at qip.ru
Sun May 27 11:05:11 CEST 2012


Hello.
I need decode Xvid avi to MJPEG avi for Digital Camera.

Camera read this format.

$ mediainfo camera/VIDEO.AVI
General
Complete name                            : camera/VIDEO.AVI
Format                                   : AVI
Format/Info                              : Audio Video Interleave
File size                                : 220 MiB
Duration                                 : 2mn 24s
Overall bit rate                         : 12.8 Mbps

Video
ID                                       : 0
Format                                   : JPEG
Codec ID                                 : MJPG
Duration                                 : 2mn 24s
Bit rate                                 : 12.4 Mbps
Width                                    : 640 pixels
Height                                   : 480 pixels
Display aspect ratio                     : 4:3
Frame rate                               : 30.000 fps
Color space                              : YUV
Chroma subsampling                       : 4:2:2
Bit depth                                : 8 bits
Scan type                                : Progressive
Compression mode                         : Lossy
Bits/(Pixel*Frame)                       : 1.349
Stream size                              : 214 MiB (97%)

Audio
ID                                       : 1
Format                                   : PCM
Format settings, Endianness              : Little
Format settings, Sign                    : Signed
Codec ID                                 : 1
Duration                                 : 2mn 24s
Bit rate mode                            : Constant
Bit rate                                 : 352.8 Kbps
Channel(s)                               : 1 channel
Sampling rate                            : 22.05 KHz
Bit depth                                : 16 bits
Stream size                              : 6.07 MiB (3%)
Interleave, duration                     : 33 ms (1.00 video frame)

I tried FFmpeg decode but the video does not read.

$ ffmpeg -i need_decode.avi -aspect 4:3 -vcodec mjpeg -pix_fmt
yuvj422p -qscale 3 -s 640x480 -r 30 -acodec pcm_s16le -ar 22050 -ac 1
-ab 352k decoded.avi

$ mediainfo decoded.avi
General
Complete name                            : decoded.avi
Format                                   : AVI
Format/Info                              : Audio Video Interleave
File size                                : 18.6 MiB
Duration                                 : 36s 567ms
Overall bit rate                         : 4 257 Kbps
Writing application                      : Lavf52.111.0

Video
ID                                       : 0
Format                                   : JPEG
Codec ID                                 : MJPG
Duration                                 : 36s 567ms
Bit rate                                 : 4 245 Kbps
Width                                    : 640 pixels
Height                                   : 480 pixels
Display aspect ratio                     : 4:3
Frame rate                               : 30.000 fps
Color space                              : YUV
Bit depth                                : 8 bits
Compression mode                         : Lossy
Bits/(Pixel*Frame)                       : 0.461
Stream size                              : 18.5 MiB (100%)

Audio
ID                                       : 1
Format                                   : PCM
Format settings, Endianness              : Little
Format settings, Sign                    : Signed
Codec ID                                 : 1
Duration                                 : 362ms
Bit rate mode                            : Constant
Bit rate                                 : 352.8 Kbps
Channel(s)                               : 1 channel
Sampling rate                            : 22.05 KHz
Bit depth                                : 16 bits
Stream size                              : 15.6 KiB (0%)
Interleave, duration                     : 2151 ms (64.53 video frames)


More information about the ffmpeg-user mailing list