[Ffmpeg-devel] DV and pix_fmt reporting

Dan Maas dmaas
Fri Mar 3 03:14:54 CET 2006


> Stream #0.0, 29.97 fps(c): Video: dvvideo, yuv420p, 720x480, q=2-31, 200 kb/s
>                                            ^^^^^^^

That's definitely a bug. The DV encoder should abort with an error,
because it's being given 4:2:0 frames but thinking they are
4:1:1. (the chroma in the resulting video is messed up).

To get the result you wanted, you will need to specify
"-pix_fmt yuv411p" on the encoder command line.

See below for the bugfix. (Roman, this needs to go on top of the
DVCPRO50 patch).

The "AC EOB marker is absent" messages are due to a DV encoder bug
which has been fixed in CVS.

Regards,
Dan


dv_codec_profile() needs to be rewritten thus:
(note the additional "return NULL;" for invalid pixel formats)

static inline const DVprofile* dv_codec_profile(AVCodecContext* codec)
{
    if (codec->width != 720) {
        return NULL;
    } else if (codec->height == 480) {
        if(codec->pix_fmt == PIX_FMT_YUV422P) {
            /* NTSC 4:2:2 50Mbps */
            return &dv_profiles[3];
        } else if (codec->pix_fmt == PIX_FMT_YUV411P) {
            /* NTSC 4:1:1 25Mbps */
            return &dv_profiles[0];
        } else {
            /* invalid pixel format */
            return NULL;
        }
    } else {
        if(codec->pix_fmt == PIX_FMT_YUV422P) {
            /* PAL 4:2:2 50Mbps */
            return &dv_profiles[4];
        } else if (codec->pix_fmt == PIX_FMT_YUV420P) {
            /* PAL 4:2:0 25Mbps */
            return &dv_profiles[1];
        } else {
            /* invalid pixel format */
            return NULL;
        }
    }
}





More information about the ffmpeg-devel mailing list