• How to set up a Flash application to publish H.264 video and Speex audio to Wowza Transcoder AddOn

    Steps for transcoding an RTSP, native RTP, or MPEG-TS stream with Wowza Transcoder AddOn.

    1. In the Wowza media server software, create an application named live.

      1. Set <Streams>/<StreamType> to live.

      2. Set <Streams>/LiveStreamPacketizers> to cupertinostreamingpacketizer, smoothstreamingpacketizer, sanjosestreamingpacketizer,mpegdashstreamingpacketizer.

        Note: You can exclude packetizers that you will not be using. mpegdashstreamingpacketizer is only supported in Wowza Streaming Engine™ software.

      3. Set <Transcoder>/<LiveStreamTranscoder> to transcoder.

      4. Set <Transcoder/<Templates> to transcodeAudio.xml.

      Many IP cameras have h.264 video but an audio codec that's not supported in Flash, iOS, and Silverlight players. Refer to the "Audio (decoding)" list in the Wowza Transcoder AddOn Overview. This template transcodes this kind of carrier.

    2. Create a file named transcodeAudio.xml in the /transcoder/templates folder.

    3. Copy the following XML code into transcodeAudio.xml. It configures a Transcoder template with just one Encode block. The <Video>/<Codec> is set to PassThru and <Video>/<BitRate> is set to ${SourceVideoBitrate}. The <Video>/<Profile> is changed to baseline. The <Audio>/<Codec> is AAC to transcode the unsupported audio codec.
      Code:
      <Root>
      	<Transcode>
      		<Encodes>
      			<Encode>
      				<Enable>true</Enable>
      				<Name>RTP</Name>
      				<StreamName>mp4:${SourceStreamName}_rtp</StreamName>
      				<Video>
      					<!-- H.264, PassThru -->
      					<Codec>PassThru</Codec>
      					<!-- default, CUDA, QuickSync -->
      					<Implementation>default</Implementation>
      					<FrameSize>
      						<!-- letterbox, fit-width, fit-height, crop, stretch, match-source -->
      						<FitMode>fit-height</FitMode>
      						<Width>320</Width>
      						<Height>240</Height>
      					</FrameSize>
      					<Profile>baseline</Profile>
      					<Bitrate>${SourceVideoBitrate}</Bitrate>
      					<KeyFrameInterval>
      						<FollowSource>true</FollowSource>
      						<Interval>60</Interval>
      					</KeyFrameInterval>
      					<Overlays>
      						<Overlay>
      							<Enable>false</Enable>
      							<Index>0</Index>
      							<ImagePath>${com.wowza.wms.context.VHostConfigHome}/content/wowzalogo.png</ImagePath>
      							<Opacity>100</Opacity>
      							<Location>
      								<X>5</X>
      								<Y>5</Y>
      								<Width>${ImageWidth}</Width>
      								<Height>${ImageHeight}</Height>
      								<!-- horiz: left, right, hcenter - vert: top, bottom, vcenter -->
      								<Align>left,top</Align>
      							</Location>
      						</Overlay>
      					</Overlays>
      					<Parameters>
      					</Parameters>
      				</Video>
      				<Audio>
      					<!-- AAC, PassThru -->
      					<Codec>AAC</Codec>
      					<Bitrate>${SourceAudioBitrate}</Bitrate>
      				</Audio>
      				<Properties>
      				</Properties>
      			</Encode>
      		</Encodes>
      		<Decode>
      			<Video>
      				<Deinterlace>false</Deinterlace>
      				<Overlays>
      					<Overlay>
      						<Enable>false</Enable>
      						<Index>0</Index>
      						<ImagePath>${com.wowza.wms.context.VHostConfigHome}/content/wowzalogo.png</ImagePath>
      						<Opacity>100</Opacity>
      						<Location>
      							<X>5</X>
      							<Y>5</Y>
      							<Width>${ImageWidth}</Width>
      							<Height>${ImageHeight}</Height>
      							<!-- horiz: left, right, hcenter - vert: top, bottom, vcenter -->
      							<Align>left,top</Align>
      						</Location>
      					</Overlay>
      				</Overlays>
      				<Parameters>
      				</Parameters>
      			</Video>
      			<Properties>
      			</Properties>
      		</Decode>
      		<Properties>
      		</Properties>
      	</Transcode>
      </Root>
    4. Start the Wowza media server in standalone mode (/bin/startup.bat).

    5. Start the RTSP, native RTP, or MPEG-TS stream using Stream Manager with MediaCaster type rtp on application live/_definst_.

      For this example, the stream is camera.stream, a text file that contains the RTSP URL to an IP camera with H.264 video and G.711 audio. You should see the Transcoder start in the console running the Wowza media server when you start camera.stream in Stream Manager.

    6. Play the stream.

      1. Playback with example Flash RTMP player [install-dir]/examples/LiveVideoStreaming/FlashRTMPPlayer/player.html:

        Server: rtmp://[wowza-ip-address]:1935/live
        Stream: camera.stream_rtp

      2. Playback in iOS device:

        http://[wowza-ip-address]:1935/live/camera.stream_rtp/playlist.m3u8

      3. Playback with Microsoft Silverlight:

        http://[wowza-ip-address]:1935/live/camera.stream_rtp/Manifest

      4. Playback in Adobe Flash OSMF player:

        http://[wowza-ip-address]:1935/live/camera.stream_rtp/manifest.f4m

    Comments 10 Comments
    1. arouaoui.med@hotmail.fr -
      Hi can i transcode th audio format of android "raw_amr" to AAC withe wowza ??
    1. rrlanham -
      No, sorry, it's not on the list:

      Audio decoding: AAC, MP3, MPEG 1 Part 1/2, Speex, G.711 (a-law and mu-law)

      http://www.wowza.com/forums/content....wza-Transcoder

      Richard
    1. arouaoui.med@hotmail.fr -
      so we have any solution ?? to stream audio android 1.5-->3.0 with wowza so wat you propose ..?? you think ?? that i can to transcode with a java code and if yes ?? how can i integret him in wowza solution ???
    1. charlie -
      You can try FFmpeg or VLC. Either of these should be able to transcode to AAC.

      Charlie
    1. arouaoui.med@hotmail.fr -
      thks you charlie i will try
    1. arouaoui.med@hotmail.fr -
      hi Charlie im a beginer with ffmpeg and i can't found the command to restream and transcod and publish my audio stream in wowza my audio is encoded in ARM_NB sended by android in 5044 port i wont the command ffmpeg to recive the stream transcod it in AAC and restream to wowza
      i try to recive the stream with an sdp file

      m=audio 5044 RTP/AVP 96
      b=AS:128
      b=RR:0
      a=rtpmap:96 AMR/8000
      a=fmtp:96 octet-align=1
      it is work and i can hear the sound when i lanch with VLC
      i want to do it with ffmpeg
      help me plz
    1. rrlanham -
      For FFmpeg take a look at this article:
      http://www.wowza.com/forums/content....rver-(MPEG-TS)

      But for streaming from mobile, take a look at Livu
      http://www.wowza.com/forums/content....h-Wowza-Server

      Richard
    1. victorykiry -
      Thanks for great information to provide me and its really good post.
    1. cabello -
      It feels like the wrong place to ask but I still didn't find the correct place.

      I plan to use the resulting MP4 (H.264 + AAC) to play in all my media. How can I discard the original so I doesn't copy to S3 and it doesn't result in duplicate files and extra costs?
      Do I need to write a custom Writer module to only copy to S3 the *_AAC files?

      Thanks.
    1. salvadore -
      Hello there and welcome to the Wowza support forum.

      I believe this guide is what you are looking for:
      How to move recordings from live streams (ModuleMediaWriterFileMover)

      Kind regards,

      Salvadore