CDN pull audio is lost.

wyvasi

Member
Hello.
We are publishing from Iphone (audio only) to origin(oracle1) and playing on edge(oracle2). If I try to play the stream on oracle1 all fine but there is no audio on oracle2.
I attached link to google drive with all logs.
 

Max

Administrator
Staff member
Good day.
First, you've set Java heap extremely low:
1662433337179.png

The minimal recommended value is 1 Gb, and the server seems to have a much more
1662433431620.png

About the issue. The logs shows you've published a stream from Windows 10
1662433576596.png

and trying to play from edge using iOS SDK 2.6
1662433681332.png

Anyway, the problem is on publishers side. Seems like you've publishing a stream with default constraints
Code:
constraints: {
    audio: true,
    video: true
}
but publishers browser does not send video RTP packets. So the stream publishing fails due to Video RTP activity
1662434026638.png

You must set the proper constraints to publish audio only
Code:
constraints: {
    audio: true,
    video: false
}
In this case, the stream should play both from origin and edge.
 

wyvasi

Member
This is happening on development side, so only 1-2 streams are published, I will increase the ram just in case.
We published in our demo from ios app and web, but we can't get audio to work on cdn( play on oracle2) from ios app(publish on oracle1 ), only on origin server can play audio just fine. I will try to add constraints to the other publisher just in case but I don't think it will change anything.
The stream name with issues is vc-joedo
 

wyvasi

Member
After I change ram, constraints and wcs and restart seems to work.
If we start the stream on ios with { audio: true, video: false } , how can we switch to {audio: true, video: true}, without having to stop the stream ?
 
Last edited:

Max

Administrator
Staff member
This is happening on development side, so only 1-2 streams are published, I will increase the ram just in case.
Even for testing purposes, it is recommended to have at least 1 Gb of heap. Usually, WCS uses ~200 M of heap when no publishers and players on server.
If we start the stream on ios with { audio: true, video: false } , how can we switch to {audio: true, video: true}, without having to stop the stream ?
Constraints cannot be changed on-the-fly, so stream has to be restarted.
If you need to publish audio only, then switch to audio+video, the recommended solution is to publish audio+video, and mute video right after publishing:
Code:
    publishStream = session.createStream({
        name: streamName,
        display: localVideo,
        ...
    }).on(STREAM_STATUS.PUBLISHING, function (stream) {
        setStatus("#publishStatus", STREAM_STATUS.PUBLISHING);
        onPublishing(stream);
        stream.muteVideo();  // mute video on successful publishing
        ...
    });
    publishStream.publish();
In this case, black screen video track will be sent instead of video from camera.
Then, to unmute video on publishers side by keypress or something, use
Code:
publishStream.unmuteVideo(); // unmute when needed
You can mute audio also in the same way if needed.
 
Top