2

I am uploading videos to YouTube programmatically following the official guide:

  body=dict(
    snippet=dict(
      title=title,
      description=description,
      tags=tags,
    ),
    status=dict(
      privacyStatus="public"
    )
  )

I can upload the video, set the title, the description, and upload a thumbnail. The setting "Made for kids" comes from the channel's default.

But the video's language does not come from the channel's default, so I want to set it programmatically. On the web interface, it looks like this:

upload language settings

I would also like to set programmatically other options in the web interface, such as:

  • altered content
  • Allow automatic chapters and key moments
  • Allow automatic concepts
  • Don't allow remixing

How can I set these additional options during or after the upload with the Python API client?

Update

I tried defaultLanguage="fr-FR" in snippet and it sets the title and description language, not the video language:

language setting from the API

I also tried defaultLanguage="fr" in snippet and I get the same result.

6
  • 2
    You can check this part of the doc. These are the values you can set. Commented Apr 3, 2024 at 12:07
  • 2
    Based on the docs, for language you can use defaultLanguage. Commented Apr 3, 2024 at 12:10
  • 1
    Thank you @user459872. I tried that, it doesn't set the video's language, and I updated the question. Commented Apr 3, 2024 at 13:15
  • 1
    This is great. I was able to get the Video Language using defaultAudioLangauage? Were you able to get other settings like altered content? Do you have any luck with scheduling the video? I tried publishAt snippet, but it never works for me. Thanks. Commented Apr 8, 2024 at 13:43
  • @DigitalNomad Yes, I could set video language with defaultAudioLanguage (as in the answer) and the title and description language with defaultLanguage (as in the comment). I could not yet set "altered content" nor the rest and I asked the person who provided the accepted answer; we'll probably have more luck posting another question. Yes, I could schedule the video with, for example publishAt="2024-04-04T18:00:00+00:00" (see stackoverflow.com/questions/40148118/… ). Commented Apr 8, 2024 at 16:10

1 Answer 1

2
+50

For me it worked when adding "defaultAudioLanguage" to the correct language.

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

1 Comment

Yes, that works indeed, thanks! I asked about the rest of the settings, such as altered content, automatic chapters, automatic concepts and remixing, in a separate thread: stackoverflow.com/questions/78300839/…

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.