익명 01:45

Setting up Wowza to transcode the audio in a stream to play using Flowplayer

Setting up Wowza to transcode the audio in a stream to play using Flowplayer

This is a real long shot, but I figure it can't hurt to throw this out here:

I have an IP camera that has an RTSP stream with h.264 video and G.711 audio. I setup a Wowza application (myapp) to use the rtp-live StreamType and then got Flowplayer with the RTMP plugin correctly playing the video. However, I believe the audio isn't being transcoded (it sounds horrible and I don't have transcoding on).

My Streams/StreamType in conf/myapp/Application.xml is rtp-live. I have the RTSP stream specified in content/camera.stream. That's really it, and it works, putting out a standard RTMP stream at rtmp://myserver/myapp with stream camera.stream.

So, I've been trying to enable transcoding of the audio while passing through the video, but everything I find (the Transcoding Guide and others) just confuses me more and all my attempts don't work, often with errors about missing SMIL files (I tried to follow a guide but I might have missed something). I found one guide that specifically outlines audio-only transcoding, but of course I had no luck.

Is this the correct way to approach things? I thought it was and then tried to follow the Flowplayer example for dynamic streaming with Wowza using the F4M and HTTP Streaming plugins, but no joy.

I think a lot of my problem is it's unclear to me what URL format I should use to reference my streams

http://myserver:1935/myapp/smil:camera.stream.smil/manifest.f4m

or maybe

http://myserver:1935/myapp/_definst_/ngrp:camera.stream_all/manifest.f4m

?

Any suggestions of where to start? What should my Application.xml and my transcoding template look like? Thanks.



Top Answer/Comment:

This is fixable and you haven't missed anything obvious — you've mixed up two separate Wowza mechanisms (the Transcoder AddOn vs. client-side SMIL/ABR playback addressing), which is an easy trap to fall into from the general Transcoding Guide.

What's actually happening: G.711 (µ-law/A-law) isn't a codec that Flash/RTMP-based players (including the old Flowplayer RTMP plugin) know how to decode — that's why the video passes through fine (H.264 is natively supported end to end) while the audio is garbage. You don't need to touch F4M/HDS or SMIL playback addressing at all to fix just this; that's a separate, later concern for adaptive bitrate.

The tool you want is the Transcoder AddOn's built-in "Audio Only" template — it's designed for exactly this case: ingest a stream with unsupported audio (G.711, MP3, etc.) alongside H.264 video, pass the video through untouched, and transcode only the audio to AAC. You enable it per application in Application.xml's <Transcoder> block (<Enable>true</Enable>, pointed at the audio-only template rather than a full multi-bitrate one) — you don't need a custom transcoding template or a SMIL file to achieve this specific goal, which is likely why you kept hitting missing-SMIL errors: those come from setting up full adaptive-bitrate transcoding, a different and more involved feature than "just fix the audio codec."

Wowza's own walkthrough for this exact scenario is here: https://www.wowza.com/docs/how-to-transcode-only-the-audio-channel-of-an-incoming-stream — worth following instead of piecing it together from the general Transcoder Guide, since that guide assumes you also want multiple video renditions, which is where the SMIL/ngrp complexity you ran into actually comes from.

Once the Transcoder is producing the AAC audio, your playback URL becomes the transcoded stream name directly (played over RTMP, not the raw ingest name) rather than an F4M/SMIL manifest — the smil:/ngrp: addressing you were trying only becomes relevant once you add multiple bitrate renditions on top of this.

상단 광고의 [X] 버튼을 누르면 내용이 보입니다