| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -40,15 +40,10 @@ Take for example a signal graph that looks like this: | |||
| 40 | 40 | ||
| 41 | 41 | The corresponding command-line arguments are pretty gnarly: | |
| 42 | 42 | ```bash | |
| 43 | - ffmpeg -i input.mp4 \ | ||
| 44 | - -filter_complex "\ | ||
| 45 | - [0]trim=start_frame=10:end_frame=20[v0];\ | ||
| 46 | - [0]trim=start_frame=30:end_frame=40[v1];\ | ||
| 47 | - [v0][v1]concat=n=2[v2];\ | ||
| 48 | - [1]hflip[v3];\ | ||
| 49 | - [v2][v3]overlay=eof_action=repeat[v4];\ | ||
| 50 | - [v4]drawbox=50:50:120:120:red:t=5[v5]"\ | ||
| 51 | - -map [v5] output.mp4 | ||
| 43 | + ffmpeg -i input.mp4 -filter_complex "[0]trim=start_frame=10:end_frame=20[v0];\ | ||
| 44 | + [0]trim=start_frame=30:end_frame=40[v1];[v0][v1]concat=n=2[v2];[1]hflip[v3];\ | ||
| 45 | + [v2][v3]overlay=eof_action=repeat[v4];[v4]drawbox=50:50:120:120:red:t=5[v5]"\ | ||
| 46 | + -map [v5] output.mp4 | ||
| 52 | 47 | ``` | |
| 53 | 48 | ||
| 54 | 49 | Maybe this looks great to you, but if you're not an FFmpeg command-line expert, it probably looks alien. | |
@@ -140,13 +135,22 @@ Or fluently: | |||
| 140 | 135 | ) | |
| 141 | 136 | ``` | |
| 142 | 137 | ||
| 143 | - When in doubt, refer to the [existing filters](https://github.com/kkroening/ffmpeg-python/blob/master/ffmpeg/_filters.py) and/or the [official ffmpeg documentation](https://ffmpeg.org/ffmpeg-filters.html). | ||
| 138 | + Arguments with special names such as `-qscale:v` can be specified as a keyword-args dictionary as follows: | ||
| 139 | + ```python | ||
| 140 | + (ffmpeg | ||
| 141 | + .input('dummy.mp4') | ||
| 142 | + .output('dummy2.mp4', **{'qscale:v': 3}) | ||
| 143 | + .run() | ||
| 144 | + ) | ||
| 145 | + ``` | ||
| 146 | + | ||
| 147 | + When in doubt, refer to the [existing filters](https://github.com/kkroening/ffmpeg-python/blob/master/ffmpeg/_filters.py), [examples](https://github.com/kkroening/ffmpeg-python/tree/master/examples), and/or the [official ffmpeg documentation](https://ffmpeg.org/ffmpeg-filters.html). | ||
| 144 | 148 | ||
| 145 | 149 | ## Contributing | |
| 146 | 150 | ||
| 147 | 151 | <img align="right" src="https://raw.githubusercontent.com/kkroening/ffmpeg-python/master/doc/logo.png" alt="ffmpeg-python logo" width="20%" /> | |
| 148 | 152 | ||
| 149 | - Feel free to report any bugs or feature requests. | ||
| 153 | + Feel free to report any bugs or submit feature requests. | ||
| 150 | 154 | ||
| 151 | 155 | It should be fairly easy to use filters that aren't explicitly built into `ffmpeg-python` but if there's a feature or filter you'd really like to see included in the library, don't hesitate to open a feature request. | |
| 152 | 156 | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments