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

Mauricio Henriquez buhochileno at gmail.com
Tue Jan 3 20:58:48 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 R. Henriquez Schott
Escuela de Ingeniería en Computación
Universidad Austral de Chile - Sede Puerto Montt
Los Pinos S/N, Balneario de Pelluco, Puerto Montt - Chile
Tel: 65-487440
Fax: 65-277156
mail: mauriciohenriquez at uach.cl

-------------- next part --------------
A non-text attachment was scrubbed...
Name: buhochileno.vcf
Type: text/x-vcard
Size: 384 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-user/attachments/20120103/de3a1f8a/attachment.vcf>


More information about the ffmpeg-user mailing list