[Libav-user] Antwort: Re: enumerating codec_tags
Steffen.Roeber at hella.com
Steffen.Roeber at hella.com
Wed May 27 09:14:01 CEST 2015
The problem with av_codec_get_tag is, that it returns 0 if failed and also
0 in case of AV_CODEC_RAWVIDEO.
What I want is a generic solution to get a list of supported codecs for an
arbitrary muxer.
Von: wm4 <nfxjfg at googlemail.com>
An: libav-user at ffmpeg.org,
Datum: 26.05.2015 11:46
Betreff: Re: [Libav-user] enumerating codec_tags
Gesendet von: libav-user-bounces at ffmpeg.org
On Fri, 22 May 2015 07:58:43 +0200
Steffen.Roeber at hella.com wrote:
> Hi,
> is there any way to iterate through all codec_tags of an AVOutputFormat
> without using the private header internal.h? I need that header because
> AVCodecTag is there.
> Currently I'm trying something like:
> auto enumFormat = av_guess_format(nullptr, qPrintable(extension),
nullptr
> );
> for (uint32 i = 0; enumFormat->codec_tag && enumFormat->codec_tag[i];
++i)
> {
> auto tag = enumFormat->codec_tag[i];
>
> while (tag->id != AV_CODEC_ID_NONE)
> {
> encoder = avcodec_find_encoder(tag->id);
>
> if (encoder && encoder->type == AVMEDIA_TYPE_VIDEO &&
> av_codec_is_encoder(encoder))
> {
> //...
> }
>
> ++tag;
> }
> }
> What I need, are all codec that are supported by a AVOutputFormat.
>
> Kind regards
> Steffen
While AVCodecTag is private, you could probably check presence of
support via av_codec_get_tag() and enumerating all codecs ffmpeg knows.
(Roundabout, but might work.)
_______________________________________________
Libav-user mailing list
Libav-user at ffmpeg.org
http://ffmpeg.org/mailman/listinfo/libav-user
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://ffmpeg.org/pipermail/libav-user/attachments/20150527/69b95274/attachment.html>
More information about the Libav-user
mailing list