【问题标题】:Google transcoder HLS: Internal server errorGoogle 转码器 HLS:内部服务器错误
【发布时间】:2022-01-28 21:09:02
【问题描述】:

我正在尝试将一个简单的 .mp4 文件转码为 HLS 格式,并在几分钟后不断收到来自 Google 的错误代码 13“内部服务器错误”。我正在使用 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();

【问题讨论】:

    标签: google-cloud-transcoder


    【解决方案1】:

    好的,为以后遇到此问题的任何人回答我自己的问题。 问题出在 IAM 部分。必须写入结果的存储桶位于另一个项目中,并且为转码器创建的默认服务帐户(方便地从服务帐户页面隐藏!)只能访问同一项目中的存储桶。所以我必须为此服务帐户添加权限才能写入存储桶。更多描述性的错误消息会非常有帮助。

    【讨论】:

    • 感谢您回答自己的问题。它确实有帮助。但是,如果您接受您的回答,它将更有助于此解决方案的可追溯性。
    猜你喜欢
    • 1970-01-01
    • 2021-04-05
    • 1970-01-01
    • 1970-01-01
    • 2022-08-03
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2017-04-12
    相关资源
    最近更新 更多