[FFmpeg-devel] libavformat and video4linux2 acquire problems

Sandro Cavazzoni s.cavazzoni
Tue May 8 11:47:12 CEST 2007


Hi to all,
In this days i started to develop an application based on libavformat  
and libavcodec, but i run into problems.
Is this the right mailing list about development with libavformat and  
libavcodec?

i'm trying to acquire a video from an acquisition board with a FUSION  
878A chip.

I open the device with the next code:

	AVFormatParameters	formatParameters;
	
	formatParameters.device = inputDevice; 			// /dev/video0
	formatParameters.channel = 0;						// It's video composite input on  
my board
	formatParameters.standard = "pal";
	formatParameters.width = 768;						// 768 - 384
	formatParameters.height = 576;					// 576 - 288
	formatParameters.time_base = (AVRational){1,25};
	inputFormat = av_find_input_format("video4linux2");

	if(av_open_input_file(&inputFormatContext,"", inputFormat, 0,  
&formatParameters)!=0) {
		perror(inputDevice);
		return false;
	}

Now i have the next problem: http://develop2.whiteocean.net/test.png

I tried with different resolution: 768x576, 384x288, 640x576 (i know,  
it's a strange resolution) and others.

If I try to open the device with VLC before run my application, then  
my application work correctly (but v4l2 reduce always my resolution  
in 640x576 - the strange resolution :)

I think i'm missing to set some parameters instead VLC do it correctly.
But... what parameter?
And why this strage resolution? (640x576 instead the classic 768x576).

Thanks a lot

Sandro




More information about the ffmpeg-devel mailing list