Hi all!
I'm writing an audio stream playback application under Linux with the
help of FFmpeg libraries. In the past I've already worked with FFmpeg
and it has proven quite useful to me. Nice work, guys!
The input media can be either an offline file (e.g. mp3 music) or an
online netradio stream.
Getting the metadata for the actual stream causes some problems to me.
In case of the MP3 file, I can get metadata information using something
like this:
AVMetadataTag * curr;
AVMetadata * md1;
md1 = context->metadata;
curr = av_metadata_get (md1, "title", NULL, 0);
printf ("%s\n", curr->value);
However in case of a netradio stream, I can get no metadata information
with the code above, and not even with this code:
AVMetadataTag * curr;
AVMetadata * md2;
md2 = context->streams[audio_stream_index]->metadata;
curr = av_metadata_get (md2, "title", NULL, 0);
printf ("%s\n", curr->value);
The netradio stream is certainly transmitting metadata, since playing
with Mplayer the output is the following:
Playing http://stream002.radio.hu/mr2.aac.
Resolving stream002.radio.hu for AF_INET...
Connecting to server stream002.radio.hu[217.20.138.67]: 80...
Name : MR
Genre : Pop, Alternative, World, Hungary
Website: http://www.radio.hu/
Public : yes
Bitrate: 80kbit/s
Cache size set to 320 KBytes
Cache fill: 0.00% (0 bytes)
ICY Info: StreamTitle='Kistehen Tanczenekar - Noi haj';
This "ICY StreamTitle" information is one of those I want to get somehow...
My questions:
-1) I was unable to find struct AVMetadata (it is present in struct
AVFormatContext), thus I'm not able to read the list of available
metadata categories. Instead, I must know somehow the categories
available, e.g. "title", "author" and so on. Is there a list of
available categories?
-2) does Mplayer use FFmpeg with some extension or the basic FFmpeg
package is also capable of returning such information? If so, how can it
be done? Please send me a reference function or webpage... if FFmpeg
cannot do this, shall I implement an RTP protocol handler talking to the
stream source requesting metadata?
Thank you in advance!
Regards,
--
Selmeci, Tamas
http://www.open-st.eu
_______________________________________________
libav-user mailing list
[email protected]
https://lists.mplayerhq.hu/mailman/listinfo/libav-user