프레임이 컬렉션의 이미지로 정의된 순서가 지정된 이미지 컬렉션을 동영상으로 내보내려면 Export.video()
를 사용하세요. 프레임 속도, 크기, 크기를 설정하여 ImageCollection
가 동영상으로 변환되는 방식을 구성할 수 있습니다. 동영상이 MP4로 인코딩됩니다.
Drive로
Export.video.toDrive()
를 사용하여 Drive 계정으로 동영상을 내보냅니다. 예를 들어 다음 내보내기는 20년간의 Landsat 이미지로 동영상을 만듭니다.
코드 편집기 (JavaScript)
// Load a Landsat 5 image collection. var collection = ee.ImageCollection('LANDSAT/LT05/C02/T1_TOA') // San Francisco Bay. .filter(ee.Filter.eq('WRS_PATH', 44)) .filter(ee.Filter.eq('WRS_ROW', 34)) // Filter cloudy scenes. .filter(ee.Filter.lt('CLOUD_COVER', 30)) // Get 20 years of imagery. .filterDate('1991-01-01','2011-12-30') // Make each image an 8-bit RGB image. .map(function(image) { return image.visualize({bands: ['B4', 'B3', 'B2'], min: 0.02, max: 0.35}); }); // Define an area to export. var polygon = ee.Geometry.Rectangle([-122.7286, 37.6325, -122.0241, 37.9592]); // Export (change dimensions or scale for higher quality). Export.video.toDrive({ collection: collection, description: 'sfVideoExample', dimensions: 720, framesPerSecond: 12, region: polygon });
프레임 속도와 크기는 내보내기에 전달된 매개변수 사전에서 설정할 수 있습니다. 이 매개변수를 조정하여 동영상을 맞춤설정합니다.
또한 입력 ImageCollection에는 3밴드 (RGB), 8비트 이미지가 있어야 합니다. 이 예에서는 8비트 3밴드 형식이 명시적으로 설정됩니다.
또는 컬렉션에 대해 image.visualize()
를 호출하는 함수를 매핑합니다. 자세한 내용은 시각화 이미지 섹션을 참고하세요. 동영상 내보내기는 완료하는 데 시간이 오래 걸릴 수 있으므로 내보내기 작업이 장시간 실행되는 것은 흔한 일입니다.
Cloud Storage로
동영상을 Cloud Storage로 내보내려면 Export.video.toCloudStorage()
를 사용합니다. 예를 들어 이전 예시의 ImageCollection
를 사용합니다.
코드 편집기 (JavaScript)
// Export video to cloud storage. Export.video.toCloudStorage({ collection: collection, description: 'sfVideoExampleToCloud', bucket: 'your-bucket-name', dimensions: 720, framesPerSecond: 12, region: polygon });