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

    Transcoding an RTSP, native RTP or MPEG-TS stream with the Wowza Transcoder.

    1. In Wowza Media Server, create an application named "live"
      1. /Streams /StreamType "live"
      2. /Streams /LiveStreamPacketizers "cupertinostreamingpacketizer, smoothstreamingpacketizer, sanjosestreamingpacketizer"

        (You can exclude packetizers that you will not be using)

      3. /Transcoder /LiveStreamTranscoder "transcoder"
      4. /Transcoder /Templates "transcodeAudio.xml"


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

    2. Create a file named "transcodeAudio.xml" in the /transcoder/templates folder then copy the xml below to this new file.

      This Transcoder template has just one Encode block. The /Video /Codec set to "PassThru" and /BitRate "${SourceVideoBitrate}", only the /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 -->
      					<Transcoder>default</Transcoder>
      					<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>
    3. Start Wowza in stand-alone mode (/bin/startup.bat)
    4. Start the RTSP, native RTP or MPEG-TS stream using StreamManager 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 Transcoder start in the console running Wowza when you start camera.stream in StreamManager.

    5. Playback
      1. Playback with Wowza /examples/LiveVideoStreaming/client/live.html

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

      2. Playback in iOS
        Code:
        http://[wowza-address]:1935/live/camera.stream_rtp/playlist.m3u8
      3. Playback Smooth streaming in Silverlight
        Code:
        http://[wowza-address]:1935/live/camera.stream_rtp/Manifest
      4. Playback in SanJose streaming in Flash OSMF player
        Code:
        http://[wowza-address]:1935/live/camera.stream_rtp/manifest.f4m
    Comments 7 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