AgoraLiveTranscoding Class Reference
| Inherits from | NSObject |
|---|---|
| Declared in | AgoraObjects.h |
size
The size of the video (width and height in pixels).
@property (assign, nonatomic) CGSize sizeDiscussion
When pushing video streams to the CDN, note the following:
- The value range of the width is [64,1920]. If the value is less than 64, Agora server automatically adjusts it to 64; if the value is greater than 1920, Agora server automatically adjusts it to 1920.
- The value range of the height is [64,1080]. If the value is less than 64, Agora server automatically adjusts it to 64; if the value is greater than 1080, Agora server automatically adjusts it to 1080.
When pushing audio streams to the CDN, set the width and height as 0.
Declared In
AgoraObjects.h
videoBitrate
Bitrate of the CDN live output video stream.
@property (assign, nonatomic) NSInteger videoBitrateDiscussion
The default value is 400 Kbps.
Set this parameter according to the Video Bitrate Table. If you set a bitrate beyond the proper range, the SDK automatically adapts it to a value within the range.
Declared In
AgoraObjects.h
videoFramerate
Frame rate of the CDN live output video stream.
@property (assign, nonatomic) NSInteger videoFramerateDiscussion
The default value is 15 fps, and the value range is (0,30].
Note: The Agora server adjusts any value over 30 to 30.
Declared In
AgoraObjects.h
lowLatency
Latency mode. DEPRECATED from v2.8.0
@property (assign, nonatomic) BOOL lowLatencyDiscussion
- YES: Low latency with unassured quality.
- NO:(Default)High latency with assured quality.
Declared In
AgoraObjects.h
videoGop
Video GOP in frames. The default value is 30 fps.
@property (assign, nonatomic) NSInteger videoGopDeclared In
AgoraObjects.h
videoCodecProfile
Video codec profile type
@property (assign, nonatomic) AgoraVideoCodecProfileType videoCodecProfileDiscussion
Set it as 66, 77, or 100 (default), see AgoraVideoCodecProfileType.
If you set this parameter to other values, Agora adjusts it to the default value of 100.
Declared In
AgoraObjects.h
videoCodecType
The video codec type of the output video stream. See AgoraVideoCodecTypeForStream.
@property (assign, nonatomic) AgoraVideoCodecTypeForStream videoCodecTypeAvailability
v3.2.0
Declared In
AgoraObjects.h
transcodingUsers
An AgoraLiveTranscodingUser object managing the user layout configuration in the CDN live stream. Agora supports a maximum of 17 transcoding users in a CDN live stream channel. See AgoraLiveTranscodingUser.
@property (copy, nonatomic) NSArray<AgoraLiveTranscodingUser*> *transcodingUsersDeclared In
AgoraObjects.h
transcodingExtraInfo
Reserved property. Extra user-defined information to send SEI for the H.264/H.265 video stream to the CDN live client. Maximum length: 4096 bytes. For more information on SEI, see SEI-related questions.
@property (copy, nonatomic) NSString *transcodingExtraInfoDeclared In
AgoraObjects.h
watermark
Deprecated from v3.6.0. Use watermarkArray instead.
@property (strong, nonatomic) AgoraImage *watermarkDiscussion
The watermark on the live video. The image format must be PNG. See AgoraImage.
Declared In
AgoraObjects.h
watermarkArray
The array of watermarks on the live video. You can use watermarkArray to add one or more watermarks. The image format must be PNG. The total number of watermarks and background images on the live video must be greater than or equal to 0 and less than or equal to 10.
@property (copy, nonatomic) NSArray<AgoraImage*> *watermarkArrayAvailability
v3.6.0
Declared In
AgoraObjects.h
backgroundImage
Deprecated from v3.6.0. Use backgroundImageArray instead.
@property (strong, nonatomic) AgoraImage *backgroundImageDiscussion
The background image on the live video. The image format must be PNG. See AgoraImage.
Declared In
AgoraObjects.h
backgroundImageArray
The array of background images on the live video. You can use backgroundImageArray to add one or more background images. The image format must be PNG. The total number of watermarks and background images on the live video must be greater than or equal to 0 and less than or equal to 10.
@property (copy, nonatomic) NSArray<AgoraImage*> *backgroundImageArrayAvailability
v3.6.0
Declared In
AgoraObjects.h
backgroundColor
The background color in RGB hex.
@property (strong, nonatomic) COLOR_CLASS *backgroundColorDiscussion
Value only. Do not include a preceding #. For example, 0xFFB6C1 (light pink). The default value is 0x000000 (black).
COLOR_CLASS is a general name for the type:
- iOS: UIColor
- macOS: NSColor
Declared In
AgoraObjects.h
audioSampleRate
Self-defined audio sample rate: AgoraAudioSampleRateType.
@property (assign, nonatomic) AgoraAudioSampleRateType audioSampleRateDeclared In
AgoraObjects.h
audioBitrate
Bitrate (Kbps) of the CDN live audio output stream. The default value is 48, and the highest value is 128.
@property (assign, nonatomic) NSInteger audioBitrateDeclared In
AgoraObjects.h
audioChannels
The number of audio channels for the CDN live stream.
@property (assign, nonatomic) NSInteger audioChannelsDiscussion
Agora recommends choosing 1 (mono), or 2 (stereo) audio channels. Special players are required if you choose 3, 4, or 5.
- 1: (Default) Mono
- 2: Stereo
- 3: Three audio channels
- 4: Four audio channels
- 5: Five audio channels
Declared In
AgoraObjects.h
audioCodecProfile
Audio codec profile. See AgoraAudioCodecProfileType.
@property (assign, nonatomic) AgoraAudioCodecProfileType audioCodecProfileDiscussion
The default value is AgoraAudioCodecProfileLCAAC(0).
Declared In
AgoraObjects.h
+ defaultTranscoding
Creates a default transcoding object.
+ (AgoraLiveTranscoding *_Nonnull)defaultTranscodingReturn Value
Default AgoraLiveTranscoding object.
Declared In
AgoraObjects.h
– addUser:
Adds a user displaying the video in CDN live.
- (int)addUser:(AgoraLiveTranscodingUser *_Nonnull)userParameters
user |
The transcoding user. See AgoraLiveTranscodingUser. |
|---|
Return Value
- 0: Success.
- < 0: Failure.
Declared In
AgoraObjects.h
– removeUser:
Removes a user from CDN live.
- (int)removeUser:(NSUInteger)uidParameters
uid |
The user ID of the user to remove from CDN live. |
|---|
Return Value
- 0: Success.
- < 0: Failure.
Declared In
AgoraObjects.h
– setAdvancedFeatures:opened:
Enables/Disables the advanced feature of the RTMP or RTMPS streaming with transcoding.
- (void)setAdvancedFeatures:(NSString *_Nonnull)featureName opened:(BOOL)openedParameters
featureName |
The name of the advanced feature to enable. You can set the name as LBHQ, which means the advanced feature for high-quality video with a lower bitrate. |
|---|---|
opened |
Whether to enable the advanced feature: |
Declared In
AgoraObjects.h
– getAdvancedFeatures
Checks whether the advanced feature of the RTMP or RTMPS streaming with transcoding is enabled.
- (NSArray<AgoraLiveStreamAdvancedFeature*> *_Nullable)getAdvancedFeaturesReturn Value
The name of the advanced feature and whether the advanced feature is enabled. See AgoraLiveStreamAdvancedFeature for details.
Declared In
AgoraObjects.h