이 페이지에서는 입력 동영상에서 원치 않는 외부 영역을 프로그래매틱 방식으로 삭제하는 방법을 설명합니다. 입력 동영상의 타임라인을 자르는 방법은 스트림 매핑을 참조하세요.
crop 구성 필드를 사용하여 입력 동영상의 각 면에서 삭제할 픽셀 수를 지정합니다. 이 구성을 작업 템플릿에 추가하거나 임시 작업 구성에 포함할 수 있습니다.
다음 REST/JSON 구성은 입력 동영상의 상단에서 10픽셀을 삭제합니다. 그러면 입력 동영상의 크기가 videoStream 객체에 지정된 코덱의 widthPixels 및 heightPixels 필드에서 지정된 크기에 맞게 조정됩니다. 그런 다음 이 확장된 중간 동영상에서 출력 동영상이 생성됩니다.
[[["이해하기 쉬움","easyToUnderstand","thumb-up"],["문제가 해결됨","solvedMyProblem","thumb-up"],["기타","otherUp","thumb-up"]],[["이해하기 어려움","hardToUnderstand","thumb-down"],["잘못된 정보 또는 샘플 코드","incorrectInformationOrSampleCode","thumb-down"],["필요한 정보/샘플이 없음","missingTheInformationSamplesINeed","thumb-down"],["번역 문제","translationIssue","thumb-down"],["기타","otherDown","thumb-down"]],["최종 업데이트: 2025-09-09(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 ],"]]