简体   繁体   中英

Twilio recording audio and video in the same file

we are creating a website that will use Twilio to enable users to cooperate on project using the Twilio services for videoconferencing.

One of the feature for the participants, will be the possibility to playback a session. We managed to create rooms, recording the session and download the files containing the recordings of the various participants.

What we were not able to do is to record audio and video in the same track, so that we do not need to download two different files and manage the syncronization of them.

We did not found any info in the documentation about how to enable this option.

Can someone help us and tell us how to record audio and video in the same file ?

Twilio developer evangelist here.

There is currently no option that records the audio and video into the same track. As the documentation says :

Recordings captured by Programmable Video products are single-track, single-media and stored in a single file format.

So you will need to download both files and synchronise them yourself .

There is now a new API functionality that compose the audio and video recordings from a conference call into a single audio/video file:

https://www.twilio.com/docs/video/api/compositions-resource

It can be used this way:

curl -X POST 'https://video.twilio.com/v1/Compositions' \
    -u 'SKXXXX:your_api_key_secret' \
    -F 'RoomSid=RMXXXX' \
    -F 'StatusCallback=http://my.server.org/callbacks' \
    -F 'Format=mp4' \
<<-EOF -F 'VideoLayout={
      "transcode":{
        "video_sources":["RTXXXX"]
      }
    }'
EOF

The result is a new video streams with all the participants videos merged togheter in a single windowed video.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM