diff --git a/README.md b/README.md index 4a00ef8..c958738 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,65 @@ # 1:1 Content-Aware Video Crop +This tool is designed to crop videos into a square format optimized for hologram projection. It uses content-aware cropping to ensure that important content remains visible after cropping. + +
+Sample Output + +![vidout3](https://github.com/Luigi-Pizzolito/1-1-Content-Aware-Video-Crop/assets/27804554/e3e42d7a-b630-40aa-85e8-04b732b6dbe0) + +
+ +## Usage + +### Command-Line Flags + +The tool accepts the following command-line flags: + +- `-i`: A string flag indicating the input video file(s) to be cropped. Multiple input videos can be provided by providing a folder instead. No default value; this flag is required. +- `-o`: A string flag indicating the output directory for the cropped videos. Default is current working directory. +- `-s`: An integer flag indicating the size of the square output video. Default is `256`. +- `--play`: A boolean flag indicating whether to enable player-only mode, does not save videos, just displays a preview of the result. Default is `false`. +- `--ui`: A boolean flag indicating whether to draw a user interface during processing. Default is `false`. +- `--rt`: A boolean flag indicating whether to process the video in real-time. Default is `false`. + +### Example Usage +
+Algorithm Display Mode + +```bash +go run . -i input.mp4 -o output_dir -s 256 --ui --rt +``` + +![show](https://github.com/Luigi-Pizzolito/1-1-Content-Aware-Video-Crop/assets/27804554/fb044c77-3723-46e8-8f88-102468bfb0f5) +
+ + +
+Player-Only Mode + +```bash +go run . -i input.mp4 -s 256 --play +``` + +![play](https://github.com/Luigi-Pizzolito/1-1-Content-Aware-Video-Crop/assets/27804554/01ca8b2d-2d0f-4bde-99d9-b72e7d8e6421) +
+ + +
+Headless Mode (default) + +```bash +go run . -i input.mp4 -o output_dir -s 256 +``` + +![cmd](https://github.com/Luigi-Pizzolito/1-1-Content-Aware-Video-Crop/assets/27804554/a5ee6b02-2740-4388-88af-154af6f8a682) +
+ + +
+Providing folder of videos as input + +```bash +go run . -i input_dir -o output_dir +``` +
\ No newline at end of file