[Libav-user] Does the image2 demuxer work with a custom AVIOContext?

Hendrik Leppkes h.leppkes at gmail.com
Sun Jan 12 18:15:41 CET 2014


On Sun, Jan 12, 2014 at 4:49 PM, Robert Krüger <krueger at lesspain.de> wrote:
> Hi,
>
> I am having problems programmatically extracting metadata like size
> and pixel format from a dpx image using a custom AVIOContext. Should
> that work or does the image2 demuxer only work with files even in the
> single-file case? Or is there something I need to watch out for when
> using it this way?
>
> In my case the call to avformat_open_input fails already. The same
> code generally works and has been used/tested with a lot of formats
> for a long time. It just seems to fail on formats that the command
> line tool opens with the image2 demuxer (I also tried jpg and png). Is
> this related to not having a file name and if so, is there a way to
> fix this?
>

image2 requires to directly access the files itself.
There is also a image2pipe, which can read the data from a avio
context, but in my experience it also didn't work properly because its
designed for a "pipe" scenario where it doesn't know the file size,
and therefor reads kinda blindly.

Now for custom IO that knows the size, but just wants to deliver the
data through its own IO functions, neither seem to work properly as of
today.

- Hendrik


More information about the Libav-user mailing list