AirenSoft / OvenMediaEngine

OvenMediaEngine (OME) is a Sub-Second Latency Live Streaming Server with Large-Scale and High-Definition. #WebRTC #LLHLS
https://airensoft.com/ome.html
GNU Affero General Public License v3.0
2.55k stars 1.06k forks source link

Select and playing different tracks from a stream. #674

Closed smartic closed 2 years ago

smartic commented 2 years ago

Hello

I'm new using OvenMediaEngine and maybe this is a very simple question, but I've gone through documentation and forums with no luck.

I am sending a Streaming with a video track and several audio tracks with OBS. This part is working fine for me.

However, I am unable to select and connect to the different audio tracks in players like VLC or video.js.

Querying through the API, all the tracks are available there apparently:

curl -H "authorization: Basic b21lLWFjY2Vzcy10b2tlbg==" -i 192.168.10.150:8081/v1/vhosts/default/apps/app/streams/stream HTTP/1.1 200 OK Content-Length: 952 Server: OvenMediaEngine Content-Type: application/json;charset=UTF-8

{"message":"OK","response":{"input":{"createdTime":"2022-02-16T17:42:47.697+01:00","sourceType":"SRT","sourceUrl":"SRT://192.168.10.33:53584","tracks": [{"type":"Video","video":{"bitrate":"0","bypass":false,"codec":"H264","framerate":0.0,"height":1080,"width":1920}}, {"audio":{"bitrate":"0","bypass":false,"channel":2,"codec":"AAC","samplerate":48000},"type":"Audio"}, {"audio":{"bitrate":"0","bypass":false,"channel":2,"codec":"AAC","samplerate":48000},"type":"Audio"}, {"audio":{"bitrate":"0","bypass":false,"channel":2,"codec":"AAC","samplerate":48000},"type":"Audio"}, {"audio":{"bitrate":"0","bypass":false,"channel":2,"codec":"AAC","samplerate":48000},"type":"Audio"}]}, "name":"stream","outputs":[{"name":"stream","tracks": [{"type":"Video","video":{"bypass":true}}, {"audio":{"bypass":true},"type":"Audio"}, {"audio":{"bypass":true},"type":"Audio"}, {"audio":{"bypass":true},"type":"Audio"}, {"audio":{"bypass":true},"type":"Audio"}]}]}, "statusCode":200}

Do you know how to select and play between the different audio tracks? How can you check the "label", "language" and "enabled" metadata in the .m3u8 output stream?, as discussed in "https://github.com/videojs/http-streaming/blob/main/docs/multiple-alternative-audio-tracks.md"

Thank you very much and greetings.

Here i send you my Server.xml:

<?xml version="1.0" encoding="UTF-8"?>

OvenMediaEngine origin 192.168.10.150 false stun.l.google.com:19302 8081 1 1 1 1935 1 9999 1 4000-4003,4004,4005/udp 3333 1 *:3478 true *:10000/udp 1 9000 1 8080 1 8080 1 3333 1 *:3478 true *:10000/udp 1 * ome-access-token default ovenmediaengine.com * app live false bypass_stream ${OriginStreamName} stream_${Port} 4000,4001-4004 stream_4005 4005 30000 1 8 30000 false false false 5 3 * 5 3 * urn:mpeg:dash:utc:http-xsdate:2014 /time?iso&ms 5 *

CapturaOBS1

getroot commented 2 years ago

Unfortunately, OvenMediaEnigne's HLS does not yet support multiple audio tracks. In OME, the first video track and the first audio track are muxed into one TS. To solve this, video and audio must be separated in HLS, which we plan to do in the LLHLS task. (https://github.com/AirenSoft/OvenMediaEngine/issues/480)

smartic commented 2 years ago

thank you very much for answering me, best regards