# ID3 Tags server side

**URL:** <https://community.wowza.com/t/id3-tags-server-side/36424>\
**Category:** Wowza Developer Dojo\
**Tags:** wowza-streaming-server-java-api\
**Created:** [April 19, 2011, 2:30pm UTC](https://community.wowza.com/t/id3-tags-server-side/36424 "2011-04-19T14:30:30Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![Luis\_Ferreira](https://avatars.discourse-cdn.com/v4/letter/l/f08c70/32.png) [@Luis\_Ferreira](https://community.wowza.com/u/Luis_Ferreira)\
**Post date:** [April 19, 2011, 2:30pm UTC](https://community.wowza.com/t/id3-tags-server-side/36424/1 "2011-04-19T14:30:30Z")

</div>

Hello,

I have a rtmp encoder to publish live stream and I’m trying to inject meta-data on server side and send stream to iOS and Android.

i configured my server like this [toturial](https://www.wowza.com/docs/how-to-set-up-live-streaming-using-an-rtmp-based-encoder%28RTMP-or-RTSP-RTP-based-encoder%29)

is it possible to use your id3 tags lib to send meta-data and the stream to all players? flash, ios, android?

Best regards,

Luís

---

<div class="post-metadata">

**Author:** ![Richard\_Lanham](https://avatars.discourse-cdn.com/v4/letter/r/c68b51/32.png) [@Richard\_Lanham](https://community.wowza.com/u/Richard_Lanham)\
**Post date:** [April 19, 2011, 9:20pm UTC](https://community.wowza.com/t/id3-tags-server-side/36424/2 "2011-04-19T21:20:10Z")

</div>

Flash will work of course, and Android 2.2+ supports Flash. RTSP is not supported. iOS support for this using ID3 tags is not documented yet.

Richard

---

<div class="post-metadata">

**Author:** ![Richard\_Lanham](https://avatars.discourse-cdn.com/v4/letter/r/c68b51/32.png) [@Richard\_Lanham](https://community.wowza.com/u/Richard_Lanham)\
**Post date:** [April 27, 2011, 11:40am UTC](https://community.wowza.com/t/id3-tags-server-side/36424/3 "2011-04-27T11:40:47Z")

</div>

Yes, no problem. Add “cupertinostreamingpacketizer” to enable live streaming to iOS devices. It does not preclude other output (rtmp or rtsp)

Richard

---

<div class="post-metadata">

**Author:** ![Richard\_Lanham](https://avatars.discourse-cdn.com/v4/letter/r/c68b51/32.png) [@Richard\_Lanham](https://community.wowza.com/u/Richard_Lanham)\
**Post date:** [April 27, 2011, 6:46pm UTC](https://community.wowza.com/t/id3-tags-server-side/36424/4 "2011-04-27T18:46:49Z")

</div>

I think it will depend on the key frame frequency and length of each chunk

Richard

---

<div class="post-metadata">

**Author:** ![Richard\_Lanham](https://avatars.discourse-cdn.com/v4/letter/r/c68b51/32.png) [@Richard\_Lanham](https://community.wowza.com/u/Richard_Lanham)\
**Post date:** [April 28, 2011, 12:53pm UTC](https://community.wowza.com/t/id3-tags-server-side/36424/5 "2011-04-28T12:53:40Z")

</div>

How is this going? Do you have a handle on the client/device side of this? I was reading this inconclusive thread:

[http://stackoverflow.com/questions/5085677/extracting-id3-tags-from-mp3-over-http-live-streaming](http://stackoverflow.com/questions/5085677/extracting-id3-tags-from-mp3-over-http-live-streaming)

Richard

---

<div class="post-metadata">

**Author:** ![Richard\_Lanham](https://avatars.discourse-cdn.com/v4/letter/r/c68b51/32.png) [@Richard\_Lanham](https://community.wowza.com/u/Richard_Lanham)\
**Post date:** [May 4, 2011, 5:15pm UTC](https://community.wowza.com/t/id3-tags-server-side/36424/6 "2011-05-04T17:15:44Z")

</div>

I’m not real clear on what you are asking and what the problem is. I don’t think live audio will trigger IHTTPStreamerCupertinoVODActionNotify events.

Richard

---

<div class="post-metadata">

**Author:** ![Luis\_Ferreira](https://avatars.discourse-cdn.com/v4/letter/l/f08c70/32.png) [@Luis\_Ferreira](https://community.wowza.com/u/Luis_Ferreira)\
**Post date:** [April 27, 2011, 8:56am UTC](https://community.wowza.com/t/id3-tags-server-side/36424/7 "2011-04-27T08:56:48Z")

</div>

I created a module to add id3 tag for ios. The original application.xml looks like this:

```auto
		<Streams>
			<StreamType>live</StreamType>
			<StorageDir>${com.wowza.wms.context.VHostConfigHome}/content</StorageDir>
			<KeyDir>${com.wowza.wms.context.VHostConfigHome}/keys</KeyDir>
			<!-- LiveStreamPacketizers (separate with commas): cupertinostreamingpacketizer, smoothstreamingpacketizer, cupertinostreamingrepeater, smoothstreamingrepeater -->
			<LiveStreamPacketizers></LiveStreamPacketizers>			
			<!-- Properties defined here will override any properties defined in conf/Streams.xml for any streams types loaded by this application -->
			<Properties>
			</Properties>
		</Streams>
		<!-- HTTPStreamers (separate with commas): cupertinostreaming, smoothstreaming -->
		<HTTPStreamers>cupertinostreaming,smoothstreaming</HTTPStreamers>	

```

Can i add the cupertinostreamingpacketizer only to the LiveStreamPacketizers? will this change the other streams(rtmp and rstp) performance?

thanks

---

<div class="post-metadata">

**Author:** ![Luis\_Ferreira](https://avatars.discourse-cdn.com/v4/letter/l/f08c70/32.png) [@Luis\_Ferreira](https://community.wowza.com/u/Luis_Ferreira)\
**Post date:** [April 27, 2011, 3:25pm UTC](https://community.wowza.com/t/id3-tags-server-side/36424/8 "2011-04-27T15:25:56Z")

</div>

Thank you.

I have another doubt. Can i update ID3 tags every second?

```auto
LiveStreamPacketizerCupertino cupertinoPacketizer = (LiveStreamPacketizerCupertino)liveStreamPacketizer;
ID3V2FrameTextInformation comment_tag = null;
ID3Frames id3HeaderAudio = cupertinoPacketizer.getID3FramesHeaderAudio();
comment_tag = new ID3V2FrameTextInformation("COMM");
comment_tag.setTextEncoding(ID3V2FrameBase.TEXTENCODING_ISO_8859_1);
String metaDataValue = getMetadata(webServiceMeta);
comment_tag.setValue(metaDataValue);

```

if i execute this every second will the metadata sent to client be updated?

---

<div class="post-metadata">

**Author:** ![Luis\_Ferreira](https://avatars.discourse-cdn.com/v4/letter/l/f08c70/32.png) [@Luis\_Ferreira](https://community.wowza.com/u/Luis_Ferreira)\
**Post date:** [May 3, 2011, 3:53pm UTC](https://community.wowza.com/t/id3-tags-server-side/36424/9 "2011-05-03T15:53:43Z")

</div>

Thank you,

Im still trying to extract the ID3 tag in the client.

---

<div class="post-metadata">

**Author:** ![Luis\_Ferreira](https://avatars.discourse-cdn.com/v4/letter/l/f08c70/32.png) [@Luis\_Ferreira](https://community.wowza.com/u/Luis_Ferreira)\
**Post date:** [May 4, 2011, 9:16am UTC](https://community.wowza.com/t/id3-tags-server-side/36424/10 "2011-05-04T09:16:17Z")

</div>

```auto
public void onLiveStreamPacketizerCreate(ILiveStreamPacketizer liveStreamPacketizer, String streamName)
        {        
            name = streamName;
            System.out.println(name);
            liveStreamP = liveStreamPacketizer;

            Runnable Meta = new Runnable() {
                public void run() {
                    try {    
                        boolean config = false;
                        String webServiceMeta = "";
                        String time = "";
                        int timing = 1000;

                        while (true) {
                            if (!(liveStreamP instanceof LiveStreamPacketizerCupertino))
                                break;

                            if (!config){
                                try{
                                    System.out.println("A iniciar configurações...");
                                    FileInputStream fstream = new FileInputStream("C:\\WOWZA_METADATA_CONFIG.txt");
                                    FileInputStream fstream2 = new FileInputStream("C:\\WOWZA_TIMING_CONFIG.txt");
                                    DataInputStream in = new DataInputStream(fstream);
                                    DataInputStream in2 = new DataInputStream(fstream2);
                                    BufferedReader br = new BufferedReader(new InputStreamReader(in));
                                    BufferedReader br2 = new BufferedReader(new InputStreamReader(in2));

                                    while ((time = br2.readLine()) != null) {
                                        timing = Integer.parseInt(time);
                                    }
                                    in2.close();
                                    System.out.println("Timing da Thread: " + Integer.toString(timing));

                                    while ((webServiceMeta = br.readLine()) != null) {
                                        System.out.println("A ler linha: " + webServiceMeta);
                                        System.out.println("A procurar: " + name + " na linha " + webServiceMeta.substring(0, webServiceMeta.indexOf(":")));
                                        String remove = name + ":";
                                        if(webServiceMeta.substring(0, webServiceMeta.indexOf(":")).contains(name)){
                                            webServiceMeta = webServiceMeta.replaceAll(remove, "");
                                            break;
                                        }
                                    }
                                    in.close();
                                    System.out.println("Configurações terminadas");
                                    System.out.println("Serviço seleccionado: " + webServiceMeta);
                                    config = true;
                                }
                                catch (Exception e){
                                    getLogger().info("onStreamCreate: Error: " + e.getMessage());
                                }
                            }

                            LiveStreamPacketizerCupertino cupertinoPacketizer = (LiveStreamPacketizerCupertino)liveStreamP;
                            ID3V2FrameTextInformation comment_tag= null;
                            ID3Frames id3HeaderAudio = cupertinoPacketizer.getID3FramesHeaderAudio();
                    
                            comment_tag = new ID3V2FrameTextInformation("COMM");
                            comment_tag.setTextEncoding(ID3V2FrameBase.TEXTENCODING_ISO_8859_1);
                            String metaDataValue = getMetadata(webServiceMeta);                
                            comment_tag.setValue(metaDataValue);

                            System.out.println("add metadata to ID3Header");

                            id3HeaderAudio.putFrame(comment_tag);

                            Thread.sleep(1000L);
                        }
                    }
                    catch (InterruptedException iex) {}        
                }
            };
            metaThread = new Thread(Meta);
            System.out.println("Thread criada para a stream: " + name);
            metaThread.start();
        }

```

if i have smoothstreamingpacketizer on the aplication.xml this only runs once.

```auto
        <Streams>
            <StreamType>live</StreamType>
            <StorageDir>${com.wowza.wms.context.VHostConfigHome}/content</StorageDir>
            <KeyDir>${com.wowza.wms.context.VHostConfigHome}/keys</KeyDir>
            <!-- LiveStreamPacketizers (separate with commas): cupertinostreamingpacketizer, smoothstreamingpacketizer, cupertinostreamingrepeater, smoothstreamingrepeater -->
            <LiveStreamPacketizers>cupertinostreamingpacketizer, smoothstreamingpacketizer</LiveStreamPacketizers>            
            <!-- Properties defined here will override any properties defined in conf/Streams.xml for any streams types loaded by this application -->
            <Properties>cupertinostreamingpacketizer, smoothstreamingpacketizer</Properties>
        </Streams>

```

Im streaming live audio can I use the IHTTPStreamerCupertinoVODActionNotify events?

thank you for your time
