Log in

View Full Version : Resolution with x264vfw


Ne0phyte
27th January 2010, 12:05
Hi developers,

I'm just starting to develop with H264 using in my code x264 to decode the data that I have.

I'm using video decoding functions ICOpen,ICDecompress,etc. and the problem using that functions is about know the parameters of the sender of data at first.

For example I recieve data from an IP Camera with a resolution of 640x480. Well, I know the values of width and height because I have access to the configuration panel of the camera. If any person change that resolution I can't know the values and then I can't decompress correctly if I use x264vfw because I need to make the headers with correct values to start the decoding.

I have been reading on Internet and asking developers and the solution is like using MPEG-4 with xvid, decode one frame to obtain the values of resolution, but with x264 I can't do this. Anyone can help/suggest me to find the resolution at the beginning when i don't know?:confused:

PD: I tried to parse the SPS packets but I founded very hard for me that way.

Thank you in advance :).

nm
27th January 2010, 13:37
Hi developers,

I'm just starting to develop with H264 using in my code x264 to decode the data that I have.
x264 is an encoder. You seem to be using the ffh264 (libavcodec) decoding component of x264vfw.

I'm using video decoding functions ICOpen,ICDecompress,etc. and the problem using that functions is about know the parameters of the sender of data at first.
I'm not familiar with VFW, but can't you use the WM_CAP_GET_VIDEOFORMAT (http://msdn.microsoft.com/en-us/library/dd743908%28VS.85%29.aspx) message to retrieve those parameters from the capture device first?

Ne0phyte
27th January 2010, 15:37
x264 is an encoder. You seem to be using the ffh264 (libavcodec) decoding component of x264vfw.


I'm not familiar with VFW, but can't you use the WM_CAP_GET_VIDEOFORMAT (http://msdn.microsoft.com/en-us/library/dd743908%28VS.85%29.aspx) message to retrieve those parameters from the capture device first?

I have looking the documentation about that function and I think I can't use that function because I am retrieving the information of an IP Camera and then I don't know at the beginning the size of the window that I need. That func need the handle of a window but... what window if I don't have at first.