Skip to content

Commit 1ffec7e

Browse files
committed
update readme
1 parent d646898 commit 1ffec7e

File tree

1 file changed

+16
-16
lines changed

1 file changed

+16
-16
lines changed

README.md

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -101,28 +101,28 @@ This is the most detailed way to use `any_to_any.py`. You can structure a comman
101101

102102
### Single File Processing
103103
Convert a WEBP file to PNG:
104-
```python
104+
```bash
105105
python any_to_any.py -i /path/to/file.webp -f png
106106
```
107107

108108
Convert MP4 to MP3, delete the MP4 source file afterwards:
109-
```python
109+
```bash
110110
python any_to_any.py -i /path/to/file.mp4 -f mp3 -d
111111
```
112112

113113
Convert MP3 to M4A, set conversion quality to high, delete the MP3 source file afterwards:
114-
```python
114+
```bash
115115
python any_to_any.py -i /path/to/file.mp3 -f m4a -q high -d
116116
```
117117

118118
Convert MP4 to HLS streams:
119-
```python
119+
```bash
120120
python any_to_any.py -i /path/to/file.mp4 -f hls
121121
```
122122
The option for `hls` creates a directory with distinct folders for stream fragments of resolutions `426x240`, `640x360`, `842x480`, `1280x720`, and `1920x1080`.
123123

124124
If you feel like it, you can even convert an MP4 file to a PDF, that PDF to a GIF and the GIF back to MP4:
125-
```python
125+
```bash
126126
# Create the PDF containing the movie's frames [Movie -> Document]
127127
python any_to_any.py -i /path/to/file.mp4 -f pdf
128128
# Create the GIF from your PDF [Document -> Image]
@@ -132,40 +132,40 @@ python any_to_any.py -i /path/to/file.gif -f mp4
132132
```
133133

134134
You may also convert the images contained in a DOCX file to an MP4 video:
135-
```python
135+
```bash
136136
python any_to_any.py -i /path/to/file.docx -f mp4
137137
```
138138

139139
Split a PDF into multiple files, either by page count or page ranges, e.g. `1-2,3-5` or `10` or `1-3,2-6,8-end` or `1-5,rest`:
140-
```python
140+
```bash
141141
python any_to_any.py -i /path/to/file.pdf -s 1-3,2-6,8-end
142142
```
143143

144144
### Directory Processing
145145
Directory Processing is useful when you want to work with multiple files in a directory
146146

147147
Convert all WEBP files in a directory to PNG:
148-
```python
148+
```bash
149149
python any_to_any.py -i /path/to/webp-folder -f png
150150
```
151151

152152
Convert all MP4 files to MP3, save to a different directory, set conversion quality to `high`, delete MP4 source files afterwards:
153-
```python
153+
```bash
154154
python any_to_any.py -i /path/to/mp4-folder -o /path/to/save/folder -f mp3 -q high -d
155155
```
156156

157157
Convert all MP3 files from any subdirectory **recursively** to M4A, delete MP3 source files afterwards:
158-
```python
158+
```bash
159159
python any_to_any.py -i /path/to/mp3-top-folder -f m4a -d -r
160160
```
161161

162162
Merge MP4 files with respective, equally named MP3 files in the same directory, save to a different directory, delete source files afterwards:
163-
```python
163+
```bash
164164
python any_to_any.py -i /path/to/folder -o /path/to/save/folder -m -d
165165
```
166166

167167
Concatenate MP4 files, save to a different directory, delete source files afterwards:
168-
```python
168+
```bash
169169
python any_to_any.py -i /path/to/mp4-folder -o /path/to/save/folder -c -d
170170
```
171171

@@ -181,7 +181,7 @@ To set up a dropzone, specify:
181181
- The `-z`/`--dropzone` parameter.
182182

183183
This sets up a dropzone to convert files to MP3, saving them in the output directory:
184-
```python
184+
```bash
185185
python any_to_any.py -i /path/to/dropzone -o /path/to/save_folder -f mp3 -z
186186
```
187187

@@ -191,15 +191,15 @@ This runs continuously, halt it by pressing `CTRL+C`.
191191
### Multi Directory/File Processing
192192
You may also process multiple individual files or multiple directories at once.<br>
193193
Note that only one output directory can be specified (omitting the `-o`/`--output` parameter works and will write to the input file paths).
194-
```python
194+
```bash
195195
python any_to_any.py -i -1 /path/to/file1.mp4 -2 /path/to/mp4-folder -o /path/to/output-folder -f mp3
196196
```
197197
Merging across directories works when adding `-a`/`--across` to the `-m`/`--merge` parameter:
198-
```python
198+
```bash
199199
python any_to_any.py -i -1 /path/to/folder1 -2 /path/to/folder2 -o /path/to/output-folder -m -a
200200
```
201201
Concatenating across directories works when adding `-a`/`--across` to the `-c`/`--concat` parameter:
202-
```python
202+
```bash
203203
python any_to_any.py -i -1 /path/to/folder1 -2 /path/to/folder2 -o /path/to/output-folder -c -a
204204
```
205205
Omitting the `-a`/`--across` parameter will execute merges or concatenations seperately, per each input directory.

0 commit comments

Comments
 (0)