Google 转码器 HLS:内部服务器错误
Google transcoder HLS: Internal server error
我正在尝试将一个简单的 .mp4 文件转码为 HLS 格式,并在几分钟后不断收到来自 Google 的错误代码 13 'Internal server error'。我正在使用 Java SDK。谁能帮我找出我做错了什么?
VideoStream videoStream = VideoStream
.newBuilder()
.setH264(
VideoStream
.H264CodecSettings.newBuilder()
.setBitrateBps(6000000)
.setFrameRate(120) //Output framerate will always match the input framerate
.setWidthPixels(width)
.setHeightPixels(height)
)
.build();
JobConfig config = JobConfig
.newBuilder()
.addInputs(Input.newBuilder().setKey("input0").setUri("gs://putyoururlhere"))
.setOutput(Output.newBuilder().setUri(output))
.addElementaryStreams(ElementaryStream.newBuilder().setKey("video_stream0").setVideoStream(videoStream))
.addMuxStreams(
MuxStream
.newBuilder()
.setKey("stream")
.setContainer("ts")
.setFileName("stream")
.addElementaryStreams("video_stream0")
.build()
)
.addManifests(Manifest.newBuilder().addMuxStreams("stream").setFileName("stream").setType(Manifest.ManifestType.HLS).build())
.build();
好的,为以后 运行 任何人回答我自己的问题。
问题出在 IAM 部分。必须写入结果的存储桶在另一个项目中,并且为转码器创建的默认服务帐户(方便地隐藏在服务帐户页面中!)只能访问同一项目中的存储桶。所以我必须为此服务帐户添加权限才能写入存储桶。描述更详细的错误消息会很有帮助。
我正在尝试将一个简单的 .mp4 文件转码为 HLS 格式,并在几分钟后不断收到来自 Google 的错误代码 13 'Internal server error'。我正在使用 Java SDK。谁能帮我找出我做错了什么?
VideoStream videoStream = VideoStream
.newBuilder()
.setH264(
VideoStream
.H264CodecSettings.newBuilder()
.setBitrateBps(6000000)
.setFrameRate(120) //Output framerate will always match the input framerate
.setWidthPixels(width)
.setHeightPixels(height)
)
.build();
JobConfig config = JobConfig
.newBuilder()
.addInputs(Input.newBuilder().setKey("input0").setUri("gs://putyoururlhere"))
.setOutput(Output.newBuilder().setUri(output))
.addElementaryStreams(ElementaryStream.newBuilder().setKey("video_stream0").setVideoStream(videoStream))
.addMuxStreams(
MuxStream
.newBuilder()
.setKey("stream")
.setContainer("ts")
.setFileName("stream")
.addElementaryStreams("video_stream0")
.build()
)
.addManifests(Manifest.newBuilder().addMuxStreams("stream").setFileName("stream").setType(Manifest.ManifestType.HLS).build())
.build();
好的,为以后 运行 任何人回答我自己的问题。 问题出在 IAM 部分。必须写入结果的存储桶在另一个项目中,并且为转码器创建的默认服务帐户(方便地隐藏在服务帐户页面中!)只能访问同一项目中的存储桶。所以我必须为此服务帐户添加权限才能写入存储桶。描述更详细的错误消息会很有帮助。