Hi! I am trying to use avcodec and avformat. So far i was able to manage the problems, but i still have questions. I would really appreciate if you could help me: avformat - how can i generate index for avi files? avcodec - is there any information about image formats' byte order (maybe a translation for v4l2 formats?) Thanks in advance! Lenon SCH1201
Hi! I am trying to use avcodec and avformat. So far i was able to manage the problems, but i still have questions. I would be really greatful if you could help me: - how can i generate index for avi files? - is there any information about image formats' byte order (maybe a translation for v4l2 formats?) Thanks in advance! Lenon
Toman Arpad wrote:
- is there any information about image formats' byte order (maybe a translation for v4l2 formats?)
This is pretty well documented in avcodec.h (search for "enum PixelFormat"). Any particular pixel format you're having problems with? Martin -- Martin B?hme Inst. f. Neuro- and Bioinformatics Ratzeburger Allee 160, D-23538 Luebeck Phone: +49 451 500 5514 Fax: +49 451 500 5502 boehme at inb.uni-luebeck.de
Hi On Thu, 8 Sep 2005, Martin Boehme wrote:
Toman Arpad wrote:
- is there any information about image formats' byte order (maybe a translation for v4l2 formats?)
This is pretty well documented in avcodec.h (search for "enum PixelFormat"). Any particular pixel format you're having problems with?
I do not have problems with any particular format. I only wrote a TV tuner recorder program with using ffmpeg and right now i am trying to make a first release. For this i would like to use as wider selection of the pixel formats as possible. Lenon
Toman Arpad wrote:
On Thu, 8 Sep 2005, Martin Boehme wrote:
Toman Arpad wrote:
- is there any information about image formats' byte order (maybe a translation for v4l2 formats?)
This is pretty well documented in avcodec.h (search for "enum PixelFormat"). Any particular pixel format you're having problems with?
I do not have problems with any particular format. I only wrote a TV tuner recorder program with using ffmpeg and right now i am trying to make a first release. For this i would like to use as wider selection of the pixel formats as possible.
Are you grabbing data from the TV tuner using ffmpeg, or are you doing this yourself (which I suspect, probably using v4l2)? If the former, and you're not quite sure in what pixel format the TV tuner is going to deliver the data, you can just use img_convert to convert the format. If the latter, well... you can either just switch to using ffmpeg for video grabbing support ;-), or you will indeed have to map v4l2 pixel formats to ffmpeg pixel formats. But you can always use libavformat/grab.c for inspiration. From the code there, it seems there are only three pixel formats that occur in practice: v4l ffmpeg ------------------------------------------- VIDEO_PALETTE_YUV420P PIX_FMT_YUV420P VIDEO_PALETTE_YUV422 PIX_FMT_YUV422 VIDEO_PALETTE_RGB24 PIX_FMT_BGR24 These are the v4l names (because that's the interface that ffmpeg uses), not sure if v4l2 calls them by the same names, but at any rate, these seem to be the three formats that matter. HTH Martin -- Martin B?hme Inst. f. Neuro- and Bioinformatics Ratzeburger Allee 160, D-23538 Luebeck Phone: +49 451 500 5514 Fax: +49 451 500 5502 boehme at inb.uni-luebeck.de
Hi On Fri, 9 Sep 2005, Martin Boehme wrote:
Are you grabbing data from the TV tuner using ffmpeg, or are you doing this yourself (which I suspect, probably using v4l2)?
I am doing it myself using v4l2.
But you can always use libavformat/grab.c for inspiration.
Thanks, i will see that.
These are the v4l names (because that's the interface that ffmpeg uses), not sure if v4l2 calls them by the same names, but at any rate, these seem to be the three formats that matter.
Well, the names are similar in v4l2, so i guess it will be ok. One last question: if i precisely follow output_example.c and create an avi formatted file, it should have index, shouldn't it? Lenon
Toman Arpad wrote:
One last question: if i precisely follow output_example.c and create an avi formatted file, it should have index, shouldn't it?
Yes, AFAIK. This should happen in av_write_trailer(). Martin -- Martin B?hme Inst. f. Neuro- and Bioinformatics Ratzeburger Allee 160, D-23538 Luebeck Phone: +49 451 500 5514 Fax: +49 451 500 5502 boehme at inb.uni-luebeck.de
participants (2)
-
boehme@inb.uni-luebeck.de -
dss@sch.bme.hu