[FFmpeg-user] weird [video4linux2 @ 0x992c410]The V4L2 driver ioctl set standard() trying to use AVFormatParameters

Mauricio Henriquez buhochileno at gmail.com
Tue Jan 3 23:49:10 CET 2012


Hi Guys,

First of all, happy new year to all!!, the best coding in this "end of
the world" year, so get nuts coding!:-)

I having a weird issue on my C program using AVFormatParameters, using
something like this:

...//var definition and so on, avcodec_init(); and the register
functions and avformat_alloc_context() calls of course..

pInputFormat = av_find_input_format("video4linux2");
if(av_open_input_file(&pFormatCtx, filename, pInputFormat, 0, NULL)!=0)
    return -1;

All seems ok and the program moves on, the video device is open and I
can save a number of frames from my webcam, but of course I can't set
the input parameters since I passing a NULL for it, so, I try to use
AVFormatParameters doing something like this:

AVFormatParameters params, *fp =¶ms;
fp->width = 320;
fp->height= 240;
fp->time_base= (AVRational){1, 25};
fp->channel = 0;
fp->sample_rate = 28;
fp->pix_fmt = PIX_FMT_NONE;

pInputFormat = av_find_input_format("video4linux2");
if(av_open_input_file(&pFormatCtx, filename, pInputFormat, 0, fp)!=0)
    return -1; // Couldn't open file

Here I pass "fp" instead of a NULL, but I get a weird:

[video4linux2 @ 0x992c410]The V4L2 driver ioctl set standard()

No matter what I change, even trying to set "fp->standard = "NTSC";" or
something like that...So, I defenitly doing something wrong or I missing
something...

Any tips?

Thanks to all.

Mauricio


Mauricio Henriquez S.
Docente Escuela de Computación
Universidad Austral de Chile - Sede Puerto Montt
Tel: 65-487440
Fax: 65-277156
Mail: mauriciohenriquez at uach.cl




More information about the ffmpeg-user mailing list