shinyo17
Our dawn is hotter than day
shinyo17
전체 방문자
오늘
어제
  • 분류 전체보기
    • BOJ
      • C++
      • PYTHON
    • Flutter
    • Ruby
    • Javascript
    • TIL
    • ETC

블로그 메뉴

  • 홈
  • 방명록

공지사항

  • @shinyo17

인기 글

태그

  • 포스트호그
  • petner
  • 펫트너
  • posthog
  • Firebase Hosting
  • Flutter
  • 플러터
  • Firebase
  • Flutter Web
  • dynamic link

최근 댓글

최근 글

티스토리

hELLO · Designed By 정상우.
shinyo17

Our dawn is hotter than day

TIL

20210615

2021. 6. 22. 10:13

103 - Tyga

2021. 06. 15

  1. Agora Cloud Recording

https://docs.agora.io/en/cloud-recording/product_cloud_recording?platform=RESTful

실행

  1. Get a resource ID
    녹화 전에, acquire method를 불러와야 한다. resource ID를 신청해야 한다.
    non-real-time transcoding을 사용하고 싶으면, scene을 2로 설정한다.

    • http request 예시 (acquire)

      https://api.agora.io/v1/apps/<yourappid>/cloud_recording/acquire

      Content-type: application/json;charset=utf-8
      Authorization: https://docs.agora.io/en/cloud-recording/faq/restful_authentication
      Basic HTTP authentication, agora console에 들어가서 restful api 클릭, customer ID, customer Secret donwload 한다

      • sample code (Java)
      // Customer ID
      final String customerKey = "Your customer ID";
      // Customer secret
      final String customerSecret = "Your customer secret";
      // Concatenate customer key and customer secret and use base64 to encode the concatenated string
      String plainCredentials = customerKey + ":" + customerSecret;
      String base64Credentials = new String(Base64.getEncoder().encode(plainCredentials.getBytes()));
      // Create authorization header
      String authorizationHeader = "Basic " + base64Credentials;
  2. Start recording
    start를 부를 시 individual recording mode로 하려면, mode를 individual로 설정해야 한다.
    individual recording을 configure 하기 위해서는 recordingConfig를 사용하고, third-party cloud storage를 configure 하기 위해서는 storageConfig를 사용하면 된다.

    • token (required)

    • appsCollection (required if you need to use non-real-time transcoding)

    • recordingConfig (required): 오디오 출력, 비디오의 스트림 구독, transcording, profile configuration

    • recordingFileConfig (optional): recorded file에 대한 configures

    • storageConfig (required): third-party storage에 대한 configures

    • http request 예시 (start)

      https://api.agora.io/v1/apps/<yourappid>/cloud_recording/resourceid/<resourceid>/mode/individual/start
    • real-time recording

    {
        "uid": "527841",
        "cname": "httpClient463224",
        "clientRequest": {
            "token": "<token if any>",
            "recordingConfig": {
                "maxIdleTime": 30,
                "streamTypes": 2,
                "channelType": 0,
                "videoStreamType": 1,
                "subscribeVideoUids": ["123","456"],
                "subscribeAudioUids": ["123","456"],
                "subscribeUidGroup": 0
            },
            "storageConfig": {
                "accessKey": "xxxxxxf",
                "region": 3,
                "bucket": "xxxxx",
                "secretKey": "xxxxx",
                "vendor": 2,
                "fileNamePrefix": ["directory1","directory2"]
           }
       }
    }

    recorded files

    • recorded content → audio and video → streamTypes as 2

    cloud recording merge files

    https://docs.agora.io/en/cloud-recording/cloud_recording_merge_files?platform=All Platforms

    lambda

    https://aws.amazon.com/ko/lambda/
    https://jeongchul.tistory.com/584

'TIL' 카테고리의 다른 글

20210617  (0) 2021.06.22
20210616  (0) 2021.06.22
20210614  (0) 2021.06.22
20210611  (0) 2021.06.22
20210609  (0) 2021.06.22

티스토리툴바