yadif in ffmpeg filter usage

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

yadif in ffmpeg filter usage

redmember
This post was updated on .
Hi.

Now, Developing yadif in ffmpeg filter

i can't found ffmpeg filter(yadif) reference. (ffmpeg_x/doc/example/filtering_video.c does not help.)

And, i can't found in Google search.... Trying to find is at best svn history.

Deinterlace incoming video that I want to yadif.

I want to get information how to use(yadif in ffmpeg filter)

Reference for the exact look does not make sense.


ps. deveope depend on windows visual c++



Thanks.
Reply | Threaded
Open this post in threaded view
|

Re: yadif in ffmpeg filter usage

rogerdpack2
> i can't found ffmpeg filter(yadif) reference.
> (ffmpeg_x/doc/example/filtering_video.c does not help.)

 -vf yadif=1

?
-r
_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/ffmpeg-user
Reply | Threaded
Open this post in threaded view
|

Re: yadif in ffmpeg filter usage

redmember

thanks. replay

The following are additional questions

I using window OS

ffmpeg builed on Windows (for MinGW) and developing MS Visual studio (C++)

I tried to.. below source code (for ffmpeg example)

// init filter code

************************************************************
 ***Q1 : if using yadif filter, how to make filter. below code was not working in "avfilter_graph_config"
AVFilter *yadif    =  avfilter_get_by_name("yadif");
AVFilter *buffersink        = avfilter_get_by_name("buffersink");
************************************************************

AVFilterInOut *pSrc    = avfilter_inout_alloc();
AVFilterInOut *pBuffer  = avfilter_inout_alloc();

enum PixelFormat pix_fmts[] = { PIX_FMT_GRAY8, PIX_FMT_NONE };

filter_graph = avfilter_graph_alloc();

sprintf_s(args, sizeof(args), "%d:%d:%d:%d:%d:%d:%d",
                  dec_ctx->width, dec_ctx->height, dec_ctx->pix_fmt,
                  dec_ctx->time_base.num, dec_ctx->time_base.den,
                  dec_ctx->sample_aspect_ratio.num, dec_ctx->sample_aspect_ratio.den);

ret = avfilter_graph_create_filter(&in_ctx, yadif, "in", args, NULL, filter_graph);
if (ret < 0) {
        av_log(NULL, AV_LOG_ERROR, "Cannot create \n");
        return ret;
}
ret = avfilter_graph_create_filter(&out_ctx, buffersink, "out", NULL, NULL, filter_graph);
if (ret < 0) {
        av_log(NULL, AV_LOG_ERROR, "Cannot create \n");
        return ret;
}

ret = avfilter_graph_add_filter(filter_graph, in_ctx);
ret = avfilter_graph_add_filter(filter_graph, out_ctx);

pSrc->name       = av_strdup("in");
pSrc->filter_ctx = in_ctx;
pSrc->pad_idx    = 0;
pSrc->next       = NULL;

pBuffer->name       = av_strdup("out");
pBuffer->filter_ctx = out_ctx;
pBuffer->pad_idx    = 0;
pBuffer->next       = NULL;

if ((ret = avfilter_graph_parse(filter_graph, filters_descr, &pBuffer, &pSrc, NULL)) < 0)
        return ret;

************************************************************
*** not working code "ret = -22"
if ((ret = avfilter_graph_config(filter_graph, fmt_ctx)) < 0)
        return ret;
************************************************************