Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add transcoder #22

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/actions/build-downstream/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ runs:
else
export VERSION=beta
fi
clone_repo
make clean-provider
make provider
elif [ "$GH_REPO" == "terraform-google-conversion" ]; then
Expand Down
1,024 changes: 1,024 additions & 0 deletions mmv1/products/transcoder/Job.yaml

Large diffs are not rendered by default.

949 changes: 949 additions & 0 deletions mmv1/products/transcoder/JobTemplate.yaml

Large diffs are not rendered by default.

23 changes: 23 additions & 0 deletions mmv1/products/transcoder/product.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Copyright 2022 Google Inc.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

---
!ruby/object:Api::Product
name: Transcoder
display_name: Transcoder
versions:
- !ruby/object:Api::Product::Version
name: ga
base_url: https://transcoder.googleapis.com/v1/
scopes:
- https://www.googleapis.com/auth/cloud-platform
92 changes: 92 additions & 0 deletions mmv1/templates/terraform/examples/transcoder_job_basic.tf.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
resource "google_transcoder_job" "<%= ctx[:primary_resource_id] %>" {
name = "<%= ctx[:vars]['job_name'] %>"
template_id = google_transcoder_job_template.default.name
location = "us-central1"

labels = {
"label" = "key"
}
}

resource "google_transcoder_job_template" "default" {
name = "example"
location = "us-central1"

config {
inputs {
key = "input0"
}
edit_list {
key = "atom0"
inputs = ["input0"]
start_time_offset = "0s"
}
elementary_streams {
key = "video-stream0"
video_stream {
h264 {
width_pixels = 640
height_pixels = 360
bitrate_bps = 550000
frame_rate = 60
pixel_format = "yuv420p"
rate_control_mode = "vbr"
crf_level = 21
gop_duration = "3s"
vbv_size_bits = 550000
vbv_fullness_bits = 495000
entropy_coder = "cabac"
profile = "high"
preset = "veryfast"

}
}
}
elementary_streams {
key = "video-stream1"
video_stream {
h264 {
width_pixels = 1280
height_pixels = 720
bitrate_bps = 550000
frame_rate = 60
pixel_format = "yuv420p"
rate_control_mode = "vbr"
crf_level = 21
gop_duration = "3s"
vbv_size_bits = 2500000
vbv_fullness_bits = 2250000
entropy_coder = "cabac"
profile = "high"
preset = "veryfast"
}
}
}
elementary_streams {
key = "audio-stream0"
audio_stream {
codec = "aac"
bitrate_bps = 64000
channel_count = 2
channel_layout = ["fl", "fr"]
sample_rate_hertz = 48000
}
}
mux_streams {
key = "sd"
file_name = "sd.mp4"
container = "mp4"
elementary_streams = ["video-stream0", "audio-stream0"]
}
mux_streams {
key = "hd"
file_name = "hd.mp4"
container = "mp4"
elementary_streams = ["video-stream1", "audio-stream0"]
}
}

labels = {
"label" = "key"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
resource "google_transcoder_job_template" "<%= ctx[:primary_resource_id] %>" {
name = "<%= ctx[:vars]['job_template_name'] %>"
location = "us-central1"

config {
inputs {
key = "input0"
}
edit_list {
key = "atom0"
inputs = ["input0"]
start_time_offset = "0s"
}
elementary_streams {
key = "video-stream0"
video_stream {
h264 {
width_pixels = 640
height_pixels = 360
bitrate_bps = 550000
frame_rate = 60
pixel_format = "yuv420p"
rate_control_mode = "vbr"
crf_level = 21
gop_duration = "3s"
vbv_size_bits = 550000
vbv_fullness_bits = 495000
entropy_coder = "cabac"
profile = "high"
preset = "veryfast"
}
}
}
elementary_streams {
key = "video-stream1"
video_stream {
h264 {
width_pixels = 1280
height_pixels = 720
bitrate_bps = 550000
frame_rate = 60
pixel_format = "yuv420p"
rate_control_mode = "vbr"
crf_level = 21
gop_duration = "3s"
vbv_size_bits = 2500000
vbv_fullness_bits = 2250000
entropy_coder = "cabac"
profile = "high"
preset = "veryfast"

}
}
}
elementary_streams {
key = "audio-stream0"
audio_stream {
codec = "aac"
bitrate_bps = 64000
channel_count = 2
channel_layout = ["fl", "fr"]
sample_rate_hertz = 48000
}
}
mux_streams {
key = "sd"
file_name = "sd.mp4"
container = "mp4"
elementary_streams = ["video-stream0", "audio-stream0"]
}
mux_streams {
key = "hd"
file_name = "hd.mp4"
container = "mp4"
elementary_streams = ["video-stream1", "audio-stream0"]
}
}

labels = {
"label" = "key"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -626,6 +626,11 @@ var ServicesListBeta = mapOf(
"displayName" to "Securitycentermanagement",
"path" to "./google-beta/services/securitycentermanagement"
),
"securitycenterv2" to mapOf(
"name" to "securitycenterv2",
"displayName" to "securitycenterv2",
"path" to "./google-beta/services/securitycenterv2"
),
"securityposture" to mapOf(
"name" to "securityposture",
"displayName" to "Securityposture",
Expand Down Expand Up @@ -656,6 +661,11 @@ var ServicesListBeta = mapOf(
"displayName" to "Serviceusage",
"path" to "./google-beta/services/serviceusage"
),
"siteverification" to mapOf(
"name" to "siteverification",
"displayName" to "Siteverification",
"path" to "./google-beta/services/siteverification"
),
"sourcerepo" to mapOf(
"name" to "sourcerepo",
"displayName" to "Sourcerepo",
Expand Down Expand Up @@ -700,6 +710,11 @@ var ServicesListBeta = mapOf(
"name" to "tpuv2",
"displayName" to "Tpuv2",
"path" to "./google-beta/services/tpuv2"
),
"transcoder" to mapOf(
"name" to "transcoder",
"displayName" to "Transcoder",
"path" to "./google-beta/services/transcoder"
),
"vertexai" to mapOf(
"name" to "vertexai",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -621,6 +621,11 @@ var ServicesListGa = mapOf(
"displayName" to "Securitycentermanagement",
"path" to "./google/services/securitycentermanagement"
),
"securitycenterv2" to mapOf(
"name" to "securitycenterv2",
"displayName" to "securitycenterv2",
"path" to "./google/services/securitycenterv2"
),
"securityposture" to mapOf(
"name" to "securityposture",
"displayName" to "Securityposture",
Expand Down Expand Up @@ -651,6 +656,11 @@ var ServicesListGa = mapOf(
"displayName" to "Serviceusage",
"path" to "./google/services/serviceusage"
),
"siteverification" to mapOf(
"name" to "siteverification",
"displayName" to "Siteverification",
"path" to "./google/services/siteverification"
),
"sourcerepo" to mapOf(
"name" to "sourcerepo",
"displayName" to "Sourcerepo",
Expand Down Expand Up @@ -696,6 +706,11 @@ var ServicesListGa = mapOf(
"displayName" to "Tpuv2",
"path" to "./google/services/tpuv2"
),
"transcoder" to mapOf(
"name" to "transcoder",
"displayName" to "Transcoder",
"path" to "./google/services/transcoder"
),
"vertexai" to mapOf(
"name" to "vertexai",
"displayName" to "Vertexai",
Expand Down
Loading