从视频流中仅使用音频轨道 [英] Use only audio track from video stream

查看:166
本文介绍了从视频流中仅使用音频轨道的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用Wowza引擎在那里我有一些视频流,直播和点播的文件。我使用HLS和RTMP流。问题是,某些客户端,我想只提供音频轨道,没有音频+视频。

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.

我想我能做到这一点使用Wowza的转码模块,但我想知道是否有这样做的简单的方法。我不知道,也许使用一种特殊的SMIL,或preFIX。

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.

推荐答案

您可以通过使用音频索引指定音轨。播放第一首曲子,加上audioindex = 0到流名称和网址。

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.

有关VOD RTMP例如,流:MP4:myStream.mp4 audioindex = 0

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

HLS播放网址:
http://[wowza-server-ip-address]:1935/[app-name]/mp4:myStream.mp4/playlist.m3u8?audioindex=0

有关ABR交付,您可以添加行音频只能用在 audioOnly 在SMIL文件参数再现。系统比特率​​的值是在比特/秒的总比特率。对于现场SMIL文件例如,

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播放网址:
http://[wowza-server-ip-address]:1935/[app-name]/smil:[smil-name].smil/playlist.m3u8

测试只有音频再现HLS播放网址:
http://[wowza-server-ip-address]:1935/[app-name]/[stream-name]/playlist.m3u8?wowzaaudioonly

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

这篇关于从视频流中仅使用音频轨道的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆