vidpack


Namevidpack JSON
Version 0.1.1 PyPI version JSON
download
home_pagehttps://github.com/ivansaul/CLI-Video-Compressor
SummaryA Python script for efficiently compressing videos without sacrificing quality
upload_time2024-10-06 07:02:22
maintainerNone
docs_urlNone
authorivansaul
requires_python<4.0,>=3.10
licenseMIT
keywords video compression ffmpeg python
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            <!-- markdownlint-disable MD033 MD036 MD041 MD045 MD046 -->

<div align="center">
    <img width="200" src="https://i.imgur.com/HeeZxH3.png" alt="Coco Logo">
</div>
<div align="center">

<h1 style="border-bottom: none">
    <b><a href="#">CLI Video Compressor</a></b>
</h1>

***`Pack`*** is a simple yet powerful CLI video compressor.

It reduces file sizes by up to 60% while maintaining high quality, using `FFmpeg` under the hood. Compress individual videos or entire folders with ease.

![GitHub repo size](https://img.shields.io/github/repo-size/ivansaul/CLI-Video-Compressor)
![GitHub stars](https://img.shields.io/github/stars/ivansaul/CLI-Video-Compressor)
![GitHub forks](https://img.shields.io/github/forks/ivansaul/CLI-Video-Compressor)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)

<a href="https://discord.gg/tDvybtJ7y9">
    <img alt="Discord Server" height="50" src="https://cdn.jsdelivr.net/npm/@intergrav/devins-badges@3/assets/cozy/social/discord-plural_vector.svg">
</a>

</div>

---

![demo][demo]

## InstalaciĆ³n

You might be sure that you have installed [*`Python 3.10+`*][python] and [*`FFmpeg`*][ffmpeg]. The CLI app uses `FFmpeg` under the hood, so make sure you have it installed and added to your PATH.

```console
pip install -U vidpack
```

<details>
    <summary>Prerequisites</summary>

    ```console
    # MacOS
    brew install ffmpeg

    # Ubuntu
    sudo apt install ffmpeg

    # ArchLinux
    sudo pacman -S ffmpeg

    # Fedora
    sudo dnf install ffmpeg
    ```

</details>

## Basic Usage

To compress a video or multiple videos, you will use the `pack` command, followed by the required input argument (a file or a directory).

```console
pack INPUT [OPTIONS]
```

> [!NOTE]
> `INPUT`: This is the file or directory you want to process. If you provide a directory, all videos within it will be compressed.

<!-- -->
> [!TIP]
> For additional help or to see all available options, you can use the command:
>
> ```console
> pack --help
> ```

## Options

Pack offers several options to customize the compression process:

- `--output`, `-o`: Specifies the output file to save the compressed video.
- `--quality`, `-q`: Defines the video quality level (0-100). Default value: 75.
- `--overwrite`, `-w`: Overwrites the output file if it already exists.
- `--delete-original`, `-d`: Deletes the original video after successful compression.
- `--verbose`, `-v`: Enables debugging mode for more information during the process.

## Usage Examples

To compress a video named `video.mp4`, simply run:

```console
pack video.mp4
```

This command will compress `video.mp4` with default settings(quality: 75) and save the result as `video_compressed.mp4` in the same directory.

<details>
    <summary>Show more examples</summary>

### Compress a single video file

### Specify an output file

If you want to specify the name or location of the compressed file:

```console
pack video.mp4 --output compressed/small_video.mp4
```

This command will compress `video.mp4` and save the result as `small_video.mp4` in the `compressed` directory.

### Adjust compression quality

To compress a video with a specific quality (e.g., 60):

``` console
pack video.mp4 -q 60
```

This will compress the video with lower quality, resulting in a smaller file size.

### Compress all videos in a directory

To compress all videos in a directory:

```console
pack /path/to/my/videos
```

This command will compress all videos in the specified directory and save the results in the same directory.

### Overwrite existing files

If you want to overwrite existing compressed files:

```console
pack video.mp4 --output output.mp4 --overwrite
```

This will overwrite the file `output.mp4` if it already exists.

### Delete the original file after compression

To delete the original video file after successful compression:

```console
pack video.mp4 --delete-original
```

The original `video.mp4` will be deleted after compression.

### Use multiple options

You can combine multiple options in a single command:

```console
pack video.mp4 -o compressed.mp4 -q 80 -w -d -v
```

This command will compress `video.mp4` with a quality of 80, save the result as `compressed.mp4`, overwrite if the file exists, delete the original, and display detailed information during the process.

</details>

## Additional Notes

- The quality option (`-q`) affects both visual quality and file size. A lower value will result in a smaller file but lower visual quality, while a higher value will maintain better quality but with a larger file size.
- It's always recommended to backup your original videos before using the delete option (`-d`).
- The verbose mode (`-v`) is useful for diagnosing issues or better understanding the compression process.

> [!TIP]
> If you are a Windows user, you can install `ffmpeg` and `python` manually or using package managers like [*`Scoop`*][scoop].
> Once you have installed a package manager, you can just run something like `scoop install python ffmpeg`.

## Contribuidores

<a href="https://github.com/ivansaul/CLI-Video-Compressor/graphs/contributors">
  <img src="https://contrib.rocks/image?repo=ivansaul%2FCLI%2DVideo%2DCompressor"/>
</a>

## See my other projects

[![Bookmark Style Card](https://svg.bookmark.style/api?url=https://github.com/ivansaul/codigo_facilito_downloader&mode=light&style=horizontal)](https://github.com/ivansaul/codigo_facilito_downloader)
[![Bookmark Style Card](https://svg.bookmark.style/api?url=https://github.com/ivansaul/personal-portfolio&mode=light&style=horizontal)](https://github.com/ivansaul/personal-portfolio)
[![Bookmark Style Card](https://svg.bookmark.style/api?url=https://github.com/ivansaul/flutter_todo_app&mode=light&style=horizontal)](https://github.com/ivansaul/flutter_todo_app)

[python]:https://www.python.org/downloads/
[ffmpeg]:https://ffmpeg.org
[demo]:https://github.com/user-attachments/assets/9c9c672a-bfa3-418a-b7d1-89f0e7751146
[scoop]:https://scoop.sh


            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/ivansaul/CLI-Video-Compressor",
    "name": "vidpack",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "<4.0,>=3.10",
    "maintainer_email": null,
    "keywords": "video, compression, ffmpeg, python",
    "author": "ivansaul",
    "author_email": null,
    "download_url": "https://files.pythonhosted.org/packages/4f/b1/8952ae2ca6e1c2f72dcbad2bb2a41c3b76a7a8474d0334fabf0e73aa1323/vidpack-0.1.1.tar.gz",
    "platform": null,
    "description": "<!-- markdownlint-disable MD033 MD036 MD041 MD045 MD046 -->\n\n<div align=\"center\">\n    <img width=\"200\" src=\"https://i.imgur.com/HeeZxH3.png\" alt=\"Coco Logo\">\n</div>\n<div align=\"center\">\n\n<h1 style=\"border-bottom: none\">\n    <b><a href=\"#\">CLI Video Compressor</a></b>\n</h1>\n\n***`Pack`*** is a simple yet powerful CLI video compressor.\n\nIt reduces file sizes by up to 60% while maintaining high quality, using `FFmpeg` under the hood. Compress individual videos or entire folders with ease.\n\n![GitHub repo size](https://img.shields.io/github/repo-size/ivansaul/CLI-Video-Compressor)\n![GitHub stars](https://img.shields.io/github/stars/ivansaul/CLI-Video-Compressor)\n![GitHub forks](https://img.shields.io/github/forks/ivansaul/CLI-Video-Compressor)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n\n<a href=\"https://discord.gg/tDvybtJ7y9\">\n    <img alt=\"Discord Server\" height=\"50\" src=\"https://cdn.jsdelivr.net/npm/@intergrav/devins-badges@3/assets/cozy/social/discord-plural_vector.svg\">\n</a>\n\n</div>\n\n---\n\n![demo][demo]\n\n## Instalaci\u00f3n\n\nYou might be sure that you have installed [*`Python 3.10+`*][python] and [*`FFmpeg`*][ffmpeg]. The CLI app uses `FFmpeg` under the hood, so make sure you have it installed and added to your PATH.\n\n```console\npip install -U vidpack\n```\n\n<details>\n    <summary>Prerequisites</summary>\n\n    ```console\n    # MacOS\n    brew install ffmpeg\n\n    # Ubuntu\n    sudo apt install ffmpeg\n\n    # ArchLinux\n    sudo pacman -S ffmpeg\n\n    # Fedora\n    sudo dnf install ffmpeg\n    ```\n\n</details>\n\n## Basic Usage\n\nTo compress a video or multiple videos, you will use the `pack` command, followed by the required input argument (a file or a directory).\n\n```console\npack INPUT [OPTIONS]\n```\n\n> [!NOTE]\n> `INPUT`: This is the file or directory you want to process. If you provide a directory, all videos within it will be compressed.\n\n<!-- -->\n> [!TIP]\n> For additional help or to see all available options, you can use the command:\n>\n> ```console\n> pack --help\n> ```\n\n## Options\n\nPack offers several options to customize the compression process:\n\n- `--output`, `-o`: Specifies the output file to save the compressed video.\n- `--quality`, `-q`: Defines the video quality level (0-100). Default value: 75.\n- `--overwrite`, `-w`: Overwrites the output file if it already exists.\n- `--delete-original`, `-d`: Deletes the original video after successful compression.\n- `--verbose`, `-v`: Enables debugging mode for more information during the process.\n\n## Usage Examples\n\nTo compress a video named `video.mp4`, simply run:\n\n```console\npack video.mp4\n```\n\nThis command will compress `video.mp4` with default settings(quality: 75) and save the result as `video_compressed.mp4` in the same directory.\n\n<details>\n    <summary>Show more examples</summary>\n\n### Compress a single video file\n\n### Specify an output file\n\nIf you want to specify the name or location of the compressed file:\n\n```console\npack video.mp4 --output compressed/small_video.mp4\n```\n\nThis command will compress `video.mp4` and save the result as `small_video.mp4` in the `compressed` directory.\n\n### Adjust compression quality\n\nTo compress a video with a specific quality (e.g., 60):\n\n``` console\npack video.mp4 -q 60\n```\n\nThis will compress the video with lower quality, resulting in a smaller file size.\n\n### Compress all videos in a directory\n\nTo compress all videos in a directory:\n\n```console\npack /path/to/my/videos\n```\n\nThis command will compress all videos in the specified directory and save the results in the same directory.\n\n### Overwrite existing files\n\nIf you want to overwrite existing compressed files:\n\n```console\npack video.mp4 --output output.mp4 --overwrite\n```\n\nThis will overwrite the file `output.mp4` if it already exists.\n\n### Delete the original file after compression\n\nTo delete the original video file after successful compression:\n\n```console\npack video.mp4 --delete-original\n```\n\nThe original `video.mp4` will be deleted after compression.\n\n### Use multiple options\n\nYou can combine multiple options in a single command:\n\n```console\npack video.mp4 -o compressed.mp4 -q 80 -w -d -v\n```\n\nThis command will compress `video.mp4` with a quality of 80, save the result as `compressed.mp4`, overwrite if the file exists, delete the original, and display detailed information during the process.\n\n</details>\n\n## Additional Notes\n\n- The quality option (`-q`) affects both visual quality and file size. A lower value will result in a smaller file but lower visual quality, while a higher value will maintain better quality but with a larger file size.\n- It's always recommended to backup your original videos before using the delete option (`-d`).\n- The verbose mode (`-v`) is useful for diagnosing issues or better understanding the compression process.\n\n> [!TIP]\n> If you are a Windows user, you can install `ffmpeg` and `python` manually or using package managers like [*`Scoop`*][scoop].\n> Once you have installed a package manager, you can just run something like `scoop install python ffmpeg`.\n\n## Contribuidores\n\n<a href=\"https://github.com/ivansaul/CLI-Video-Compressor/graphs/contributors\">\n  <img src=\"https://contrib.rocks/image?repo=ivansaul%2FCLI%2DVideo%2DCompressor\"/>\n</a>\n\n## See my other projects\n\n[![Bookmark Style Card](https://svg.bookmark.style/api?url=https://github.com/ivansaul/codigo_facilito_downloader&mode=light&style=horizontal)](https://github.com/ivansaul/codigo_facilito_downloader)\n[![Bookmark Style Card](https://svg.bookmark.style/api?url=https://github.com/ivansaul/personal-portfolio&mode=light&style=horizontal)](https://github.com/ivansaul/personal-portfolio)\n[![Bookmark Style Card](https://svg.bookmark.style/api?url=https://github.com/ivansaul/flutter_todo_app&mode=light&style=horizontal)](https://github.com/ivansaul/flutter_todo_app)\n\n[python]:https://www.python.org/downloads/\n[ffmpeg]:https://ffmpeg.org\n[demo]:https://github.com/user-attachments/assets/9c9c672a-bfa3-418a-b7d1-89f0e7751146\n[scoop]:https://scoop.sh\n\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "A Python script for efficiently compressing videos without sacrificing quality",
    "version": "0.1.1",
    "project_urls": {
        "Homepage": "https://github.com/ivansaul/CLI-Video-Compressor",
        "Repository": "https://github.com/ivansaul/CLI-Video-Compressor"
    },
    "split_keywords": [
        "video",
        " compression",
        " ffmpeg",
        " python"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "403af1676e37e79e4412949d27c62b40ac38a9017516401840dd12af127b4efe",
                "md5": "ac1287c66a450976167d23fe07d7c473",
                "sha256": "e440f2beaaaf25bc603c22f1d39925dcfed5094c26193fb20b2a33a94dcaf150"
            },
            "downloads": -1,
            "filename": "vidpack-0.1.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "ac1287c66a450976167d23fe07d7c473",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<4.0,>=3.10",
            "size": 10492,
            "upload_time": "2024-10-06T07:02:21",
            "upload_time_iso_8601": "2024-10-06T07:02:21.584346Z",
            "url": "https://files.pythonhosted.org/packages/40/3a/f1676e37e79e4412949d27c62b40ac38a9017516401840dd12af127b4efe/vidpack-0.1.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "4fb18952ae2ca6e1c2f72dcbad2bb2a41c3b76a7a8474d0334fabf0e73aa1323",
                "md5": "5c71b54f73e7f8e63c56142cd6e1682e",
                "sha256": "cf0ec6c91151a36cbc4379abcd201278e5a34c9d8f5e11acfc5a72c501ca1e84"
            },
            "downloads": -1,
            "filename": "vidpack-0.1.1.tar.gz",
            "has_sig": false,
            "md5_digest": "5c71b54f73e7f8e63c56142cd6e1682e",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<4.0,>=3.10",
            "size": 9962,
            "upload_time": "2024-10-06T07:02:22",
            "upload_time_iso_8601": "2024-10-06T07:02:22.758181Z",
            "url": "https://files.pythonhosted.org/packages/4f/b1/8952ae2ca6e1c2f72dcbad2bb2a41c3b76a7a8474d0334fabf0e73aa1323/vidpack-0.1.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-10-06 07:02:22",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "ivansaul",
    "github_project": "CLI-Video-Compressor",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "vidpack"
}
        
Elapsed time: 1.21960s