mschiesser commited on
Commit
e78d868
·
1 Parent(s): 65c1d15

add hf metadata

Browse files
Files changed (1) hide show
  1. README.md +30 -8
README.md CHANGED
@@ -1,3 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  # AI Video Editor CLI Tool
2
 
3
  A CLI tool for simple video editing tasks: splitting videos, combining videos, replacing audio, and generating thumbnails. Very useful for working with video-to-video AI models like [Runway](https://runwayml.com/)
@@ -13,17 +26,20 @@ A CLI tool for simple video editing tasks: splitting videos, combining videos, r
13
  ### Installation
14
 
15
  1. Clone this repository:
 
16
  ```
17
  git clone https://github.com/marcusschiesser/ai-video-cli.git
18
  cd ai-video-cli
19
  ```
20
 
21
  2. Install dependencies using Poetry:
 
22
  ```
23
- poetry install
24
  ```
25
 
26
  3. Open shell:
 
27
  ```
28
  poetry shell
29
  ```
@@ -50,14 +66,14 @@ ai-video split <input_file> [--chunk_size {5,10}]
50
  - `--chunk_size`: Chunk size in seconds (default: 10)
51
 
52
  Example:
 
53
  ```
54
  ai-video split my_long_video.mp4 --chunk_size 5
55
  ```
56
 
57
- This command will split `my_long_video.mp4` into 5-second chunks. The output files will be named
58
  `my_long_video_part1.mp4`, `my_long_video_part2.mp4`, and so on.
59
 
60
-
61
  ### 2. Combine Videos
62
 
63
  Combines multiple videos into one.
@@ -71,6 +87,7 @@ ai-video combine <output_file> <input_files>... [--codec CODEC]
71
  - `--codec`: Optional codec to use for the output video (e.g., 'libx264')
72
 
73
  Example:
 
74
  ```
75
  ai-video combine final_video.mp4 part1.mp4 part2.mp4 part3.mp4
76
  ```
@@ -90,6 +107,7 @@ ai-video replace_audio <input_video> <audio_video> [output_file]
90
  - `[output_file]`: Optional path for the output video file with replaced audio
91
 
92
  Example:
 
93
  ```
94
  ai-video replace_audio original_video.mp4 audio_source.mp4 final_video.mp4
95
  ```
@@ -107,9 +125,10 @@ ai-video thumbnail <input_file> [--output_file <output_file>]
107
  ```
108
 
109
  - `<input_file>`: Path to the input video file
110
- - `--output_file`: Optional path for the output thumbnail file (default: <input_file>_thumbnail.jpg)
111
 
112
  Example:
 
113
  ```
114
  ai-video thumbnail my_video.mp4
115
  ```
@@ -125,20 +144,21 @@ ai-video convert <input_file> [output_file] [--video_codec VIDEO_CODEC] [--audio
125
  ```
126
 
127
  - `<input_file>`: Path to the input video file
128
- - `[output_file]`: Optional path for the output video file (default: <input_file>_converted.<ext>)
129
  - `--video_codec`: Video codec to use (default: libx264)
130
  - `--audio_codec`: Audio codec to use (default: aac)
131
  - `--crop_width`: Width to crop the video (default: 1280)
132
  - `--crop_height`: Height to crop the video (default: 768)
133
 
134
  Example:
 
135
  ```
136
  ai-video convert input_video.mp4 output_video.mp4 --video_codec libx265 --audio_codec mp3 --crop_width 1920 --crop_height 1080
137
  ```
138
 
139
  This command will convert `input_video.mp4` to `output_video.mp4`, using the libx265 video codec and mp3 audio codec. It will also resize and crop the video to 1920x1080 pixels. If the input video's aspect ratio doesn't match 1920x1080, the video will be scaled to fit within these dimensions and centered.
140
 
141
- If you don't specify an output file, the tool will automatically generate one with the suffix "_converted" added to the input filename.
142
 
143
  ### 6. AI Segment Video
144
 
@@ -152,6 +172,7 @@ ai-segment <input_file> <output_file>
152
  - `<output_file>`: Path for the output segmented video file
153
 
154
  Example:
 
155
  ```
156
  ai-segment input_video.mp4 segmented_output.mp4
157
  ```
@@ -169,11 +190,12 @@ ai-video extract_audio <input_file> [output_file]
169
  ```
170
 
171
  - `<input_file>`: Path to the input video file
172
- - `[output_file]`: Optional path for the output audio file (default: <input_file>_audio.mp3)
173
 
174
  Example:
 
175
  ```
176
  ai-video extract_audio my_video.mp4
177
  ```
178
 
179
- This command will extract the audio from `my_video.mp4` and save it as `my_video_audio.mp3`. If you don't specify an output file, the tool will automatically generate one with the suffix "_audio.mp3" added to the input filename.
 
1
+ ---
2
+ title: Video Splitter
3
+ emoji: 📚
4
+ colorFrom: pink
5
+ colorTo: pink
6
+ sdk: gradio
7
+ sdk_version: 5.3.0
8
+ app_file: app.py
9
+ pinned: false
10
+ license: mit
11
+ short_description: "Split videos into 5s or 10s chunks for usage with AI models "
12
+ ---
13
+
14
  # AI Video Editor CLI Tool
15
 
16
  A CLI tool for simple video editing tasks: splitting videos, combining videos, replacing audio, and generating thumbnails. Very useful for working with video-to-video AI models like [Runway](https://runwayml.com/)
 
26
  ### Installation
27
 
28
  1. Clone this repository:
29
+
30
  ```
31
  git clone https://github.com/marcusschiesser/ai-video-cli.git
32
  cd ai-video-cli
33
  ```
34
 
35
  2. Install dependencies using Poetry:
36
+
37
  ```
38
+ poetry install
39
  ```
40
 
41
  3. Open shell:
42
+
43
  ```
44
  poetry shell
45
  ```
 
66
  - `--chunk_size`: Chunk size in seconds (default: 10)
67
 
68
  Example:
69
+
70
  ```
71
  ai-video split my_long_video.mp4 --chunk_size 5
72
  ```
73
 
74
+ This command will split `my_long_video.mp4` into 5-second chunks. The output files will be named
75
  `my_long_video_part1.mp4`, `my_long_video_part2.mp4`, and so on.
76
 
 
77
  ### 2. Combine Videos
78
 
79
  Combines multiple videos into one.
 
87
  - `--codec`: Optional codec to use for the output video (e.g., 'libx264')
88
 
89
  Example:
90
+
91
  ```
92
  ai-video combine final_video.mp4 part1.mp4 part2.mp4 part3.mp4
93
  ```
 
107
  - `[output_file]`: Optional path for the output video file with replaced audio
108
 
109
  Example:
110
+
111
  ```
112
  ai-video replace_audio original_video.mp4 audio_source.mp4 final_video.mp4
113
  ```
 
125
  ```
126
 
127
  - `<input_file>`: Path to the input video file
128
+ - `--output_file`: Optional path for the output thumbnail file (default: <input_file>\_thumbnail.jpg)
129
 
130
  Example:
131
+
132
  ```
133
  ai-video thumbnail my_video.mp4
134
  ```
 
144
  ```
145
 
146
  - `<input_file>`: Path to the input video file
147
+ - `[output_file]`: Optional path for the output video file (default: <input_file>\_converted.<ext>)
148
  - `--video_codec`: Video codec to use (default: libx264)
149
  - `--audio_codec`: Audio codec to use (default: aac)
150
  - `--crop_width`: Width to crop the video (default: 1280)
151
  - `--crop_height`: Height to crop the video (default: 768)
152
 
153
  Example:
154
+
155
  ```
156
  ai-video convert input_video.mp4 output_video.mp4 --video_codec libx265 --audio_codec mp3 --crop_width 1920 --crop_height 1080
157
  ```
158
 
159
  This command will convert `input_video.mp4` to `output_video.mp4`, using the libx265 video codec and mp3 audio codec. It will also resize and crop the video to 1920x1080 pixels. If the input video's aspect ratio doesn't match 1920x1080, the video will be scaled to fit within these dimensions and centered.
160
 
161
+ If you don't specify an output file, the tool will automatically generate one with the suffix "\_converted" added to the input filename.
162
 
163
  ### 6. AI Segment Video
164
 
 
172
  - `<output_file>`: Path for the output segmented video file
173
 
174
  Example:
175
+
176
  ```
177
  ai-segment input_video.mp4 segmented_output.mp4
178
  ```
 
190
  ```
191
 
192
  - `<input_file>`: Path to the input video file
193
+ - `[output_file]`: Optional path for the output audio file (default: <input_file>\_audio.mp3)
194
 
195
  Example:
196
+
197
  ```
198
  ai-video extract_audio my_video.mp4
199
  ```
200
 
201
+ This command will extract the audio from `my_video.mp4` and save it as `my_video_audio.mp3`. If you don't specify an output file, the tool will automatically generate one with the suffix "\_audio.mp3" added to the input filename.