On date Monday 2009-04-06 10:45:29 -0700, debanjana kayal encoded:
> Hi ,
>
> I would like to know if FFmpeg can extract the ID3 tags.If yes could
> anyone pl. tell me where do i found the information (which structure
> and which function).  I would also like to know whether FFmpeg can
> be provide me the information on the cover images embeded in the
> files.  Best Regards Raja

Starting from:
2009-03-01 - r17682 - lavf 52.31.0 - Generic metadata API

FFmpeg supports generic metadata tags.

Sample application:
-----8<-----------------------------------------------------
#include <stdio.h>
#include <stdlib.h>

#include <libavformat/avformat.h>

static void dump_tags(const AVFormatContext *s)
{
    AVMetadataTag *tag = NULL;
    while ((tag=av_metadata_get(s->metadata, "", tag, 
AV_METADATA_IGNORE_SUFFIX)))
        printf("%s: %s\n", tag->key, tag->value);
}

int main (int argc, char **argv)
{
    char *infilename;
    AVFormatContext *format_ctx;

    if (argc <= 1) {
        printf ("No file in input. Please specify an input filename\n");
        exit(1);
    }

    infilename= argv[1];
    av_register_all();

    if (av_open_input_file(&format_ctx, infilename, NULL, 0, NULL) < 0) {
        printf ("Cannot open file %s\n", infilename);
        exit(1);
    }

    if (av_find_stream_info(format_ctx) < 0) {
        printf ("Cannot find stream information\n");
        exit(1);
    }

    dump_format(format_ctx, 0, infilename, 0);
    dump_tags(format_ctx);

    return 0;
}
-----8<-----------------------------------------------------

As for the cover image, this has been discussed but not implemented,
check the ffmpeg-devel ML and patches are welcome.

Regards.
_______________________________________________
libav-user mailing list
[email protected]
https://lists.mplayerhq.hu/mailman/listinfo/libav-user

Reply via email to