On 26/07/14 00:58, Joseph Rosensweig wrote:
> I've just started to learn about VP8, so give me some slack if this is a
> dumb question.
> H.264 Example
> 
> In the past I've worked mostly with H.264. Whenever I needed to parse H.264
> bit streams, I would leverage libav to help me and use something like this
> 
> av_register_all();
> 
> _ioContext = avio_alloc_context(
>         encodedData,
>         H264_READER_BUF_SIZE,
>         0,
>         0,
>         &readFunction,
>         NULL,
>         NULL);
> if (_ioContext == NULL)
>     throw std::exception("Unable to create AV IO Context");
> 
> AVInputFormat *h264Format = av_find_input_format("h264");
> if (h264Format == NULL) {
>     throw std::exception("Unable to find H264 Format");
> }
> 
> _context = avformat_alloc_context();
> _context->pb = _ioContext;
> 
> ret = avformat_open_input(&_context,
>         "",
>         h264Format,
>         NULL);
> 
> if (ret != 0) {
>     throw std::exception(
>             "Failed to open input file :" +
>             std::string(_avErrToString(ret)));
> }
> 
> ....
> 
> ....
> 
> int ret = av_read_frame(_context, &_packet);
> 
> VP8
> 
> The above method has worked great for parsing the H.264 bit streams and
> providing me with H.264 frames to feed to my own decoding infrastructure.
> 
> I'm trying to duplicate the same effort with VP8. I tried using this code
> as a basis and instead of looking for the "h264" format, I've tried "vp8"
> and "webm". "vp8" doesn't seem valid, but "webm" is able to load a format.
> However when I get to avformat_open_input I get this error:

h264 is a codec and also an elementary stream format

> [matroska,webm @ 0x101812400] Unknown entry 0xF0
> [matroska,webm @ 0x101812400] EBML header using unsupported features
> (EBML version 0, doctype (null), doc version 0)
> Failed to open input file :Not yet implemented in FFmpeg, patches welcome
> 
> Am I out of look? Or am I just approaching this incorrectly?

You may ask libav which is the format you are trying to demux, I think
it could be ivf (that's the closest to a vp8 elementary stream) if you
want to keep restricting what is supported and what is not.

lu

_______________________________________________
libav-api mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-api

Reply via email to