[Libav-user] What is the meaning of return value -1 for av_interleaved_write_frame()

Li Zhang lizhang at utelisys.com
Tue Mar 20 11:38:20 CET 2012


The parameters I used as following:
    oVcc = video_st->codec;
    oVcc->codec_id = CODEC_ID_H264;
    oVcc->codec_type = AVMEDIA_TYPE_VIDEO;
    oVcc->bit_rate = 1000000;
    oVcc->rc_min_rate = 1000000;
        oVcc->rc_max_rate = 1000000;
        oVcc->rc_buffer_size = 1000000;
        oVcc->rc_initial_cplx = 0.5;
        oVcc->rc_initial_buffer_occupancy = 0.9;

    oVcc->width = 1280;
    oVcc->height = 720;

    oVcc->gop_size = 250;
    oVcc->pix_fmt = vCodecCtx->pix_fmt;
    oVcc->max_b_frames = 3;
    oVcc->me_cmp = 2;
    oVcc->me_sub_cmp = 2;
    oVcc->mb_decision = 2;
    oVcc->me_range = 16;
    oVcc->me_method = 8;
    oVcc->time_base.num = 1;
    oVcc->time_base.den = 25;
        oVcc->thread_count = 7;

        oVcc->trellis = 2;
        oVcc->me_subpel_quality = 7;
        oVcc->qmin = 2;
        oVcc->qmax = 31;
        oVcc->i_quant_factor = 1.0 / 1.40f;
        oVcc->b_quant_factor = 1.30f;
        oVcc->chromaoffset = 0;
        oVcc->max_qdiff = 4;
        oVcc->qcompress = 0.6f;
        oVcc->qblur = 0.5f;
        oVcc->noise_reduction = 0;
        oVcc->scenechange_threshold = 40;

        oVcc->me_cmp = FF_CMP_CHROMA;
        oVcc->keyint_min = 25;
        //oVcc->level = 32;
        oVcc->b_frame_strategy = 2;
        oVcc->flags |= CODEC_FLAG_GLOBAL_HEADER;

Best regards,

Li
________________________________________
From: libav-user-bounces at ffmpeg.org [libav-user-bounces at ffmpeg.org] On Behalf Of Alex Cohn [alexcohn at netvision.net.il]
Sent: Tuesday, March 20, 2012 11:26 AM
To: This list is about using libavcodec, libavformat, libavutil,        libavdevice and libavfilter.
Subject: Re: [Libav-user] What is the meaning of return value -1 for    av_interleaved_write_frame()

On Tue, Mar 20, 2012 at 12:21, Li Zhang <lizhang at utelisys.com> wrote:
>
> Hi ,
>
> I used av_interleaved_write_frame() to write frames into output. At first, it works well. After a while, it will fail and return value is -1.
> Actually, it only failed for video frame, and ffmpeg did not give out any message, i. e. it still gave out this information for the 701st frame:
> frame= 701 QP=24.73 NAL=2 Slice:P Poc:108 I:14   P:1310 SKIP:2276 size=5413 bytes. In fact, this frame was not been written.
> Does there anyone know what is the meaning?
>
>
> Best regards,
>
> Li

What kind of output are you using? Is it a file or a stream? What
container format?

BR,
Alex
_______________________________________________
Libav-user mailing list
Libav-user at ffmpeg.org
http://ffmpeg.org/mailman/listinfo/libav-user


More information about the Libav-user mailing list