[Ffmpeg-devel] Size from grab device
ramiro at lisha.ufsc.br
ramiro
Sun Nov 12 02:18:28 CET 2006
Hello,
I'm implementing VFW capture support for Windows, and I've come accross
two issues. Attached is the source code I'm currently using just so that
you can see how I'm setting the codec information.
1: The image is upside down, mirrorred, and colours swapped, the same way
as displaying in Windows.
I'm using PIX_FMT_BGR24 instead of PIX_FMT_RGB24 to swap the colours, but
I don't know how to invert the image.
It's easy if I want FFmpeg's output to be inverted. I just set
BITMAPINFOHEADER's size to negative for my output bmp. But how do I make
FFmpeg understand an inverted input?
2: I have to specify the input size in the command line, such as:
ffmpeg -s "320x240" out.mpg
Is it not possible to just do
ffmpeg out.mpg
without having to specify the input size?
I want the read_header function to specify the size as the capture device
reports it. Even though I set st->codec->width and height, if I don't use
the -s option, I get the "picture size invalid 0x0" error.
Why doesn't video capture support setting the output size in read_header?
I didn't really understand why the input size from a video file gets
passed to the output file, but not the input size from a video device.
Ramiro Polla
-------------- next part --------------
A non-text attachment was scrubbed...
Name: vfw_cap.c
Type: application/octet-stream
Size: 4988 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20061111/13c24230/attachment.obj>
More information about the ffmpeg-devel
mailing list