{"id":15209040,"url":"https://github.com/arthur2500/convertz","last_synced_at":"2025-04-15T11:29:40.913Z","repository":{"id":253933077,"uuid":"835585822","full_name":"Arthur2500/ConvertZ","owner":"Arthur2500","description":"A video conversion webapp","archived":false,"fork":false,"pushed_at":"2024-11-11T18:00:42.000Z","size":467,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-28T19:21:37.583Z","etag":null,"topics":["converter","ejs","ffmpeg","javascript","nodejs","self-hosted","video-processing","webapp"],"latest_commit_sha":null,"homepage":"https://compress.ziemlich-schnell.de","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Arthur2500.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":"2024-07-30T06:20:39.000Z","updated_at":"2025-01-05T15:50:05.000Z","dependencies_parsed_at":"2024-09-18T13:04:56.039Z","dependency_job_id":"f799a03e-7baf-4091-9eb1-ed97be9d68c6","html_url":"https://github.com/Arthur2500/ConvertZ","commit_stats":{"total_commits":10,"total_committers":1,"mean_commits":10.0,"dds":0.0,"last_synced_commit":"950f5e1e4b26ef7790ca2c8dc9e9750d067b5570"},"previous_names":["arthur2500/convertz"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Arthur2500%2FConvertZ","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Arthur2500%2FConvertZ/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Arthur2500%2FConvertZ/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Arthur2500%2FConvertZ/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Arthur2500","download_url":"https://codeload.github.com/Arthur2500/ConvertZ/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249060716,"owners_count":21206383,"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":["converter","ejs","ffmpeg","javascript","nodejs","self-hosted","video-processing","webapp"],"created_at":"2024-09-28T07:20:47.122Z","updated_at":"2025-04-15T11:29:40.875Z","avatar_url":"https://github.com/Arthur2500.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Docker Image CI](https://github.com/Arthur2500/ConvertZ/actions/workflows/docker-image.yml/badge.svg)](https://github.com/Arthur2500/ConvertZ/actions/workflows/docker-image.yml)\n# ConvertZ \u003cimg src=\"https://github.com/Arthur2500/ConvertZ/raw/main/public/favicon.ico\" alt=\"Icon\" width=\"24\"/\u003e\nA lightweight video conversion and compression webapp \u0026 API using ffmpeg.\n\n## Demo:\nhttps://compress.ziemlich-schnell.de\n\n## How to run:\n### Use Prebuilt Image (Recommended)\n```\ndocker run --name convertz -p 3000:3000 -e NODE_ENV=production -e SECURITY=enabled -e API_KEY=none -v ./uploads:/app/uploads -v ./converted:/app/converted --restart unless-stopped ghcr.io/arthur2500/convertz:latest\n```\nor\n```\nmkdir ConvertZ \u0026\u0026\ncd ConvertZ \u0026\u0026\nwget https://raw.githubusercontent.com/Arthur2500/ConvertZ/main/docker-compose.yml \u0026\u0026\ndocker-compose up -d\n```\n\n### Build Docker Image Locally\n```\ngit clone https://github.com/Arthur2500/ConvertZ.git \u0026\u0026\ndocker-compose -f docker-compose.local.yml up -d --build\n```\n\n### Run without Docker\nRequirements:\n```\nNode.js \u003e= 16\nffmpeg\n```\n\nClone Repository\n```\ngit clone https://github.com/Arthur2500/ConvertZ.git\n```\n\nInstall dependencies\n```\nnpm install\n```\n\nRun main.js\n```\nnode main.js\n```\n\nFor improved security, set environment variable SECURITY=enabled if exclusively accessed via Cloudflare Tunnel or localhost\n```\nSECURITY=enabled node main.js\n```\n\nAPI authentication key is also passed via environment variable\n```\nAPI_KEY=your-api-key-here node main.js\n```\n\nOr both\n```\nSECURITY=enabled API_KEY=your-api-key-here node main.js\n```\n\n## Configuration\n`docker-compose.yml` Environment Settings:\n- `SECURITY: [enabled/disabled]`: Enable/Disable Security features such as Ratelimiting for API and Helmet header protection\n- `API_KEY: [none/$CUSTOM_KEY]`: If set to \"none,\" no API authorization is used. Otherwise, the custom string is used as the API key. (see [Request Headers](#request-headers))\n\n## Screenshots\n![Screenshot 2024-08-20 215648](https://github.com/user-attachments/assets/a2d7979e-2f71-4f3f-9063-57128690e62a)\n\n## API Endpoint\n\nEndpoint: `/api/upload`\n\nMethod: `POST`\n\nDescription: Upload and convert a video file to a specified format, resolution, frame rate, and bitrate.\n\n#### Request Headers\n\n- `Authorization`: API key (if required).\n\n#### Request Body\n\n- `video`: Video file to upload (multipart/form-data).\n- `format`: Output format (`mp4`, `avi`, `mkv`, `webm`, `mov`).\n- `resolution`: Output resolution, percentage of original resolution in steps of 10, value must be between 50 and 100 (e.g. `80` for 80% of original resolution).\n- `fps`: Frame rate in steps of 1, value must be between 15 and 60 (e.g., `30` for 30 FPS).\n- `bitrate`: Video bitrate in kbps in steps of 100, value must be between 1000 and 10000 (e.g., `1000` for 1000 kbps).\n\n#### Response\n\n- **Success**: Downloads the converted video file.\n- **Failure**: JSON with an error message.\n\n### Examples\n\n#### `curl` Example\n\n```sh\ncurl -X POST http://localhost:3000/api/upload \\\n  -H \"Authorization: YOUR_API_KEY\" \\\n  -F \"video=@/path/to/your/video.mp4\" \\\n  -F \"format=mp4\" \\\n  -F \"resolution=80\" \\\n  -F \"fps=30\" \\\n  -F \"bitrate=1000\" \\\n  -OJ\n```\n\n#### Python Example\n\n```python\nimport requests\n\nurl = \"http://localhost:3000/api/upload\"\nheaders = {\"Authorization\": \"YOUR_API_KEY\"}\nfiles = {\"video\": open(\"/path/to/your/video.mp4\", \"rb\")}\ndata = {\n    \"format\": \"mp4\",\n    \"resolution\": \"80\",\n    \"fps\": \"30\",\n    \"bitrate\": \"1000\"\n}\n\nresponse = requests.post(url, headers=headers, files=files, data=data)\n\nif response.status_code == 200:\n    content_disposition = response.headers.get('Content-Disposition')\n    filename = content_disposition.split(\"filename=\")[-1].strip('\"')\n    with open(filename, \"wb\") as f:\n        f.write(response.content)\n    print(f\"Video converted successfully and saved as {filename}!\")\nelse:\n    print(\"Error:\", response.json())\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farthur2500%2Fconvertz","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Farthur2500%2Fconvertz","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farthur2500%2Fconvertz/lists"}