[Ffmpeg-devel] Reading TAGS?
Wildex999
krstjern
Sat Mar 31 00:16:55 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 =/
>
>Some things you are doing wrong:
>
>- Asking ffmpeg-user questions on ffmpeg-devel.
>- Assuming there will always be a codec_tag.
>- Assuming the codec_tag will be meaningful at all.
>- Using C++.
>- Commenting the obvious.
>- Using Bulgarian (or whatever the country is this year) variable names.
>The above list is not intended to be complete.
>-- >M?ns Rullg?rd >mans at mansr.com If i posted in wrong mailing list,
then I'm sorry, thanks for help anyway. Now, heres a list of what YOU do
wrong: -Comment on other coding style when not asked. -Write personal
opinions like they were some kind of rules to follow -Not actually helping
The above list is not intended to be complete.
----- Wildex999
More information about the ffmpeg-devel
mailing list