> ## Documentation Index
> Fetch the complete documentation index at: https://docs.youka.io/llms.txt
> Use this file to discover all available pages before exploring further.

# एक्सपोर्ट

> क्लाउड में या लोकली कराओके वीडियो रेंडर करें

एक्सपोर्ट एक तैयार कराओके को वीडियो फ़ाइल के रूप में रेंडर करता है। मुख्य एंट्रीपॉइंट के रूप में `client.exports.create(...)` का उपयोग करें। जब आप चाहते हैं कि SDK सीधे मौजूदा मशीन पर रेंडर करे, तब `target: "local"` चुनें; अन्यथा डिफ़ॉल्ट रूप से क्लाउड एक्सपोर्ट होता है।

## `client.exports.create(projectId, input, options?)`

`target: "cloud" | "local"` के साथ एक्सपोर्ट टारगेट चुनें।

```ts theme={null}
const cloud = await client.exports.create("prj_abc123", {
  resolution: "1080p",
  quality: "high",
});
// => ExportOperation

const local = await client.exports.create("prj_abc123", {
  target: "local",
  resolution: "1080p",
  quality: "high",
  outputPath: "./karaoke.mp4",
});
// => { outputPath, fileSize, duration, ... }
```

जब आप मैनेज्ड async एक्सपोर्ट चाहते हैं, तब क्लाउड का उपयोग करें। जब आप कॉलर की मशीन पर सीधे रेंडर करना चाहते हैं, तब लोकल का उपयोग करें।

### Common fields

| Field              | Type                                  | Description                                                                         |
| ------------------ | ------------------------------------- | ----------------------------------------------------------------------------------- |
| `resolution`       | `"540p" \| "720p" \| "1080p" \| "4k"` | आउटपुट रेज़ोल्यूशन।                                                                 |
| `quality`          | `"low" \| "average" \| "high"`        | एन्कोडिंग क्वालिटी।                                                                 |
| `fps`              | `30 \| 60`                            | प्रति सेकंड फ़्रेम। डिफ़ॉल्ट `30` है। ज़्यादा स्मूद मोशन के लिए `60` इस्तेमाल करें। |
| `playbackRate`     | `number`                              | स्पीड मल्टिप्लायर (उदा. `0.9`)।                                                     |
| `toneFrequency`    | `number`                              | सेमीटोन में पिच शिफ्ट।                                                              |
| `transparent`      | `boolean`                             | ट्रांसपेरेंट बैकग्राउंड के साथ रेंडर करें।                                          |
| `presetId`         | `string`                              | रेंडर करने से पहले एक प्रीसेट लागू करें।                                            |
| `stemVolumes`      | `Record<string, number>`              | स्टेम id के आधार पर per-stem वॉल्यूम ओवरराइड्स।                                     |
| `settingsOverride` | `object`                              | केवल इसी एक्सपोर्ट के लिए प्रोजेक्ट सेटिंग्स को पैच करें।                           |

ज़्यादा स्मूद मोशन के लिए `fps: 60` इस्तेमाल करें। `60 fps` पर cloud quotes `1.5x` credits multiplier लागू करते हैं। Transparent 60 fps cloud exports तब उपलब्ध होते हैं जब चुनी गई duration और resolution cloud limits में फिट हों।

### Example with stem volumes

```ts theme={null}
const result = await client.exports.create("prj_abc123", {
  resolution: "1080p",
  quality: "high",
  stemVolumes: {
    vocals: 0,
    instrumental: 1,
    backing: 0.5,
  },
});
```

### Example with settings override

```ts theme={null}
const result = await client.exports.create("prj_abc123", {
  resolution: "1080p",
  settingsOverride: {
    trim: { startSeconds: 5, endSeconds: 180 },
    style: {
      background: { type: "color", color: "#101010" },
    },
  },
});
```

`settingsOverride` के पूर्ण shape के लिए [Render settings reference](/en/render-settings-reference) देखें।

## `client.exports.quote(projectId, input, options?)`

एक्सपोर्ट शुरू किए बिना क्लाउड एक्सपोर्ट के लिए आवश्यक क्रेडिट्स का कोट प्राप्त करें।

```ts theme={null}
const quote = await client.exports.quote("prj_abc123", {
  resolution: "1080p",
  quality: "high",
  transparent: false,
});

console.log(quote.creditsRequired, quote.sufficientBalance);
```

लोकल एक्सपोर्ट कॉलर की मशीन पर चलते हैं और क्लाउड एक्सपोर्ट क्रेडिट्स का उपयोग नहीं करते, इसलिए `quote(...)` केवल क्लाउड एक्सपोर्ट के लिए है।

## `client.exports.list(projectId, input?, options?)`

पेजिनेशन के साथ, किसी प्रोजेक्ट के एक्सपोर्ट्स की सूची दें।

```ts theme={null}
const exports = await client.exports.list("prj_abc123", {
  page: 1,
  pageSize: 50,
});
```

<ParamField path="page" type="number">
  पेज नंबर। सर्वर पर डिफ़ॉल्ट `1` होता है।
</ParamField>

<ParamField path="pageSize" type="number">
  पेज साइज। डिफ़ॉल्ट `100`। अधिकतम `100`।
</ParamField>

## `client.exports.get(exportId, options?)`

पैरेंट प्रोजेक्ट जाने बिना, केवल ID के आधार पर एक्सपोर्ट प्राप्त करें।

```ts theme={null}
const exported = await client.exports.get("exp_xyz");
```

## Local export

```ts theme={null}
const result = await client.exports.create("prj_abc123", {
  target: "local",
  resolution: "1080p",
  quality: "high",
  outputPath: "./karaoke.mp4",
  onProgress(progress) {
    console.log(progress.stage, progress.percent);
  },
});

console.log(result.outputPath);
```

यदि आप चाहते हैं कि लोकल रेंडर टूलचेन के इंस्टॉल या वेरिफ़ाई होने के दौरान अपडेट्स मिलें, तो `onDependencyProgress` का उपयोग करें।

## `client.exports.prepareLocal(projectId, body, options?)`

लोकली एक्सपोर्ट रेंडर करने के लिए तैयार किया गया payload लौटाता है। `@youka/remotion` या किसी अन्य लोकल renderer के साथ इंटीग्रेट करते समय इसका उपयोग करें। सर्वर क्लाउड रेंडर को क्यू किए बिना composition inputs, asset URLs, और render parameters लौटाता है।

```ts theme={null}
const payload = await client.exports.prepareLocal("prj_abc123", {
  resolution: "1080p",
  quality: "high",
});

// Hand payload off to your local renderer
await renderLocally(payload);
```

<Note>
  `client.exports.prepareLocal(...)` क्लाउड रेंडर शुरू नहीं करता। Youka की तरफ़ कोई billable
  compute consume नहीं होता।
</Note>

## Waiting for an export

क्लाउड एक्सपोर्ट async होते हैं। `client.exports.wait(...)` का उपयोग करें:

```ts theme={null}
const operation = await client.exports.create("prj_abc123", {
  resolution: "1080p",
});

const finalized = await client.exports.wait(operation, {
  pollIntervalMs: 3_000,
});
console.log("Download from", finalized.url);
```

## Downloading the result

क्लाउड एक्सपोर्ट एक signed `url` के साथ पूरा होता है। फ़ाइल को डिस्क पर स्ट्रीम करने के लिए बिल्ट-इन helper का उपयोग करें। `output` या तो एक डायरेक्टरी हो सकता है या पूरा फ़ाइल पाथ, और `filename` वैकल्पिक है:

```ts theme={null}
await client.exports.download(finalized, {
  output: "./exports",
});
```

## What's next

* [Tasks](/hi/sdk/tasks) — ऑपरेशन हैंडल्स और एडवांस्ड टास्क पोलिंग
* [Presets](/hi/sdk/presets) — पुन: उपयोग योग्य रेंडर कॉन्फ़िगरेशन
* [Project settings](/hi/sdk/project-settings) — प्रोजेक्ट की active सेटिंग्स को पैच करें
