Use only audio track from video stream

为君一笑 提交于 2019-12-24 12:50:25

问题


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



来源:https://stackoverflow.com/questions/34317406/use-only-audio-track-from-video-stream

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!