{"id":21831344,"url":"https://github.com/nodef/extra-youtubeuploader","last_synced_at":"2025-04-14T07:06:47.826Z","repository":{"id":90491477,"uuid":"156671203","full_name":"nodef/extra-youtubeuploader","owner":"nodef","description":"Upload YouTube videos with caption through machines (via \"youtubeuploader\").","archived":false,"fork":false,"pushed_at":"2018-12-20T14:47:09.000Z","size":33,"stargazers_count":6,"open_issues_count":0,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-11-20T10:53:02.431Z","etag":null,"topics":["api","caption","data","extra","machine","oauth","upload","video","youtube","youtubeuploader"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/extra-youtubeuploader","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nodef.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-11-08T08:02:18.000Z","updated_at":"2023-08-16T05:54:15.000Z","dependencies_parsed_at":null,"dependency_job_id":"ee5d7336-2282-4beb-9ac6-ff86c57bea94","html_url":"https://github.com/nodef/extra-youtubeuploader","commit_stats":{"total_commits":31,"total_committers":1,"mean_commits":31.0,"dds":0.0,"last_synced_commit":"c3e3967b99844e472ba850d785b3f572d15b6230"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nodef%2Fextra-youtubeuploader","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nodef%2Fextra-youtubeuploader/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nodef%2Fextra-youtubeuploader/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nodef%2Fextra-youtubeuploader/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nodef","download_url":"https://codeload.github.com/nodef/extra-youtubeuploader/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":226806641,"owners_count":17685040,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api","caption","data","extra","machine","oauth","upload","video","youtube","youtubeuploader"],"created_at":"2024-11-27T19:09:46.730Z","updated_at":"2025-04-14T07:06:47.811Z","avatar_url":"https://github.com/nodef.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"Upload YouTube videos with caption through machines (via [\"youtubeuploader\"]).\n\u003e Do you want to:\n\u003e - Upload your AI generated video to YouTube?\n\u003e - Or, [Upload Wikipedia TTS videos on YouTube]?\n\nSample: [\"Pixelsphere OST (2017)\"]. \n\u003cbr\u003e\n\n\n## setup\n\n### install\n\n1. Download for your OS from [releases].\n2. Extract it to a directory and add the directory to `PATH`.\n\n\n### get client id\n\n1. Create an [account] on [Google Cloud Platform].\n2. Create a [new project], and select it.\n3. Enable [YouTube Data API] for the project.\n4. Add [credentials] to your project.\n5. Which API are you using? `YouTube Data API v3`.\n6. Where will you be calling the API from? `Web server`.\n7. What data will you be accessing? `User data`.\n8. Select `What credentials do I need?`.\n9. Create an OAuth 2.0 client ID.\n10. Name: `youtubeuploader` (your choice).\n11. Authorized JavaScript origins: `http://localhost:8080`.\n12. Authorized redirect URIs: `http://localhost:8080/oauth2callback`.\n13. Select `Create OAuth client ID`.\n14. Set up the OAuth 2.0 consent screen.\n15. Email address: (it should be correct).\n16. Product name shown to users: `youtubeuploader` (your choice).\n17. Select `Continue`.\n18. Download credentials.\n19. Select `Download`, then `Done`.\n21. Copy downloaded file (`client_id.json`) to a directory.\n\n\n### get client token\n\n1. Open [console] in the above directory.\n2. Run `youtubeuploader -v client_id.json`.\n3. OAuth page will be opened in browser.\n3. Choose an account, videos will be uploaded here.\n4. `youtubeuploader` wants to access your Google Account.\n5. Select `Allow`, and close browser window.\n6. `client_token.json` should be created.\n\n### set environment variables\n\n1. Copy path of `client_id.json`.\n2. Set environment variable `YOUTUBEUPLOADER_CLIENT_ID` to it.\n3. Copy path of `client_token.json`.\n4. Set environment variable `YOUTUBEUPLOADER_CLIENT_TOKEN` to it.\n5. Now you can use **youtubeuploader** from any directory.\n\u003e On Windows, use [RapidEE] to set environment variable.\n\n```bash\n# on linux or macos console\nexport YOUTUBEUPLOADER_CLIENT_ID=\"[PATH TO client_id.json]\"\nexport YOUTUBEUPLOADER_CLIENT_TOKEN=\"[PATH TO client_token.json]\"\n\n# on windows powershell\n$env:YOUTUBEUPLOADER_CLIENT_ID=\"[PATH TO client_id.json]\"\n$env:YOUTUBEUPLOADER_CLIENT_TOKEN=\"[PATH TO client_token.json]\"\n```\n\u003cbr\u003e\n\n\n## console\n\n```bash\nyoutubeuploader -v video.mp4\n# video.mp4 uploaded (yay!)\n\nyoutubeuploader -v video.mkv -ot \"Me at the zoo\" -od \"The first video on YouTube...\"\n# video.mkv uploaded with title and description\n\nyoutubeuploader -v video.mp4 -op public -l\n# video.mp4 uploaded as public video (log enabled)\n\nyoutubeuploader -ot \"Me at the zoo\"\n# get video id from title\n\nyoutubeuploader -i \"jNQXAC9IVRw\" -ot \"Elephants at zoo\"\n# update video title \"Me at the zoo\" -\u003e \"Elephants at zoo\"\n\nyoutubeuploader -i \"jNQXAC9IVRw\" -c \"odia.txt\" -ol \"or\"\n# upload odia captions for the video\n```\n\n### reference\n\n```bash\nyoutubeuploader [options]\n# --help:    show help\n# --version: show version\n# -l, --log:       enable log\n# -i, --id:        set video id (for update)\n# -v, --video:     set input video file/URL\n# -t, --thumbnail: set input thumbnail file/URL\n# -c, --caption:   set input caption file/URL\n# -m, --meta:      set input meta file\n# -d, --descriptionpath: set input description file\n# -ci, --client_id:      set client id credentials path (client_id.json)\n# -ct, --client_token:   set client token credentials path (client_token.json)\n# -ot, --title:         set title (video)\n# -od, --description:   set description (video)\n# -ok, --tags:          set tags/keywords\n# -ol, --language:      set language (en)\n# -oc, --category:      set category (people and blobd)\n# -op, --privacystatus: set privacy status (public)\n# -oe, --embeddable:    enable to be embeddable\n# -ol, --license:       set license (standard)\n# -os, --publicstatsviewable: enable public stats to be viewable\n# -opa, --publishat:          set publish time\n# -ord, --recordingdate:  set recording date\n# -opi, --playlistids:    set playlist ids\n# -opt, --playlisttitles: set playlist titles\n# -ola, --location_latitude:   set latitude coordinate\n# -olo, --location_longitude:  set longitude coordinate\n# -old, --locationdescription: set location description\n# -uc, --upload_chunk:  set upload chunk size in bytes (8388608)\n# -ur, --upload_rate:   set upload rate limit in kbps (no limit)\n# -ut, --upload_time:   set upload time limit ex- \"10:00-14:00\"\n# -ap, --auth_port:     set OAuth request port (8080)\n# -ah, --auth_headless: enable browserless OAuth process\n\n# Environment variables:\n$YOUTUBEUPLOADER_LOG # enable log (0)\n$YOUTUBEUPLOADER_VIDEO     # set input video file\n$YOUTUBEUPLOADER_THUMBNAIL # set input thumbnail file\n$YOUTUBEUPLOADER_CAPTION   # set input caption file\n$YOUTUBEUPLOADER_META      # set input meta file\n$YOUTUBEUPLOADER_DESCRIPTIONPATH # set input description file\n$YOUTUBEUPLOADER_CLIENT_ID       # set client id credentials path (client_id.json)\n$YOUTUBEUPLOADER_CLIENT_TOKEN    # set client token credentials path (client_token.json)\n$YOUTUBEUPLOADER_TITLE         # set title (file)\n$YOUTUBEUPLOADER_DESCRIPTION   # set description (file)\n$YOUTUBEUPLOADER_TAGS          # set tags/keywords\n$YOUTUBEUPLOADER_LANGUAGE      # set language (en)\n$YOUTUBEUPLOADER_CATEGORY      # set category id (22)\n$YOUTUBEUPLOADER_PRIVACYSTATUS # set privacy (public)\n$YOUTUBEUPLOADER_EMBEDDABLE    # enable to be embeddable (0)\n$YOUTUBEUPLOADER_LICENSE       # set license (standard)\n$YOUTUBEUPLOADER_PUBLICSTATSVIEWABLE # enable public stats to be viewable (0)\n$YOUTUBEUPLOADER_PUBLISHAT           # set publish time\n$YOUTUBEUPLOADER_RECORDINGDATE  # set recording date\n$YOUTUBEUPLOADER_PLAYLISTIDS    # set playlist ids\n$YOUTUBEUPLOADER_PLAYLISTTITLES # set playlist titles\n$YOUTUBEUPLOADER_LOCATION_LATITUDE   # set latitude coordinate\n$YOUTUBEUPLOADER_LOCATION_LONGITUDE  # set longitude coordinate\n$YOUTUBEUPLOADER_LOCATIONDESCRIPTION # set location description\n$YOUTUBEUPLOADER_UPLOAD_CHUNK  # set upload chunk size in bytes (8388608)\n$YOUTUBEUPLOADER_UPLOAD_RATE   # set upload rate limit in kbps (no limit)\n$YOUTUBEUPLOADER_UPLOAD_TIME   # set upload time limit ex- \"10:00-14:00\"\n$YOUTUBEUPLOADER_AUTH_PORT     # set OAuth request port (8080)\n$YOUTUBEUPLOADER_AUTH_HEADLESS # enable browserless OAuth process (0)\n```\n\n```javascript\n// META file (.json)\n// - specified using -m/--meta\n// - all fields are optional\n{\n  \"title\": \"How Risky Is The Stock Market?\",\n  \"description\": \"Have you ever thought about investing ...\",\n  \"tags\": [\"stock marketing\", \"risk management\"],\n  \"privacyStatus\": \"public\",\n  \"embeddable\": true,\n  \"license\": \"creativeCommon\",\n  \"publicStatsViewable\": true,\n  \"publishAt\": \"2017-06-01T12:05:00+02:00\",\n  \"categoryId\": \"10\",\n  \"recordingdate\": \"2017-05-21\",\n  \"location\": {\n    \"latitude\": 48.8584,\n    \"longitude\": 2.2945\n  },\n  \"locationDescription\":  \"Bombay Stock Exchange\",\n  \"playlistIds\":  [\"xxxxxxxxxxxxxxxxxx\", \"yyyyyyyyyyyyyyyyyy\"],\n  \"playlistTitles\":  [\"my test playlist\"],\n  \"language\":  \"en\"\n}\n```\n\u003cbr\u003e\n\n\n## package\n\n\n```javascript\nconst youtubeuploader = require('extra-youtubeuploader');\n\nawait youtubeuploader({video: 'video.mp4'})\n// video.mp4 uploaded (yay!)\n\nawait youtubeuploader({video: 'video.mkv', title: 'Me at the zoo',\n  description: 'The first video on YouTube...'});\n// video.mkv uploaded with title and description\n\nyoutubeuploader({video: 'video.mp4', privacystatus: 'public', log: true});\n// video.mp4 uploaded as public video (log enabled)\n\nvar ids = await youtubeuploader.lines({title: 'Me at the zoo'});\n// get video ids from title\n\nvar id = ids[0];\nawait youtubeuploader({id, title: 'Elephants at zoo'});\n// update video title \"Me at the zoo\" -\u003e \"Elephants at zoo\"\n\nawait youtubeuploader({id, caption: 'odia.txt', language: 'or'});\n// upload odia captions for the video\n```\n\n### reference\n\n```javascript\nconst youtubeuploader = require('extra-youtubeuploader');\n\nyoutubeuploader.lines(options={})\n// options: see below\n// -\u003e Promise \u003cstdout lines\u003e\n\nyoutubeuploader(options={})\n// options: see below\n// -\u003e Promise {stdout, stderr}\n\n// Default options:\noptions = {\n  stdio: [0, 1, 2], // set child process stdio\n  help: false,      // show help\n  version: false,   // show version\n  log: false,       // enable log\n  id: '',        // set video id (for update)\n  video: '',     // set input video file/URL\n  thumbnail: '', // set input thumbnail file/URL\n  caption: '',   // set input caption file/URL\n  meta: '',      // set input meta file\n  descriptionpath: '', // set input description file\n  client: {\n    id: 'client_id.json',       // set client id credentials path\n    token: 'client_token.json'  // set client token credentials path\n  },\n  title: '\u003cvideo\u003e',             // set title\n  description: '\u003cvideo\u003e',       // set description\n  tags: '',                     // set tags/keywords\n  language: 'en',               // set language\n  category: 'people and blogs', // set category\n  privacystatus: 'private',     // set privacy status\n  embeddable: false,            // enable to be embeddable\n  license: '',                  // set license (standard)\n  publicstatsviewable: false,   // enable public stats to be viewable\n  publishat: '',           // set publish time\n  recordingdate: '',       // set recording date\n  playlistids: '',         // set playlist ids\n  playlisttitles: '',      // set playlist titles\n  location: {\n    latitude: '',          // set latitude coordinate\n    longitude: '',         // set longitude coordinate\n  },\n  locationdescription: '', // set location description\n  upload: {\n    chunk: '',      // set upload chunk size in bytes (8388608)\n    rate: '',       // set upload rate limit in kbps (no limit)\n    time: ''        // set upload time limit ex- \"10:00-14:00\"\n  },\n  auth: {\n    port: '8080',   // set OAuth request port\n    headless: false // enable browserless OAuth process\n  }\n}\n```\n\u003cbr\u003e\n\n\n## similar\n\nDo you need anything similar?\n- [extra-stillvideo] can generate video from audio and image.\n- [extra-googletts] can generate spoken audio from text.\n\nSuggestions are welcome. Please [create an issue]. \n\u003cbr\u003e\u003cbr\u003e\n\n\n[![nodef](https://i.imgur.com/HS08T0y.jpg)](https://nodef.github.io)\n\n[Upload Wikipedia TTS videos on YouTube]: https://www.youtube.com/results?search_query=wikipedia+audio+article\n[\"Pixelsphere OST (2017)\"]: https://www.youtube.com/watch?v=RCryNyHbSDc\u0026list=PLNEveYilIj1AV5-ETDCHufWazEHRcP8o-\n\n[extra-stillvideo]: https://www.npmjs.com/package/extra-stillvideo\n[extra-googletts]: https://www.npmjs.com/package/extra-googletts\n[create an issue]: https://github.com/nodef/extra-youtubeuploader/issues\n[Node.js]: https://nodejs.org/en/download/\n\n[releases]: https://github.com/golangf/youtubeuploader/releases\n[console]: https://en.wikipedia.org/wiki/Shell_(computing)#Text_(CLI)_shells\n[account]: https://accounts.google.com/signup\n[Google Cloud Platform]: https://console.developers.google.com/\n[new project]: https://console.cloud.google.com/projectcreate\n[YouTube Data API]: https://console.cloud.google.com/apis/library/youtube.googleapis.com\n[credentials]: https://console.cloud.google.com/apis/credentials/wizard\n[RapidEE]: https://www.rapidee.com/en/about\n\n![](https://ga-beacon.deno.dev/G-RC63DPBH3P:SH3Eq-NoQ9mwgYeHWxu7cw/github.com/nodef/extra-youtubeuploader)\n\n[\"youtubeuploader\"]: https://github.com/golangf/youtubeuploader\n[setup-youtubeuploader]: https://www.npmjs.com/package/setup-youtubeuploader\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnodef%2Fextra-youtubeuploader","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnodef%2Fextra-youtubeuploader","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnodef%2Fextra-youtubeuploader/lists"}