[Ffmpeg-devel] Reading TAGS?

Wildex999 krstjern
Fri Mar 30 23:32:31 CEST 2007


Hello, I'm trying to use the FFMPEG format reader for a poject I'm 
working on, and I need to get the 4 byte(32-bit) tag/fourcc for a 
video/audio codec after opening the stream, but it doesn't always return 
a video tag, and never a readable audio tag. Am I doing something wrong, 
or is there some functions I have to use?

Heres part of my code:
av_open_input_file(&pFormatCtx, argv[i+1], NULL, 0, NULL) //Open file
av_find_stream_info(pFormatCtx) //Read stream info
cout << (char)(pFormatCtx->streams[ii]->codec->codec_tag);
cout << (char)(pFormatCtx->streams[ii]->codec->codec_tag>>8);
cout << (char)(pFormatCtx->streams[ii]->codec->codec_tag>>16);
cout << (char)(pFormatCtx->streams[ii]->codec->codec_tag>>24);

*/Not including error checking*/

I do sometimes get the right tags(SNOW, XVID, WMV3 etc) for video, but 
the audio streams doesn't work, and some vidoe streams(MPEG being one) 
doesn't return a tag =/




More information about the ffmpeg-devel mailing list