-->

Use only audio track from video stream

2019-08-03 17:12发布

问题:

I am using Wowza Engine where I have some video streams, live and on-demand files. I use HLS and RTMP streaming. The issue is that for some clients I would like to offer only the audio track, not the audio+video.

I think I can do that using the transcoding module of Wowza, but I would like to know if there is a simpler way of doing this. I do not know maybe using a special smil, or prefix.

回答1:

You can specify an audio track by using the audio index. To play back the first track, add "audioindex=0" to the stream name and URL.

For VOD RTMP example, Stream: mp4:myStream.mp4?audioindex=0

HLS playback URL: http://[wowza-server-ip-address]:1935/[app-name]/mp4:myStream.mp4/playlist.m3u8?audioindex=0

For ABR delivery, you can add a line for an audio only rendition using the audioOnly parameter in the SMIL file. The value of the system-bitrate is the total bitrate in bits/second. For a live SMIL file example,

<smil>
    <head>
    </head>
    <body>
        <switch>
            <video src="hi-stream” system-bitrate="500000"/>
            <video src=“low-stream” system-bitrate=“250000”>
            <video src="low-stream” system-bitrate="64000">
                <param name="audioOnly" value="TRUE" valuetype="data"/>
            </video>
        </switch>
    </body>
</smil>

HLS playback URL: http://[wowza-server-ip-address]:1935/[app-name]/smil:[smil-name].smil/playlist.m3u8

HLS playback URL for testing the audio only rendition: http://[wowza-server-ip-address]:1935/[app-name]/[stream-name]/playlist.m3u8?wowzaaudioonly