Hi,

On 05/10/2010 10:44 AM, Martin Schreiber wrote:
Hi there,

i started to write a streaming video appliation in which i want to grab
frames fom a industrial camera and stream them over a network. i chose to
use libavcodec for videocompression but right now i'm a bit confused about
the codec-parameters. I tried the api-example

I'd suggest to use libavformat for streaming, and to look at output-example
(which is more complete than api-example).

but everytime i change
something, for example the pixelformat from PIX_FMT_YUV420P to something my
camera can provide the call to avcodec_open fails.

As already pointed out by Tomas Härdin, not all the pixel formats are
supported by the various encoders (in general an encoder only supports
few pixel formats). If your camera is generating frames in a different pixel
format, you have to use swscale to convert them to the pixel format supported
by the codec you want to use.

If your camera supports video4linux2 and you want to stream over RTP, you can
have a look at the "real-time encoder for streaming live video" here:
http://imedia.disi.unitn.it/software.html

Regarding the documentation, it's automatically generated (through doxygen) from
the .h files... I'd suggest having a look at the doxygen comments in avcodec.h
and similar.


                                Luca
_______________________________________________
libav-user mailing list
[email protected]
https://lists.mplayerhq.hu/mailman/listinfo/libav-user

Reply via email to