[Libav-user] Can't Open MJPEG Encoder

Kirill Gavrilov gavr.mail at gmail.com
Wed Jun 8 06:57:12 CEST 2011


Hi,

avcodec_open() is returning -1 when I try to open the MJPEG encoder.
> However, avcodec_open() succeeds when creating the MPEG-4 encoder with the
> same context settings.
>
MJPEG works with full-range YUV formats that named as PIX_FMT_YUVJ420P,
PIX_FMT_YUVJ422P.
Developers say that these formats are deprecated and special range flag
should be used instead of dedicated pixel formats
but I'm not sure that this is already done.

Most other codecs (like MPEG4) works with compressed-range YUV formats like
PIX_FMT_YUV420P.
Thats why your code probably wrong. By the way FFmpeg often show error
description in console output.
-----------------------------------------------
Kirill Gavrilov,
Software designer.
<kirill at sview.ru>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://ffmpeg.org/pipermail/libav-user/attachments/20110608/8a4becb5/attachment.html>


More information about the Libav-user mailing list