简体   繁体   English

Twilio将音频和视频记录在同一文件中

[英]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. 我们正在创建一个网站,该网站将使用Twilio使用户能够使用Twilio服务进行视频会议以在项目上进行合作。

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. Twilio开发人员布道者在这里。

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: 现在有一个新的API功能,可以将电话会议中的音频和视频记录组合成一个音频/视频文件:

https://www.twilio.com/docs/video/api/compositions-resource 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. 结果是一个新的视频流,所有参与者视频都合并到一个窗口式视频中。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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