Mit Sammlungen den Überblick behalten
Sie können Inhalte basierend auf Ihren Einstellungen speichern und kategorisieren.
Auf dieser Seite wird erläutert, wie Sie unerwünschte äußere Bereiche aus einem Eingabevideo programmatisch entfernen. Informationen zum Zuschneiden der Zeitachse von Eingabevideos finden Sie unter Streamzuordnungen.
Geben Sie im Konfigurationsfeld crop die Anzahl der Pixel an, die an jeder Seite des Eingabevideos entfernt werden sollen. Sie können diese Konfiguration einer Jobvorlage hinzufügen oder sie in eine Ad-hoc-Jobkonfiguration einbinden.
Bei der folgenden REST/JSON-Konfiguration werden 10 Pixel aus einem Eingabevideo entfernt. Das Eingabevideo wird dann so skaliert, dass es die Abmessungen erfüllt, die in den Feldern widthPixels und heightPixels des angegebenen Codecs für das videoStream-Objekt angegeben sind. Das Ausgabevideo wird dann aus diesem skalierten Zwischenvideo generiert.
[[["Leicht verständlich","easyToUnderstand","thumb-up"],["Mein Problem wurde gelöst","solvedMyProblem","thumb-up"],["Sonstiges","otherUp","thumb-up"]],[["Schwer verständlich","hardToUnderstand","thumb-down"],["Informationen oder Beispielcode falsch","incorrectInformationOrSampleCode","thumb-down"],["Benötigte Informationen/Beispiele nicht gefunden","missingTheInformationSamplesINeed","thumb-down"],["Problem mit der Übersetzung","translationIssue","thumb-down"],["Sonstiges","otherDown","thumb-down"]],["Zuletzt aktualisiert: 2025-09-04 (UTC)."],[],[],null,["# Cropping a video\n\nThis page explains how to programmatically remove unwanted outer areas from an\ninput video. For information on how to trim the timeline of input videos, see\n[Stream mappings](/transcoder/docs/concepts/stream-mappings).\n\nUse the\n[`crop`](/transcoder/docs/reference/rest/v1/JobConfig#preprocessingconfig)\nconfiguration field to specify the number of pixels to remove from each side of\nthe input video. You can add this configuration to a\n[job template](/transcoder/docs/how-to/job-templates) or include it in an\n[ad-hoc job configuration](/transcoder/docs/how-to/jobs#create_jobs_ad_hoc).\n\nThe following REST/JSON configuration removes 10 pixels from the top of an input\nvideo. The input video is then scaled to meet the dimensions specified by the\n`widthPixels` and `heightPixels` fields in the specified codec for the\n[`videoStream`](/transcoder/docs/reference/rest/v1/JobConfig#videostream)\nobject. The output video is then generated from this scaled intermediate video. \n\n \"inputs\": [\n {\n \"key\": \"input0\",\n \"uri\": \"gs://\u003cvar translate=\"no\"\u003eSTORAGE_BUCKET_NAME\u003c/var\u003e/\u003cvar translate=\"no\"\u003eSTORAGE_INPUT_VIDEO\u003c/var\u003e\",\n \"preprocessingConfig\": {\n \"crop\": {\n \"topPixels\": 10\n }\n }\n }\n ],"]]