How to parse VP8 bitstream with libav -


I have just started learning about VP8, so give me some lethargy if this is a dumb question.

H.264 example

In the past I have worked mostly .264 Whenever I need to parse H.264bit currents, then I will have to take advantage of libav to help and use something like this

  av_register_all (); _ioContext = avio_alloc_context (Encoded Data, H264_READER_BUF_SIZE, 0, 0, Read, Function, Faucet, Zero); If (_ioContext == NULL) throwing std :: exception ("unable to create AV IO reference"); AVInputFormat * h264Format = av_find_input_format ("h264"); If (h264 format == faucet) {std :: exception ("Unable to find H264 format"); } _context = avformat_alloc_context (); _context- & gt; Pb = _ioContext; Ret = avformat_open_input (& amp; _context, "", h264 format, NULL); If (ret! = 0) {std :: exception ("failed to open the input file:" + std :: string (_avErrToString (ret)); }   

VP8

The above method is great for parsing H.264 bit currents and feeding H.264 frames to its own decoding infrastructure. work done.

I am also trying to duplicate this effort with VP8. I tried to use this code as a base and instead of searching the "h264" format, I tried "vp8" and "webm" "Vp8" is not valid, but "webm" is loading a format Is capable of However, when I get avformat_open_input I get this error:

[matraska, webm @ 0x101812400] unknown entry 0xF0
[matraska, webm @ 0x101812400] EBML header using unsupported features

EBML Version 0, Principle (zero), Doctor version 0)
Failed to open the input file: PF is now not implemented in FFMPG, patch is welcome

Am I watching? Or am I doing this wrongly?

I am using the C # wrapper for FFMPEG \ LibAV (especially the example file) It has the same syntax as C ++, and it works fine.

The error message says that it has not been implemented yet, so I suggest updating your Library Library.

The piece of code that is working (including the AVInputFormat amendment in me, which is not present in the linked file):

  FFmpegInvoke.av_register_all () ; FFmpegInvoke.avcodec_register_all (); FFmpegInvoke.avformat_network_init (); String url = @ "c: \ file.webm"; AVFarmTontact * PFormatContact = FFMPGINWock.Vermat_Aloc_Context (); AVInputFormat * pFormatExt = FFmpegInvoke.av_find_input_format ("webm"); If (FFmpegInvoke.avformat_open_input (& amp; pFormatContext, url, pFormatExt, null)! = 0) new exception throw ("file can not be opened"); // To throw any exception, more code is thrown, and the frames are successfully decoded   

If this does not work, then you might find that the file is incorrectly Opening (second avformat_open_input is empty).

Perhaps try to specify a file path?

Comments

Popular posts from this blog

ios - Adding an SKSpriteNode to SKScene from a child SKSpriteNode -

Matlab transpose a table vector -

c# - Textbox not clickable but editable -