Skip to content

Instantly share code, notes, and snippets.

@srea
Created July 30, 2019 15:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save srea/eeebc2d6448a014d17080fff579126ae to your computer and use it in GitHub Desktop.
Save srea/eeebc2d6448a014d17080fff579126ae to your computer and use it in GitHub Desktop.
zencoder m3u8 parameter
return {
input: bucketPath + "/original_movie", // TODO:定数化
credentials: config.transcoder.zencoder.credentials,
region: config.transcoder.zencoder.region,
outputs: [
{
base_url: bucketPath,
filename: "output.mp4",
size: "1280x720",
h264_profile: "high",
ma_frame_rate: 30,
// video_codec_level: 3,
// max_video_bitrate: 1500,
video_bitrate:1500,
max_audio_sample_rate: 44100,
audio_channels: 2,
headers: {
"x-goog-acl": "public-read"
},
credentials: config.transcoder.zencoder.credentials,
},
{
base_url: bucketPath,
filename: "output.m3u8",
size: "1280x720",
h264_profile: "high",
segment_seconds: 10,
ma_frame_rate: 30,
// video_codec_level: 3,
// max_video_bitrate: 1500,
video_bitrate:1500,
max_audio_sample_rate: 44100,
hls_optimized_ts: true, // for iOS
max_hls_protocol_version: 3, // Android 4.4以降
format: "ts",
audio_channels: 2,
headers: {
"x-goog-acl": "public-read"
},
type: "segmented",
public: true,
credentials: config.transcoder.zencoder.credentials,
"thumbnails": [
{
label: "thumbnail",
filename: "thumbnail_large",
number: 1, // 動画の中央
format: "jpg",
credentials: config.transcoder.zencoder.credentials,
base_url: bucketPath,
headers: {
"x-goog-acl": "public-read"
},
}
],
"notifications": [
{
url: sprintf(config.transcoder.notification.endpoint_format, rootKey, movieKey),
format: "json",
headers: {
Accept: "application/json",
}
}
]
}
]
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment