# onFillChunkDataPacket behavior for RTMP and RTSP publishing

**URL:** <https://community.wowza.com/t/onfillchunkdatapacket-behavior-for-rtmp-and-rtsp-publishing/39019>\
**Category:** Wowza Streaming Engine\
**Created:** [July 24, 2012, 10:23pm UTC](https://community.wowza.com/t/onfillchunkdatapacket-behavior-for-rtmp-and-rtsp-publishing/39019 "2012-07-24T22:23:40Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Eugene\_Krupatkin](https://avatars.discourse-cdn.com/v4/letter/e/848f3c/32.png) [@Eugene\_Krupatkin](https://community.wowza.com/u/Eugene_Krupatkin)\
**Post date:** [July 24, 2012, 10:23pm UTC](https://community.wowza.com/t/onfillchunkdatapacket-behavior-for-rtmp-and-rtsp-publishing/39019/1 "2012-07-24T22:23:40Z")

</div>

I’m new here, so my question might be a bit off:

I’m sending ID3 tags to iPad using the following code from live RTMP and RTSP streams:

```auto
import com.wowza.wms.module.*;
import com.wowza.wms.amf.*;
import com.wowza.wms.application.*;
import com.wowza.wms.httpstreamer.cupertinostreaming.livestreampacketizer.*;
import com.wowza.wms.media.mp3.model.idtags.*;
import com.wowza.wms.stream.IMediaStream;
import com.wowza.wms.stream.livepacketizer.*;
public class ModuleCupertinoLiveOnTextToID3 extends ModuleBase
{
	class LiveStreamPacketizerDataHandler implements IHTTPStreamerCupertinoLivePacketizerDataHandler
	{
		IApplicationInstance appInstance = null;
		
		public LiveStreamPacketizerDataHandler(IApplicationInstance appInstance)
		{
			this.appInstance = appInstance;
		}
		public void onFillChunkDataPacket(CupertinoPacketHolder holder, AMFPacket packet, ID3Frames id3Frames)
		{			
			while(true)
			{
				byte[] buffer = packet.getData();
				if (buffer == null)
					break;
				
				
				IMediaStream stream = appInstance.getStreams().getStream("myStream");
				
			
				
				getLogger().info("ModuleCupertinoVODOnTextToID3.onAppStart["+appInstance.getContextStr()+"] Send string: " + stream.getVideoTC());
								
								
				ID3V2FrameTextInformation comment = new ID3V2FrameTextInformation(ID3V2FrameBase.TAG_TIT1);
				comment.setValue("" + stream.getVideoTC());
				id3Frames.putFrame(comment);
				break;
			}
		}
	}
	
	class LiveStreamPacketizerListener implements ILiveStreamPacketizerActionNotify
	{
		IApplicationInstance appInstance = null;
		
		public LiveStreamPacketizerListener(IApplicationInstance appInstance)
		{
			this.appInstance = appInstance;
		}
		public void onLiveStreamPacketizerCreate(ILiveStreamPacketizer liveStreamPacketizer, String streamName)
		{
			getLogger().info("ModuleCupertinoLiveOnTextToID3#MyLiveListener.onLiveStreamPacketizerCreate["+streamName+"]");
			if (liveStreamPacketizer instanceof LiveStreamPacketizerCupertino)
			{
				((LiveStreamPacketizerCupertino)liveStreamPacketizer).setDataHandler(new LiveStreamPacketizerDataHandler(appInstance));
			}
		}
		public void onLiveStreamPacketizerDestroy(ILiveStreamPacketizer liveStreamPacketizer)
		{
		}
		public void onLiveStreamPacketizerInit(ILiveStreamPacketizer liveStreamPacketizer, String streamName)
		{
		}
	}
	public void onAppStart(IApplicationInstance appInstance)
	{		
		appInstance.addLiveStreamPacketizerListener(new LiveStreamPacketizerListener(appInstance));
		getLogger().info("ModuleCupertinoLiveOnTextToID3.onAppStart["+appInstance.getContextStr()+"]");
	}
}

```

For RTMP publishing the ID3 tags are firing a lot more often than for RTSP. I’m using Wirecast for both.

Is there any way I can increase the frequency of onFillChunkDataPacket() firing for RTSP publising source?

---

<div class="post-metadata">

**Author:** ![Randall\_Auriemma](https://avatars.discourse-cdn.com/v4/letter/r/85e7bf/32.png) [@Randall\_Auriemma](https://community.wowza.com/u/Randall_Auriemma)\
**Post date:** [July 24, 2012, 7:52pm UTC](https://community.wowza.com/t/onfillchunkdatapacket-behavior-for-rtmp-and-rtsp-publishing/39019/2 "2012-07-24T19:52:25Z")

</div>

When you’re outputting the timecodes, do you see any pattern? Is there a difference in the source stream encoding? What’s the eventual goal?

---

<div class="post-metadata">

**Author:** ![Eugene\_Krupatkin](https://avatars.discourse-cdn.com/v4/letter/e/848f3c/32.png) [@Eugene\_Krupatkin](https://community.wowza.com/u/Eugene_Krupatkin)\
**Post date:** [July 27, 2012, 9:37am UTC](https://community.wowza.com/t/onfillchunkdatapacket-behavior-for-rtmp-and-rtsp-publishing/39019/3 "2012-07-27T09:37:06Z")

</div>

Solved using your post from last year:

[https://www.wowza.com/forums/showthread.php?14702-New-iOS-streaming-supports-timed-data-event-in-live-and-video-on-demand-streams&p=75867#post75867](https://www.wowza.com/forums/showthread.php?14702-New-iOS-streaming-supports-timed-data-event-in-live-and-video-on-demand-streams&p=75867#post75867)
