{"id":20718227,"url":"https://github.com/jerryblessed/light_video_uploader_app","last_synced_at":"2026-04-19T18:32:31.092Z","repository":{"id":252512522,"uuid":"840664860","full_name":"Jerryblessed/Light_video_uploader_app","owner":"Jerryblessed","description":null,"archived":false,"fork":false,"pushed_at":"2024-08-10T10:34:36.000Z","size":118,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-11T07:46:10.568Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://light-video-uploader-app.vercel.app","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Jerryblessed.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2024-08-10T10:02:22.000Z","updated_at":"2024-08-10T10:34:38.000Z","dependencies_parsed_at":null,"dependency_job_id":"cd1d65ad-981b-40f8-95d1-068dd5c97973","html_url":"https://github.com/Jerryblessed/Light_video_uploader_app","commit_stats":null,"previous_names":["jerryblessed/light_video_uploader_app"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Jerryblessed/Light_video_uploader_app","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Jerryblessed%2FLight_video_uploader_app","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Jerryblessed%2FLight_video_uploader_app/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Jerryblessed%2FLight_video_uploader_app/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Jerryblessed%2FLight_video_uploader_app/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Jerryblessed","download_url":"https://codeload.github.com/Jerryblessed/Light_video_uploader_app/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Jerryblessed%2FLight_video_uploader_app/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32017914,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-18T20:23:30.271Z","status":"online","status_checked_at":"2026-04-19T02:00:07.110Z","response_time":55,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":[],"created_at":"2024-11-17T03:12:52.678Z","updated_at":"2026-04-19T18:32:31.082Z","avatar_url":"https://github.com/Jerryblessed.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Theta Video API Demo\n\nIn this demo, we demonstrate how to use the [Theta Video API (TVA)](https://www.thetavideoapi.com) to upload and transcode videos on the decentralized Theta Network. You can select the desired resolutions for transcoding and assign metadata tags such as video name and description. Furthermore, this example enables setting NFT Collections for Digital Rights Management (DRM).\n\n## Getting Started\n\nBegin by running the development server:\n\n```bash\nnpm run dev\n# or\nyarn dev\n# or\npnpm dev\n```\n\nOpen [http://localhost:3000](http://localhost:3000) in your browser to access the **Theta Video API Demo App**.\n\n## Learn More\n\nFor more information about the Theta Video API, review the following resources:\n\n- [Documentation](https://docs.thetatoken.org/docs/theta-video-api-developer-api)\n- [Website](https://www.thetavideoapi.com)\n\n## Diving into the Code\n\nAll information related to the Theta Video API is located in `app/video.tsx`. To commence with video uploads or transcoding, you need an API Key and an API Secret from TVA. After creating an account, navigate to the Dashboard. There, you can either select an existing app or create a new one. Then, click on \"Settings\" above the app's name:\n\n![VideoAPIKeys](public/images/videoAPIKeys.png)\n\nWith these keys, you can review the videos previously created:\n\n```typescript\naxios.get(`https://api.thetavideoapi.com/video/${apiKey}/list`, {\n    headers: {\n        'x-tva-sa-id': apiKey,\n        'x-tva-sa-secret': apiSecret,\n    }\n}).then((res) =\u003e {\n    console.log(res.data);\n}).catch((err) =\u003e {\n    console.error(\"Error:\", err);\n});\n```\n\nTo create a new video, decide whether to upload a new video or use an external URL where the video is hosted.\n\n### Upload Video Using a Pre-signed URL\n\nInitially, sign the URL:\n\n```typescript\nconst resSignURL = await axios.post('https://api.thetavideoapi.com/upload', {}, {\n    headers: {\n        'x-tva-sa-id': apiKey,\n        'x-tva-sa-secret': apiSecret\n    }\n});\nconsole.log(resSignURL.data);\n```\n\nAfter loading the local video file, use the signed URL to upload the video from your local file directory:\n\n```typescript\nlet signedURL: string = resSignURL.data.body.uploads[0].presigned_url;\nawait axios.put(signedURL, videoFile, {\n    headers: {\n        'Content-Type': 'application/octet-stream',\n    }\n});\n```\n\n### Transcoding a Video\n\nThere are two options here: use the video you've uploaded or a video from an external URL. The distinction lies in the source: either the ID from `resSignURL` or an external link.\n\n```typescript\nlet data = {\n    source_upload_id:\"upload_zzzzzzzzzzzzzzzzzzzzzzzzz\", // or source_uri:\"link to video\"\n    playback_policy:\"public\",\n    resolutions: [720, 1080],\n    use_drm: true,\n    drm_rules: [{\n        chain_id: 361,\n        nft_collection: \"0x7fe9b08c759ed2591d19c0adfe2c913a17c54f0c\"\n    }],\n    metadata:{\n        name:\"value\",\n        description:\"value\"\n    }\n}\nconst resTranscode = await axios.post('https://api.thetavideoapi.com/video', JSON.stringify(data), {\n    headers: {\n        'x-tva-sa-id': apiKeys.key,\n        'x-tva-sa-secret': apiKeys.secret,\n        'Content-Type': 'application/json'\n    }\n});\n```\n\nThis section has covered a lot, but everything is configurable in our Demo App. Let's break it down:\n\n- **resolution**: Choose one or more (360, 720, 1080, 2160).\n- **use_drm**: If `drm_rules` are set, mark this as true.\n- **drm_rules**: An array of objects, each containing the chain ID and the NFT collection address (Supported networks: Theta Mainnet, Theta Testnet, Ethereum Mainnet, ETH Goerli Testnet).\n- **metadata**: In our example, you can define a name and description, but you can include any desired information. This metadata can be used later for filtering videos.\n\nTo check the current status of your video's encoding:\n\n```typescript\nlet id: string = resTranscode.data.body.videos[0].id;\nconst response = await axios.get('https://api.thetavideoapi.com/video/' + id, {\n    headers: {\n        'x-tva-sa-id': apiKey,\n        'x-tva-sa-secret': apiSecret,\n    }\n});\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjerryblessed%2Flight_video_uploader_app","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjerryblessed%2Flight_video_uploader_app","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjerryblessed%2Flight_video_uploader_app/lists"}