Record stream missing with INVIDUAL mode

  • Describe the behavior:
    I’m developing a video call conference application, 2 to 4 people can join the conference call. I have to record all streams. First, I use COMPOSE for recordingMode, but CPU worked too much, then I tried with INDIVIDUAL mode, it seems cpu doesn’t need to work. But another problem arises:
    –> On server: Only the first participant can record the stream, the remaining video streams of other participants are not recorded.
    –> On devices: Participants in the latter will be able to see videos of the previous participants, but first participants will only see a black screen for later participants.
  • OpenVidu_server deployment:
    . OpenVidu: 2.15.0
    . KMS: 6.14.0
    . OpenVidu-coturn: 1.0.0
    . OpenVidu-proxy: 3.0.0
    . OpenVidu-redis: 1.0.0
  • Environment:
    . VPS- Ubuntu 16.04
    . Mobile app demo. Ref : https://github.com/OpenVidu/openvidu-tutorials/tree/master/openvidu-android
    . I modified source code in <getToken(String sessionId)> function:
    *First: RequestBody sessionBody = RequestBody.create(MediaType.parse(“application/json; charset=utf-8”), “{“customSessionId”: “” + sessionId + “”}”);
    *Replaced to: RequestBody sessionBody = RequestBody.create(MediaType.parse(“application/json; charset=utf-8”), “{“customSessionId”: “” + sessionId + “”,“recordingMode”: “ALWAYS”,“defaultOutputMode”: “INDIVIDUAL”}”);//"{“customSessionId”: “” + sessionId + “”}");
  • Detail 18.json on session:
    {
    “createdAt”: 1594615463659,
    “id”: “18”,
    “name”: “18”,
    “sessionId”: “18”,
    “files”: [
    {
    “connectionId”: “con_WeH4TiUcRV”,
    “streamId”: “str_CAM_LQov_con_WeH4TiUcRV”,
    “size”: 0,
    “clientData”: “{“clientData”: “Participant44”}”,
    “serverData”: “”,
    “hasAudio”: true,
    “hasVideo”: true,
    “typeOfVideo”: “CAMERA”,
    “startTimeOffset”: -1594615463659,
    “endTimeOffset”: -1594615463659
    },
    {
    “connectionId”: “con_DOheIGQovE”,
    “streamId”: “str_CAM_OqwF_con_DOheIGQovE”,
    “size”: 0,
    “clientData”: “{“clientData”: “Participant18”}”,
    “serverData”: “”,
    “hasAudio”: true,
    “hasVideo”: true,
    “typeOfVideo”: “CAMERA”,
    “startTimeOffset”: -1594615463659,
    “endTimeOffset”: -1594615463659
    },
    {
    “connectionId”: “con_OojmcdXA2A”,
    “streamId”: “str_CAM_OvMl_con_OojmcdXA2A”,
    “size”: 1275069,
    “clientData”: “{“clientData”: “Participant17”}”,
    “serverData”: “”,
    “hasAudio”: true,
    “hasVideo”: true,
    “typeOfVideo”: “CAMERA”,
    “startTimeOffset”: 1379,
    “endTimeOffset”: 36560
    }
    ]
    }
    => Only the stream has streamId <str_CAM_OvMl_con_OojmcdXA2A> with data. The remaining 2 streamsId has a webm file size of zero bytes.
    ***It seems that this problem only happens when I use INDIVIDUAL mode, with COMPOSE mode, everything works fine. I have encountered this problem in earlier versions of OpenVidu. I see this problem fixed, specified in the “BUG FIXES” section in version 2.15.0, but why on my environment does it work? I was doing something wrong?
    ! Thanks all for help !..

Please repeat the test with a web application. It seems there are some issues with native Android applications. Just to confirm.

Yes. I tested with web app and mobile app (Ard + iOS)
I. Web app:

  • Describe the behavior: I added startRecord for manual record and use INDIVIDUAL mode.
    function startRecord() {
    var mySessionId = document.getElementById(“sessionId”).value;
    return new Promise((resolve, reject) => {
    $.ajax({
    type: “POST”,
    url: OPENVIDU_SERVER_URL + “/api/recordings/start”,
    data: JSON.stringify({ session: mySessionId, outputMode: “INDIVIDUAL”}),
    headers: {
    “Authorization”: "Basic " + btoa(“OPENVIDUAPP:” + OPENVIDU_SERVER_SECRET),
    “Content-Type”: “application/json”
    },
    success: response => {
    resolve(response.id);
    console.log("startRecord " + response.sessionId)
    },
    });
    });
    }
  • Result:
    _ Case 1:
    I created a session with 4 participants. After full 4 participants join session, the participants can see each other, then one person presses the “start record” button. Unexpectedly, although other participants could not press the “start record” button, I have seen “error 409” in the console screen. But there were 4 “.webm” files on server, fully recorded for the participants. The session worked well.
    _ Case 2:
    The first participant joins the session and press the “start record” button. Then other participants then joined this session, they still can’t press the “start record” button, I have seen error 409 () in the console screen again. Though, the record streams are perfectly recorded. Besides, the participants can see each other on the screen without appearing any black screen.
    =>>> The web application works well with recording in INDIVIDUAL mode.

II. Android app.

  • For this test, I use “MANUAL_RECORD” similar to the one with the web app above. I also performed two similar test actions with the web app.
  • The result is:
    _ Case 1: 4 participants join session, then all participants press the “start record” button. All record streams are perfectly stored on the server.
    _ Case 2: The first participant joins the session and press the “start record” button. Then other participants then joined this session.
    a) On screen of the first participant, only the stream of this participant, the other participants streams will only show black frames.
    b) On screen of other participants, can see local streams of this participant and the steam of the first participant. The other participants streams will only show black frames too.
    c) On server: Only the first participant’s stream will be saved successfully. Other stream of participants record is failed (size of webm files is zero bytes).

III. iOS app.
I did the same test as I did with the Android app, the results were similar the test with Android app.

Hello @Phong_Nguy_n,

Thank you for detailed bug reporting. It is much clear when the problem appears.

We do not provide official support for native Android development as the demo app is just a Proof of Concept (there is no proper SDK). But we will take a look in the following weeks to this issue.

Regards

Thanks for response!