Modify or fix SDP data sent from IP cameras

You can create a class the overrides the code that's used to communicate with IP cameras and can modify the RTSP request sent to the IP camera and modify the resultant SDP data that's sent to Wowza media servers to publish the stream. Create this class, and add to a JAR file in the Wowza Streaming Engine server [install-dir]/lib folder.

The following sample class overrides the default RTSP handler:

package com.wowza.wms.plugin.rtpprovideroverride;

import com.wowza.wms.mediacaster.rtp.*;
import com.wowza.wms.logging.*;

public class RTPSessionDescriptionDataProviderOverride extends RTPSessionDescriptionDataProviderBasic
	protected void rtspMessageHook(RTPSessionDescriptionDataProviderBasicRTSPRequest request)
		// Here you can modify the RTSP message requests
		//request.addHeader("X-No-Keepalive", "1");

	protected String filterSessionDescriptionData(String streamInfo)
		// Here you can modify the SDP data that is sent to Wowza for publishing
		//streamInfo = streamInfo.replace("profile-level-id", "hide-profile-level-id");

		return streamInfo;


Edit [install-dir]/conf/[application-name]/Application.xml and add the following property to the <MediaCaster>/<Properties> container (be sure to get the proper container - there are several in the Application.xml file):

	<Value>com.wowza.wms.plugin.rtpprovideroverride.RTPSessionDescriptionDataProviderOverride </Value>