Discussion:
[FFmpeg-user] FFmpeg decode to MJPEG avi
Ffgdfg Fdfgd
2012-05-27 09:05:11 UTC
Permalink
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)
Ffgdfg Fdfgd
2012-05-28 12:46:56 UTC
Permalink
Sorry for my bad English.

I need convert Xvid avi (or any other format) to MJPEG avi for Digital Camera.
Digital Camera read only MJPEG avi.

This is sample that the camera read.
http://ompldr.org/vZHoycw/sample.avi

$ ffmpeg -i sample.avi
Input #0, avi, from 'sample.avi':
Duration: 00:00:05.46, start: 0.000000, bitrate: 4935 kb/s
Stream #0.0: Video: mjpeg, yuvj422p, 640x480, 30 tbr, 30 tbn, 30 tbc
Stream #0.1: Audio: pcm_s16le, 22050 Hz, 1 channels, s16, 352 kb/s
Loading...