{"id":24774398,"url":"https://github.com/donteatoreo/dis","last_synced_at":"2025-06-17T04:37:27.605Z","repository":{"id":160524581,"uuid":"550525946","full_name":"DontEatOreo/dis","owner":"DontEatOreo","description":"dis is a simple and fast tool to compress videos for Discord and other platforms.","archived":false,"fork":false,"pushed_at":"2024-12-07T21:25:48.000Z","size":471,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-29T04:09:09.464Z","etag":null,"topics":["agplv3","cli","command-line-tool","compression","csharp","discord","dotnet","dotnet-core","dotnet6","dotnetcore","ffmpeg","open-source","video-compression","youtube-dl","yt-dlp"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/DontEatOreo.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":"2022-10-12T23:13:38.000Z","updated_at":"2024-12-07T14:43:36.000Z","dependencies_parsed_at":null,"dependency_job_id":"f8bb5e75-a698-4d5a-8180-9237a8010b73","html_url":"https://github.com/DontEatOreo/dis","commit_stats":null,"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DontEatOreo%2Fdis","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DontEatOreo%2Fdis/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DontEatOreo%2Fdis/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DontEatOreo%2Fdis/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DontEatOreo","download_url":"https://codeload.github.com/DontEatOreo/dis/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":236136595,"owners_count":19100628,"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":["agplv3","cli","command-line-tool","compression","csharp","discord","dotnet","dotnet-core","dotnet6","dotnetcore","ffmpeg","open-source","video-compression","youtube-dl","yt-dlp"],"created_at":"2025-01-29T05:48:47.156Z","updated_at":"2025-06-17T04:37:27.592Z","avatar_url":"https://github.com/DontEatOreo.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# dis 🎥\n\n[![GitHub license](https://img.shields.io/github/license/DontEatOreo/dis)](https://github.com/DontEatOreo/dis/blob/master/LICENSE)\n[![GitHub release](https://img.shields.io/github/release/DontEatOreo/dis)](https://github.com/DontEatOreo/dis/releases)\n[![GitHub issues](https://img.shields.io/github/issues/DontEatOreo/dis)](https://github.com/DontEatOreo/dis/issues)\n\n![292BEC87](https://github.com/user-attachments/assets/395cbfa1-f86c-403c-a40e-c33ee9200ce3)\n\n**dis** 🎥 is a simple CLI tool to compress videos for platforms like Discord\nand likewise. It uses [YT-DLP](https://github.com/yt-dlp/yt-dlp) to download\nvideos from all sites that `yt-dlp` supports, such as YouTube, Twitter, Reddit,\nand more, and [FFmpeg](https://ffmpeg.org/download.html) for compression. It\ncomes with a rich and easy to use TUI mode for trimming videos\n\n## Nix Dev Environment\n\n**dis** 🎥 comes with a `nix develop` environment that carries all the\ndependencies (dotnet, ffmpeg, and yt-dlp), allowing you to work on the project\nwithout having to manually install them. To activate this environment, all you\nneed to do is:\n\n1. Have `nix` installed\n2. Have `flakes` and `nix-command` experimental features enabled\n3. Be in the same directory\n4. Run `nix develop --impure`\n\n## Building\n\n### .NET\n\nAll you need to do is run `dotnet build`, then a `bin/` folder will be created\nthat will contain all the build artifacts\n\n### Building a Single File Executable\n\nYou can build a single file executable which you can run without having dotnet\npreinstalled and that you can place anywhere. To do that all you need to do is:\n\n1. `dotnet publish dis.csproj -p:PublishSingleFile=true\n-p:IncludeNativeLibrariesForSelfExtract=true --self-contained\ntrue --configuration Release --runtime \u003crid\u003e`\n([KnowRIDs](https://learn.microsoft.com/en-us/dotnet/core/rid-catalog#known-rids))\n2. Then you can find the executable at `bin/Release/net8.0/\u003crid\u003e/`\n\n### Nix\n\n### Simply run `nix build .#default`\n\nAlternatively you can also invoke a `nix shell github:DontEatOreo/dis` with the\nrequired packages to build **dis** 🎥\n\n### Updating dependencies on Nix\n\n1. Run `nix run nixpkgs#dotnet-sdk -- restore --packages out`\n2. Run the script `nix-shell -p dotnet-sdk nuget-to-nix --run \"nuget-to-nix out \u003e deps.nix\"`\n3. Run formatter `nix run nixpkgs#nixfmt-rfc-style -- deps.nix`\n\n## Installation\n\nTo install **dis** 🎥, you need to have\n[FFmpeg](https://ffmpeg.org/download.html) and\n[YT-DLP](https://github.com/yt-dlp/yt-dlp) installed on your system. You can\ndownload them from their official websites or use your package manager of\nchoice.\n\nYou can then download the latest release of **dis** 🎥 from\nthe [Releases](https://github.com/DontEatOreo/dis/releases)\ntab on GitHub. Alternatively, you can clone this\nrepository and build the project yourself using [dotnet\npublish](https://docs.microsoft.com/en-us/dotnet/core/tools/dotnet-publish)\n\n### If you're using Nix\n\n### Using `nix profile`\n\n```bash\nnix profile install github:DontEatOreo/dis\n```\n\n### Using flakes\n\nYou will need to add **dis** 🎥 to your inputs and pass it down your outputs\n\n```nix\n{\n  # ...\n\n  inputs = {\n    # ...\n    dis.url = \"github:DontEatOreo/dis\";\n    dis.inputs.nixpkgs.follows = \"nixpkgs\";\n    # ...\n  };\n\n  outputs = {\n    # ...\n    dis,\n    # ...\n  }\n}\n```\n\nAfter that in whichever `.nix` file is responsible for your packages you will\nneed to add **dis** 🎥\n\nExample:\n\n```nix\n{ pkgs, dis, ... }: {\n  environment = {\n    # ...\n    systemPackages = builtins.attrValues {\n        # ...\n        dis = dis.packages.${pkgs.system}.default;\n        # ...\n    };\n  };\n}\n```\n\n## Usage\n\nTo use **dis** 🎥, you need to provide an input video source using the `-i`\n(`--input`) option. The input source can be either a local file or an online URL\n(e.g., Discord Server, YouTube, Twitter, Reddit, etc...).\n\nYou can also specify various options to customize the output video, such as:\n\n| Option                              | Description                                                                                           | Default Value |\n|-------------------------------------|-------------------------------------------------------------------------------------------------------|---------------|\n| `-i`, `--input` `\u003cinput\u003e`           | Input video source                                                                                    | None          |\n| `-o`, `--output` `\u003coutput\u003e`         | Output directory for the compressed video                                                             | Current Path  |\n| `-c`, `--crf` `\u003ccrf\u003e`               | Constant Rate Factor (CRF) Higher values mean lower quality, Lower values mean higher quality         | `25`          |\n| `-r`, `--resolution` `\u003cresolution\u003e` | Output video resolution                                                                               | None          |\n| `-t`, `--trim`                      | Enable video trimming                                                                                 | `false`       |\n| `--video-codec` `\u003cvideo-codec\u003e`     | Output video codec                                                                                    | None          |\n| `--audio-bitrate` `\u003caudio-bitrate\u003e` | Output audio bitrate (in kbit/s) (only divisible by 2)                                                | `128k`        |\n| `--multi-thread`                    | Use all available threads (for faster compression)                                                    | true          |\n| `--random`                          | Randomize the output filename                                                                         | `false`       |\n| `--sponsor`                         | Remove the sponsor segments from the output video using [SponsorBlock](https://sponsor.ajay.app/) API | `False`       |\n\nThe CRF is a video compression method that grants users control over the output\nvideo quality, with higher values resulting in lower quality and vice versa. It\nis recommended to avoid values below 22 or above 38.\n\n## Here are some examples of how to use **dis** 🎥\n\n### Compressing a video from a website\n\n![1](https://github.com/user-attachments/assets/71afc721-d57d-4a36-99f8-c236a58c2b72)\n\n### Compressing a local file while adjusting its resolution to `480p` and saving it to a designated directory\n\n![2](https://github.com/user-attachments/assets/817a11c3-7be4-4890-a227-da1391f70112)\n\n### Compressing a video from YouTube and change the video codec to `h265`, resolution to `720p`, and audio bitrate to `128`, with a custom CRF value\n\n![3](https://github.com/user-attachments/assets/d08d5424-fa13-4fda-aef1-963d25a2c2aa)\n\n### Compressing a video from YouTube and trimming from 10 seconds to 20 seconds\n\n![4](https://github.com/user-attachments/assets/f648df70-0ce8-49bd-bdfd-4130d11840d3)\n\n## Contributing\n\nIf you want to contribute to **dis** 🎥, you are welcome to do so. You can\nreport issues, request features, or submit pull requests on GitHub.\n\n## License\n\n**dis** is licensed under the\n[AGPLv3](https://github.com/DontEatOreo/dis/blob/master/LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdonteatoreo%2Fdis","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdonteatoreo%2Fdis","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdonteatoreo%2Fdis/lists"}