1

I am trying to set Video Language for the video upload using Google's Youtube API. Here is the upload interface look like. youtube video language upload youtube api

I try to set it up using defaultLanguage snippet, as shown below, but it did not do anything.

Is it possible to set the Video Language to something specific (say French)? Please help.

def initialize_upload(youtube, options):
  tags = None
  if options.keywords:
    tags = options.keywords.split(",")

  body=dict(
    snippet=dict(
      title=options.title,
      description=options.description,
      tags=tags,
      categoryId=options.category
    ),
    status=dict(
      privacyStatus=options.privacyStatus,
      defaultLanguage="en",     # <<<< ====== this did not work
      publishAt=options.publishAt
    )
  )

1 Answer 1

1
defaultLanguage="en"

should be inside the "snippet" and not the "status"

so correct snippet:

snippet=dict(
          title=options.title,
          description=options.description,
          tags=tags,
          defaultLanguage="en",
          categoryId=options.category
        )

but it appears it only sets the "title and description" language, and not the "video language", for the last one you need to add: defaultAudioLanguage="en"

Also all the properties are inside the documentation which is here: https://developers.google.com/youtube/v3/docs/videos?hl=fr#properties

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.