{"id":13489503,"url":"https://github.com/porjo/youtubeuploader","last_synced_at":"2025-05-14T19:02:50.270Z","repository":{"id":32427686,"uuid":"36005306","full_name":"porjo/youtubeuploader","owner":"porjo","description":"Scripted uploads to Youtube","archived":false,"fork":false,"pushed_at":"2025-03-28T19:49:29.000Z","size":439,"stargazers_count":799,"open_issues_count":5,"forks_count":104,"subscribers_count":20,"default_branch":"master","last_synced_at":"2025-04-06T17:01:42.488Z","etag":null,"topics":["go","video","youtube-api","youtube-uploader"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/porjo.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":"2015-05-21T09:59:26.000Z","updated_at":"2025-03-30T08:04:48.000Z","dependencies_parsed_at":"2023-02-12T23:00:15.267Z","dependency_job_id":"7ff20d9c-b265-4350-b02d-1490f23e8c2c","html_url":"https://github.com/porjo/youtubeuploader","commit_stats":{"total_commits":143,"total_committers":12,"mean_commits":"11.916666666666666","dds":0.5384615384615384,"last_synced_commit":"cfb08f55fffb6d19f1d49f8c8a8804d7bc0366a9"},"previous_names":[],"tags_count":58,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/porjo%2Fyoutubeuploader","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/porjo%2Fyoutubeuploader/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/porjo%2Fyoutubeuploader/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/porjo%2Fyoutubeuploader/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/porjo","download_url":"https://codeload.github.com/porjo/youtubeuploader/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248766685,"owners_count":21158302,"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":["go","video","youtube-api","youtube-uploader"],"created_at":"2024-07-31T19:00:29.224Z","updated_at":"2025-04-13T19:20:29.731Z","avatar_url":"https://github.com/porjo.png","language":"Go","funding_links":[],"categories":["Go","HarmonyOS"],"sub_categories":["Windows Manager"],"readme":"# Youtube Uploader\n\n![Tests](https://github.com/porjo/youtubeuploader/actions/workflows/gotest.yml/badge.svg)\n\nScripted uploads to youtube.\n\n- upload video files from local disk or from the web.\n- ratelimit upload bandwidth\n\n## Download\n\nGrab a [precompiled binary](https://github.com/porjo/youtubeuploader/releases) for Linux, Mac or Windows or build it yourself.\n\n## Setup\n\n### Youtube API\n\nTalking to the Youtube API requires oauth2 authentication. As such, you must:\n\n1. Create an account on the [Google Developers Console](https://console.developers.google.com)\n1. Create a new project for this app\n1. Enable the Youtube API (APIs \u0026 Services -\u003e Enable APIs and Services -\u003e Click 'ENABLE APIS AND SERVICES' top right). Select 'YouTube Data API v3'\n1. Create OAuth consent screen (APIs \u0026 Services -\u003e OAuth Consent Screen)\n   - Add a test user in \"Audience -\u003e Test users\". This can be any Google User account but it should correspond with the Youtube account where videos will be uploaded.\n1. Create Credentials (APIs \u0026 Services -\u003e Credentials -\u003e click 'CREATE CREDENTIALS'), select 'OAuth client ID', select 'Web application'\n   - Add an 'Authorized redirect URI' of 'http://localhost:8080/oauth2callback'\n1. Download the client secrets JSON file (click download icon next to newly created client ID) and save it as file `client_secrets.json` in the same directory as the utility e.g.\n\n```json\n{\n  \"web\": {\n    \"client_id\": \"xxxxxxxxxxxxxxxxxxxxxxxx.apps.googleusercontent.com\",\n    \"project_id\": \"youtubeuploader-yyyyy\",\n    \"auth_uri\": \"https://accounts.google.com/o/oauth2/auth\",\n    \"token_uri\": \"https://oauth2.googleapis.com/token\",\n    \"auth_provider_x509_cert_url\": \"https://www.googleapis.com/oauth2/v1/certs\",\n    \"client_secret\": \"xxxxxxxxxxxxxxxxxxxx\",\n    \"redirect_uris\": [\n      \"http://localhost:8080/oauth2callback\"\n    ]\n  }\n}\n```\n\n**NOTE 1** Google will apply 'private' status on videos uploaded to newly created projects - from [Google's Announcement](https://developers.google.com/youtube/v3/revision_history#july-28,-2020):\n\n\u003e All videos uploaded via the videos.insert endpoint from unverified API projects created after 28 July 2020 will be restricted to private viewing mode. To lift this restriction, each project must undergo an audit to verify compliance with the Terms of Service.\n\nSee [Issue #86](https://github.com/porjo/youtubeuploader/issues/86) for more information.\n\n**NOTE 2** By default you will only be able to upload ~6 videos every 24 hours due to quota restrictions set by Google. See [Issue #119](https://github.com/porjo/youtubeuploader/issues/119) for more information.\n\n## Usage\n\nAt a minimum, just specify a filename:\n\n```\n./youtubeuploader -filename blob.mp4\n```\n\nIf it is the first time you've run the utility, a browser window should popup and prompt you to provide Youtube credentials. A token will be created and stored in `request.token` file in the local directory for subsequent use. To run the utility on a headless-server, generate the token file locally first, then simply copy the token file along with `youtubeuploader` and `client_secrets.json` to the remote host.\n\nFull list of options:\n```\nUsage:\n  -cache string\n        token cache file (default \"request.token\")\n  -caption string\n        caption filename. Can be a URL\n  -categoryId string\n        video category Id\n  -chunksize int\n        size (in bytes) of each upload chunk. A zero value will cause all data to be uploaded in a single request (default 16777216)\n  -debug\n        turn on verbose log output\n  -description string\n        video description (default \"uploaded by youtubeuploader\")\n  -filename string\n        video filename. Can be a URL. Read from stdin with '-'\n  -language string\n        video language (default \"en\")\n  -limitBetween string\n        only rate limit between these times e.g. 10:00-14:00 (local time zone)\n  -metaJSON string\n        JSON file containing title,description,tags etc (optional)\n  -metaJSONout string\n        filename to write uploaded video metadata into (optional)\n  -notify\n        notify channel subscribers of new video. Specify '-notify=false' to disable. (default true)\n  -oAuthPort int\n        TCP port to listen on when requesting an oAuth token (default 8080)\n  -playlistID value\n        playlistID to add the video to. Can be used multiple times\n  -privacy string\n        video privacy status (default \"private\")\n  -quiet\n        suppress progress indicator\n  -ratelimit int\n        rate limit upload in Kbps. No limit by default\n  -recordingDate value\n        recording date e.g. 2024-11-23\n  -secrets string\n        Client Secrets configuration (default \"client_secrets.json\")\n  -sendFilename\n        send original file name to YouTube (default true)\n  -tags string\n        comma separated list of video tags\n  -thumbnail string\n        thumbnail filename. Can be a URL\n  -title string\n        video title\n  -version\n        show version\n```\n*NOTE:* When specifying a URL as the filename, the data will be streamed through the localhost (download from remote host, then upload to Youtube)\n\nIf `-quiet` is specified, no upload progress will be displayed. Current progress can be output by sending signal `USR1` to the process e.g. `kill -USR1 \u003cpid\u003e` (Linux/Unix only).\n\n### Metadata\n\nVideo title, description etc can specified via the command line flags or via a JSON file using the `-metaJSON` flag. An example JSON file would be:\n\n```json\n{\n  \"title\": \"my test title\",\n  \"description\": \"my test description\",\n  \"tags\": [\"test tag1\", \"test tag2\"],\n  \"privacyStatus\": \"private\",\n  \"madeForKids\": false,\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  \"playlistIds\":  [\"xxxxxxxxxxxxxxxxxx\", \"yyyyyyyyyyyyyyyyyy\"],\n  \"playlistTitles\":  [\"my test playlist\"],\n  \"language\":  \"fr\"\n}\n```\n- all fields are optional\n- use `\\n` in the description to insert newlines\n- times can be provided in one of two formats: `yyyy-mm-dd` (UTC) or `yyyy-mm-ddThh:mm:ss+zz:zz`\n- any values supplied via `-metaJSON` will take precedence over flags\n\n## Credit\n\nBased on [Go Youtube API Sample code](https://github.com/youtube/api-samples/tree/master/go)\n\nThanks to [github.com/tokland/youtube-upload](https://github.com/tokland/youtube-upload) for insight into how to update playlists.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fporjo%2Fyoutubeuploader","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fporjo%2Fyoutubeuploader","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fporjo%2Fyoutubeuploader/lists"}