# Optimize video transmission (/en/realtime-media/broadcast-streaming/build/optimize-quality-and-connection/video-transmission-optimization)

> For AI agents: see the complete documentation index at [llms.txt](/llms.txt).

**Supported platform:** Web.

<_PlatformTabsGroup groupMode="structured" canonicalPlatform="web" platforms="[&#x22;web&#x22;]" showTabs="false">
  <_PlatformPanel platform="web">
    <_PlatformProcessedMarker groupMode="structured" canonicalPlatform="web" platform="web" />

    Agora prioritizes both clarity and smoothness in video experience. However, this can be challenging in weak network conditions, often requiring a trade-off. Use-cases and products have unique requirements; for instance, screen sharing prioritizes clarity, while casual video calls prioritize smoothness. The Video SDK offers a transmission optimization feature to address these needs.

    ## Understand the tech [#understand-the-tech]

    To optimize the video transmission, the Agora Video SDK offers two transmission optimization strategies for local video tracks:

    **Clear Priority**:

    This strategy prioritizes clarity by automatically setting a minimum bit rate based on the capture resolution and frame rate. Even during network fluctuations, the sending bit rate will not drop below this threshold, ensuring a clear video picture. In most cases, the SDK will maintain the send resolution, although it may reduce the frame rate if necessary.

    **Smoothness First**:

    In this approach, smoothness takes precedence over clarity. The SDK does not enforce a minimum bit rate policy, allowing the sending end to dynamically adjust the bit rate in response to network fluctuations. This ensures that the receiving end's video picture remains uninterrupted or free from freezing. Typically, the SDK will maintain the frame rate, but it may reduce the send resolution if needed.
    These strategies provide users with flexibility to prioritize either clarity or smoothness based on their specific use cases and network conditions

    ## Prerequisites [#prerequisites]

    Ensure that you have implemented the [SDK quickstart](../../index) in your project.

    ## Implementation [#implementation]

    When creating a local video track using the `createCameraVideoTrack`, `createScreenVideoTrack`, or `createCustomVideoTrack` methods, you have the option to specify the transmission optimization mode through the `optimizationMode` parameter:

    * `"motion"`: Prioritizes smoothness, ensuring a stable video stream even in challenging network conditions.
    * `"detail"`: Prioritizes clarity, maintaining a clear video image even if network conditions degrade.

    If the `optimizationMode` parameter is not specified, the SDK will apply default optimization modes based on the type of video track:

    * For screen sharing video tracks, the default optimization strategy is clarity first, prioritizing a clear image over smoothness.
    * For other types of local video tracks, such as camera or custom tracks, the default optimization strategy aims to balance clarity and smoothness. This means that the SDK will adjust the frame rate and resolution under weak network conditions to maintain a satisfactory viewing experience.

    During a video call, live broadcast, or screen sharing session, you can dynamically adjust the video transmission mode using the `setOptimizationMode` method. For example, if you switch from presenting slides (requiring clarity) to showing a video (requiring smoothness), you can switch the transmission optimization mode from `detail` to `motion` to ensure that the video remains fluid even in fluctuating network conditions.

    ```javascript
    // Use default strategy
    const videoTrack2 = await AgoraRTC.createScreenVideoTrack();
    ```

    ```javascript
    const videoTrack = await AgoraRTC.createCameraVideoTrack({
     // Use clear priority
     optimizationMode: "detail",
    });
    ```

    ```javascript
    const videoTrack2 = await AgoraRTC.createCameraVideoTrack({
     // Use smoothness priority
     optimizationMode: "motion",
    });
    ```

    ## Reference [#reference]

    This section contains content that completes the information on this page, or points you to documentation that explains other aspects to this product.

    For more audio settings, see [Achieve high audio quality](/en/realtime-media/video/build/enhance-the-audio-experience/best-practices-sound-quality).

    ### Frequently asked questions [#frequently-asked-questions]

    * [What is the difference between the in-call volume and the media volume?](/en/api-reference/faq/integration/system_volume)

    ### API reference [#api-reference]

    * [`optimizationMode`](https://api-ref.agora.io/en/video-sdk/web/4.x/interfaces/cameravideotrackinitconfig.html#optimizationmode)
    * [`setOptimizationMode`](https://api-ref.agora.io/en/video-sdk/web/4.x/interfaces/ilocalvideotrack.html#setoptimizationmode)

    <_PlatformProcessedMarker close="true" />
  </_PlatformPanel>
</_PlatformTabsGroup>
