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

Generated subtitles error #67

Closed
matthewlein opened this issue Oct 6, 2023 · 4 comments
Closed

Generated subtitles error #67

matthewlein opened this issue Oct 6, 2023 · 4 comments
Assignees

Comments

@matthewlein
Copy link

matthewlein commented Oct 6, 2023

After updating from 1.9.0 to 3.9.0 I'm getting an error on get_asset with a generated subtitles track

Relevant code:

create_asset_request = MuxRuby::CreateAssetRequest.new
create_asset_request.input = [
  {
    url: [the_source],
    generated_subtitles: [
      {
        language_code: 'en',
        name: 'English CC',
      }
    ]
  },
]
create_response = assets_api.create_asset(create_asset_request)
asset_id = create_response.data.id
...
asset = assets_api.get_asset(asset_id)
ArgumentError (invalid value for "text_source", must be one of ["uploaded", "embedded", "generated_live", "generated_live_final"].):

In the mux web admin I can see the asset was created and has a subtitles track with "text_source": "generated_vod"

{
  "type": "text",
  "text_type": "subtitles",
  "text_source": "generated_vod",
  "status": "ready",
  "name": "English CC",
  "language_code": "en",
  "id": [track_id]
}

Downgrading to 1.9.0 makes everything work perfectly.

@matthewlein matthewlein changed the title generated Generated subtitles error Oct 6, 2023
@philcluff
Copy link
Contributor

Hi @matthewlein, thanks for letting us know.

We're working on a release for the Ruby SDK which will address this issue and add support for Generated VOD captions. It's likely that this API field was not present (or not an emum) in 1.9.0, so wasn't being validated.

Thanks.

@philcluff philcluff self-assigned this Oct 9, 2023
@philcluff
Copy link
Contributor

Hey @matthewlein, this is now available in 3.11.0.

Thanks!

@holman
Copy link

holman commented Nov 16, 2023

Going to add this little bit here since it wasn't immediately apparent in the .md docs as to how to use the new API (it's easy to quickly get lost in the nested land of "what needs to be a Hash and what needs to be an Array", hah). Basically gets added as an option to a Hash on Array input to input rather than being directly added to input:

    create_asset_request.input = [{
      generated_subtitles: [
        MuxRuby::AssetGeneratedSubtitleSettings.new(
          name: "English CC",
          language_code: "en"
        )
      ]
    }]

(Yes, I'm primarily making this note here because inevitably the poor schmuck who runs into this next time will be... me.)

@philcluff
Copy link
Contributor

Thanks for the feedback @holman, I really appreciate it. We're working on an improved SDK which will include better documentation, I'll make sure that this includes generated captions.

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants