8000 Add examples · Powercoder64/ffmpeg-python@ca85cbb · GitHub
[go: up one dir, main page]

Skip to content

Commit ca85cbb

Browse files
authored
Add examples
1 parent 06d4a6f commit ca85cbb

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

examples/README.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,35 @@ out, _ = (ffmpeg
6868
)
6969
```
7070

71+
## Assemble video from sequence of frames
72+
73+
<img src="https://raw.githubusercontent.com/kkroening/ffmpeg-python/master/examples/graphs/glob.png" alt="glob" width="25%" />
74+
75+
```python
76+
(
77+
ffmpeg
78+
.input('/path/to/jpegs/*.jpg', pattern_type='glob', framerate=25)
79+
.output('movie.mp4')
80+
.run()
81+
)
82+
```
83+
84+
With additional filtering:
85+
86+
<img src="https://raw.githubusercontent.com/kkroening/ffmpeg-python/master/examples/graphs/glob-filter.png" alt="glob-filter" width="50%" />
87+
88+
```python
89+
(
90+
ffmpeg
91+
.input('/path/to/jpegs/*.jpg', pattern_type='glob', framerate=25)
92+
.filter_('deflicker', mode='pm', size=10)
93+
.filter_('scale', size='hd1080', force_original_aspect_ratio='increase')
94+
.output('movie.mp4', crf=20, preset='slower', movflags='faststart', pix_fmt='yuv420p')
95+
.view(filename='filter_graph')
96+
.run()
97+
)
98+
```
99+
71100
## Audio/video pipeline
72101

73102
<img src="https://raw.githubusercontent.com/kkroening/ffmpeg-python/master/examples/graphs/av-pipeline.png" alt="av-pipeline graph" width="80%" />
@@ -93,3 +122,4 @@ out.run()
93122
## [Jupyter Stream Editor](https://github.com/kkroening/ffmpeg-python/blob/master/examples/ffmpeg-numpy.ipynb)
94123

95124
<img src="https://raw.githubusercontent.com/kkroening/ffmpeg-python/master/doc/jupyter-demo.gif" alt="jupyter demo" width="75%" />
125+

0 commit comments

Comments
 (0)
0