# Examples

Use basic and advanced Wowza Streaming Engine Java API code examples.

## Articles

[Control access to RTSP/RTP streams with the Wowza Streaming Engine Java API](/content/docs/how-to-control-access-to-rtsp-rtp-streams/index.html)

Control access to RTSP/RTP streams with the ModuleAccessControlRTSP class in the Wowza Streaming Engine Java API.

[Use nDVR recording with the Wowza Streaming Engine Java API](/content/docs/how-to-use-wowza-ndvr-recording-api/index.html)

Use the Wowza Streaming Engine Java API to manually control nDVR recording.

[Use Wowza nDVR playlist request with the Wowza Streaming Engine Java API](/content/docs/how-to-use-wowza-ndvr-playlist-request-api/index.html)

Use the Wowza Streaming Engine Java API to control nDVR playlist requests.

[Push a native RTP or MPEG-TS stream with the Wowza Streaming Engine Java API](/content/docs/how-to-push-a-native-rtp-or-mpeg-ts-stream-using-rtputils-api/index.html)

Use the RTPUtils function to push an MPEG-TS or native RTP stream out of a Wowza Streaming Engine server.

[Control access to HLS streaming with the WSE Java API](/content/docs/how-to-control-access-to-apple-hls-streaming-cupertinostreaming/index.html)

Control access to Apple HLS streams with the ModuleAccessControlCupertinoStreaming class in the Wowza Streaming Engine Java API.

[Purge an item from Wowza Streaming Engine Media Cache](/content/docs/how-to-purge-an-item-from-the-cache-mediacache/index.html)

Use Java API calls to instruct Wowza Streaming Engine to purge on-demand assets from Media Cache.

[Wowza nDVR: Query recording duration with the Wowza Streaming Engine Java API](/content/docs/wowza-ndvr-duration-query-api/index.html)

Use the Wowza Streaming Engine Java API to query the duration in dvrTime, packetTime, and UTC time using an HTTP provider.

[Control access to MPEG-DASH streaming with the Wowza Streaming Engine Java API](/content/docs/how-to-control-access-to-mpeg-dash-streaming-mpegdashstreaming/index.html)

Control access to MPEG-DASH streaming with the ModuleAccessControlMPEGDashStreaming class in the Wowza Streaming Engine Java API.

[Specify the A/V synchronization method when re-streaming RTSP streams with the Wowza Streaming Engine Java API](/content/docs/how-to-dynamically-update-rtp-avsyncmethod-when-re-streaming-ip-camera-streams/index.html)

Specify the method of synchronizing audio and video for re-streamed live RTSP streams on a per-stream basis by using the Wowza Streaming Engine Java API.

[Add a media cache source](/content/docs/how-to-add-a-media-cache-source-using-the-wowza-streaming-engine-server-side-api/index.html)

Add a Wowza Media Cache source using the Wowza Streaming Engine Java API.

[Add program date-time headers to an HLS chunklist](/content/docs/how-to-control-display-of-program-date-and-time-headers-in-hls-chunklists-for-live-streams-ext-x-program-date-time/index.html)

Configure a Wowza Streaming Engine property to add EXT-X-PROGRAM-DATE-TIME header to live Apple HLS (Cupertino) streams.

[Extract MP4-formatted files from DVR streams with the Wowza Streaming Engine Java API](/content/docs/how-to-extract-mp4-formatted-files-from-dvr-streams-using-wowza-streaming-engine-java-api/index.html)

Use the Wowza Streaming Engine Java API to extract clips from live DVR streams in Wowza nDVR stores.

[Control media cache expiration](/content/docs/media-cache-how-to-control-media-cache-item-expiry/index.html)

Keep items from expiring from the Wowza Streaming Engine Media Cache.

[Send Apple HLS streams to a generic destination with the Wowza Streaming Engine Java API](/content/docs/how-to-send-apple-hls-streams-to-a-generic-destination/index.html)

Extend the Cupertino PushPublishing class to send Apple HLS streams from Wowza Streaming Engine to generic Stream Target destinations.

[Control MPEG-DASH fragment IDs and timecodes with the Wowza Streaming Engine Java API](/content/docs/how-to-control-mpeg-dash-fragment-ids-and-timecodes/index.html)

Use the Wowza Streaming Engine Java API to adjust chunk IDs and timecodes of live MPEG-DASH streams as they're packetized to synchronize streams across multiple servers.

[Use generic Stream Target class to prepare Apple HLS streams for ad insertion with the Wowza Streaming Engine Java API](/content/docs/how-to-use-generic-stream-target-api-to-prepare-apple-hls-streams-for-ad-insertion-scte-35/index.html)

Prepare Apple HLS streams for ad insertion based on SCTE-35 events in live MPEG-TS source streams by using the Wowza Streaming Engine Java API.

[Access MPEG-TS SCTE-35 tags for HLS streaming](/content/docs/access-mpeg-ts-scte-35-tags-for-hls-streaming/index.html)

This article provides an example of how to use the Wowza Streaming Engine™ Java API to access and insert MPEG-TS SCTE-35 tags when streaming an HLS live stream. We recommend using the  ModuleAdMarkers  class over the legacy stream target API  met...

[Control access to HTTP streams with the Wowza Streaming Engine Java API](/content/docs/how-to-control-access-to-http-streams-cupertinostreaming-sanjosestreaming-smoothstreaming-mpegdashstreaming/index.html)

Control access to HLS and MPEG-DASH streams with the ModuleAccessControlHTTPStreaming class in the Wowza Streaming Engine Java API.

[Select audio and subtitle tracks from a VOD file with the Wowza Streaming Engine Java API](/content/docs/how-to-select-audio-and-subtitle-tracks-from-a-video-on-demand-file/index.html)

Use this example code for MP4 video-on-demand playback that converts subtitle tracks to onTextData data events in Wowza Streaming Engine.

[Add graphic overlays to transcoded live streams in Wowza Streaming Engine](/content/docs/how-to-add-graphic-overlays-to-live-streams-with-wowza-transcoder/index.html)

Add static and dynamic graphical overlays to Wowza Streaming Engine live streams with Transcoder.

[Decrypt PlayReady-encrypted VOD content with the Wowza Streaming Engine Java API](/content/docs/how-to-decrypt-playready-encrypted-video-on-demand-content-on-the-fly/index.html)

Use the Wowza Streaming Engine Java API to decrypt Microsoft PlayReady-encrypted MP4 files before streaming.

[Control HTTP origin session creation with the Wowza Streaming Engine Java API](/content/docs/how-to-control-http-origin-session-creation/index.html)

Control the creation and combination of stream sessions when Wowza Streaming Engine is configured as an HTTP origin server.

[Convert timed metadata from AMF to ID3 using the Wowza Streaming Engine Java API](/content/docs/how-to-convert-ontextdata-events-in-a-live-or-vod-stream-to-timed-events-id3-tags-in-an-apple-hls-stream/index.html)

Convert AMF timed metadata in live, VOD, or nDVR streams to ID3 tags for Apple HLS delivery using the Wowza Streaming Engine Java API.

[Convert timed metadata from AMF to emsg using the Wowza Streaming Engine Java API](/content/docs/convert-timed-metadata-from-amf-to-emsg-using-the-wowza-streaming-engine-java-api/index.html)

Convert AMF timed metadata to Event Message (emsg) timed metdata for playback over MPEG-DASH using the Wowza Streaming Engine Java API.

[Do basic server-side publishing with the Stream class and Wowza Streaming Engine Java API](/content/docs/how-to-do-basic-server-side-publishing-with-stream-class-streams/index.html)

Use the Stream class in the Wowza Streaming Engine Java API to publish live streams using static content.

[Set up scheduled adaptive bitrate streaming](/content/docs/how-to-do-scheduled-adaptive-bitrate-streaming-using-stream-class-streams/index.html)

Set up scheduled adaptive bitrate streaming in the Wowza Streaming Engine Java API.

[Do server-side redirect of RTMP connections from one application to another with the Wowza Streaming Engine Java API](/content/docs/how-to-do-server-side-redirect-of-rtmp-connections-from-one-application-to-another/index.html)

Redirect RTMP client connections to specific applications and application instances using the Wowza Streaming Engine Java API.

[Dynamically switch between RTP and MPEG-TS when streaming RTSP with the Wowza Streaming Engine Java API](/content/docs/how-to-dynamically-switch-between-rtp-and-mpeg-ts-when-streaming-rtsp/index.html)

Use the Wowza Streaming Engine Java API to switch between native RTP and MPEG-TS delivery when streaming out using RTSP.

[Expose an attribute or method of a custom application module through JMX/JConsole with the Wowza Streaming Engine Java API](/content/docs/how-to-expose-an-attribute-or-method-of-a-custom-application-module-through-jmx-jconsole/index.html)

Add attributes or operations to a custom module through JMX/JConsole at runtime by using the Wowza Streaming Engine Java API.

[Get the current frame rate from a live stream with the Wowza Streaming Engine Java API](/content/docs/how-to-get-the-current-video-frame-rate-from-a-live-stream/index.html)

Use the ModuleLiveFrameRate class in the Wowza Streaming Engine Java API to get the frame rate of a live steam.

[Insert keyframes into a transcoded stream with the Wowza Streaming Engine Java API](/content/docs/how-to-insert-key-frames-into-a-transcoded-stream-using-server-side-api/index.html)

Use the Wowza Streaming Engine Java API to force additional keyframes into transcoded streams and stop keyframes from being inserted.

[Load balance NVIDIA accelerated transcoding across GPUs with the Wowza Streaming Engine Java API](/content/docs/how-to-load-balance-nvidia-cuda-accelerated-transcoding-across-gpus/index.html)

Use the ITranscoderVideoLoadBalancer interface in the Wowza Streaming Engine Java API to balance NVIDIA accelerated transcoding across multiple GPUs.

[Log play statistics on a timer with the Wowza Streaming Engine Java API](/content/docs/how-to-log-play-statistics-on-a-timer/index.html)

Use the ModuleStreamStats class in the Wowza Streaming Engine Java API to log stats for each play stream on a timer.

[Control which streams get transcoded with the Wowza Streaming Engine Java API](/content/docs/how-to-control-which-streams-get-transcoded-using-server-side-api/index.html)

Create a module that uses the ILiveStreamTranscoderControl interface in the Wowza Streaming Engine Java API to control which streams get transcoded.

[Modify or fix SDP data sent from IP cameras with the Wowza Streaming Engine Java API](/content/docs/how-to-modify-or-fix-sdp-data-sent-from-ip-cameras/index.html)

Use a Java class to override default RTSP requests sent to IP cameras and the SDP data those requests generate.

[Monitor MPEG-TS ingestion to process additional data streams with the Wowza Streaming Engine Java API](/content/docs/how-to-monitor-mpeg-ts-ingestion-to-process-additional-data-streams-scte-35-klv-etc/index.html)

Use a custom listener to insert PID monitors into MPEG-TS streams as they're ingested into Wowza Streaming Engine server.

[Override publish to remap a stream name with the Wowza Streaming Engine Java API](/content/docs/how-to-override-publish-to-remap-a-stream-name/index.html)

Rename a stream that's being published by using the ModuleOverridePublishRemapStream class.

[Redirect an HTTP or RTSP session through server-side code with the Wowza Streaming Engine Java API](/content/docs/how-to-redirect-an-http-or-rtsp-session-through-server-side-code/index.html)

Redirect an RTSP or HTTP streaming session (cupertino, sanjose, and smooth).

[Set up a JMX command line interface to Wowza Streaming Engine with the Wowza Streaming Engine Java API](/content/docs/how-to-set-up-a-command-line-interface-to-wowza-api/index.html)

Use the JMX interface to execute common command-line operations.

[Switch streams with the Wowza Streaming Engine Java API](/content/docs/how-to-switch-streams-using-stream-class-streams/index.html)

Implement the Stream class in the Wowza Streaming Engine Java API to switch between stream sources by using playlist objects.

[Listen for stream events and codec information with the Wowza Streaming Engine Java API](/content/docs/how-to-use-imediastreamactionnotify3-interface-to-listen-for-rtmp-stream-events-includes-codec-info/index.html)

Listen for RTMP stream events with the IMediaStreamActionNotify3 interface in the Wowza Streaming Engine Java API.

[Control aliasing of stream names with the Wowza Streaming Engine Java API](/content/docs/how-to-use-the-imediastreamnamealiasprovider2-interface/index.html)

Use the IMediaStreamNameAliasProvider2 interface in the Wowza Streaming Engine Java API to programmatically create stream name aliases.

[Publish server-side live streams with the Wowza Streaming Engine Java API](/content/docs/how-to-use-ipublishingprovider-api-to-publish-server-side-live-streams/index.html)

Create a server-side stream that is a mixture of live and video-on-demand content.

[Resolve SMIL file requests with the Wowza Streaming Engine Java API](/content/docs/how-to-use-java-api-calls-to-resolve-smil-file-requests/index.html)

Intercept a request for a multi-bitrate VOD stream and group the stream through Wowza Streaming Engine Java API calls.

[Resolve SMIL file requests with captions with the Wowza Streaming Engine Java API](/content/docs/resolve-smil-file-requests-with-captions-with-the-wowza-streaming-engine-java-api/index.html)

Use a custom Java module to intercept requests for adaptive bitrate streams with captions and programmatically create the stream grouping.

[Start native RTP and MPEG-TS streams with the Wowza Streaming Engine Java API](/content/docs/how-to-mediacaster-api-to-start-native-rtp-and-mpeg-ts-streams/index.html)

Control when an RTP or MPEG-TS live stream is started and stopped with two public MediaCaster classes in the Wowza Streaming Engine Java API.

[Start and stop MediaCaster streams with the Wowza Streaming Engine Java API](/content/docs/how-to-use-the-wowza-streaming-engine-java-api-to-start-and-stop-mediacaster-streams/index.html)

Start and stop MediaCaster streams by using the IApplicationInstance interface in the Wowza Streaming Engine Java API.

[Monitor and control connections made via MediaCaster with the Wowza Streaming Engine Java API](/content/docs/imediacasternotify2-example/index.html)

Use the ModuleMediaCasterNotifyExample to monitor and control connections made via the MediaCaster system with the Wowza Streaming Engine Java API.

[Create pseudo-live streams using files available to the application with a Wowza Streaming Engine server listener](/content/docs/stream-class-example/index.html)

Add a server listener to a Wowza Streaming Engine application with the Stream class that creates pseudo-live streams using files available to the application.

[Intercept and block incoming UDP packets for an RTP or MPEG-TS stream with the Wowza Streaming Engine Java API](/content/docs/how-to-intercept-and-block-incoming-udp-packets-for-an-rtp-or-mpeg-ts-stream/index.html)

Intercept UDP packets in incoming RTP or MPEG-TS streams and control which ones are depacketized by Wowza Streaming Engine.

[Start and stop VHost using JMX command line interface with the Wowza Streaming Engine Java API](/content/docs/how-to-set-up-a-command-line-interface-to-wowza-api-to-start-stop-vhost-using-jmx/index.html)

Use the JMX interface to implement virtual, appInstance, and MediaCaster stream start/stop from the command line.

##### Popular Video Topics

- [The Future of Video Tech](/content/blog/future-of-video-technology/index.html)
- [Streaming Starter Guide](/content/blog/complete-guide-to-live-streaming/index.html)
- [Live Event Streaming Guide](/content/blog/live-event-streaming-guide/index.html)
- [Interactive Streaming Guide](/content/blog/low-latency-streaming-technologies-the-key-to-interactive-video/index.html)
- [Streaming Protocols](/content/blog/streaming-protocols/index.html)
- [Transcoding](/content/blog/what-is-transcoding-and-why-its-critical-for-streaming/index.html)
- [Low Latency](/content/blog/what-is-low-latency/index.html)
- [Security](/content/blog/secure-video-streaming/index.html)

##### Video Resources

- [APIs & SDKs](/content/docs/wowza-developer-apis-and-sdks/index.html)
- [Developer IDE](/content/docs/how-to-extend-wowza-streaming-engine-using-the-wowza-ide/index.html)
- [Test Players](/content/testplayers/index.html)
- [Wowza System Status](https://status.wowza.com/)

##### Partners

- [Partners Overview](/content/partners/index.html)
- [Find a Partner](/content/partners/preferred-international-resellers/index.html)
- [Channel Program](/content/partners/channel-partner-program/index.html)
- [OEM Program](/content/partners/oem/index.html)
- [Partner Portal](/content/partners/resources/index.html)

##### Company

- [About Us](/content/company/index.html)
- [Blog](/content/blog/category/blog/index.html)
- [News](/content/news/index.html)
- [Events & Webinars](/content/company/events/index.html)
- [Careers](/content/careers/index.html)
- [Customers](/content/customers/index.html)
- [Contact Us](/content/contact/index.html)

##### Stay Connected

##### Stay Up to Date with the Blog

Email

X - Form Filled Type

© 2007–2025 Wowza Media Systems™, LLC. All rights reserved.   [Security & Privacy Policy](/content/legal/privacy/index.html) \| [Legal](/content/legal/index.html) \| [System Status](https://status.wowza.com/)
