FFmpeg fourcc Avi codec support list?

前端 未结 3 1064
温柔的废话
温柔的废话 2020-12-29 11:51

A couple of similar questions are on stackoverflow, but I haven\'t been able to figure this exact problem out.

I want to get a list of the fourccs for t

3条回答
  •  青春惊慌失措
    2020-12-29 12:20

    It is possible to the mapping via avformat api, without digging in the source code.

     uint32_t tag = MKTAG('H', '2', '6', '4');
     const struct AVCodecTag *table[] = { avformat_get_riff_video_tags(), 0 };
     enum AVCodecID vcodec = av_codec_get_id(table, tag );
    

    The functions avformat_get_riff_video_tags, avformat_get_riff_audio_tags and av_codec_get_id are all defined in "libavformat/avformat.h".

    you can also get the mapping for a specific format using the table AVOutputFormat.codec_tag or AVInputFormat.codec_tag

提交回复
热议问题