8000 Update examples readme · Taogal/ffmpeg-python@f1e8201 · GitHub
[go: up one dir, main page]

Skip to content

Commit f1e8201

Browse files
authored
Update examples readme
1 parent 435e574 commit f1e8201

File tree

1 file changed

+18
-18
lines changed

1 file changed

+18
-18
lines changed

examples/README.md

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -23,24 +23,6 @@ height = int(video_stream['height'])
2323
)
2424
```
2525

26-
## Process audio and video simultaneously
27-
28-
<img src="https://raw.githubusercontent.com/kkroening/ffmpeg-python/master/examples/graphs/av-pipeline.png" alt="av-pipeline graph" width="80%" />
29-
30-
```python
31-
in1 = ffmpeg.input('in1.mp4')
32-
in2 = ffmpeg.input('in2.mp4')
33-
v1 = in1['v'].hflip()
34-
a1 = in1['a']
35-
v2 = in2['v'].filter_('reverse').filter_('hue', s=0)
36-
a2 = in2['a'].filter_('areverse').filter_('aphaser')
37-
joined = ffmpeg.concat(v1, a1, v2, a2, v=1, a=1).node
38-
v3 = joined[0]
39-
a3 = joined[1].filter_('volume', 0.8)
40-
out = ffmpeg.output(v3, a3, 'out.mp4')
41-
out.run()
42-
```
43-
4426
## [Convert video to numpy array](https://github.com/kkroening/ffmpeg-python/blob/master/examples/ffmpeg-numpy.ipynb)
4527

4628
<img src="https://raw.githubusercontent.com/kkroening/ffmpeg-python/master/examples/graphs/ffmpeg-numpy.png" alt="ffmpeg-numpy graph" width="20%" />
@@ -86,6 +68,24 @@ out, _ = (ffmpeg
8668
)
8769
```
8870

71+
## Audio/video pipeline
72+
73+
<img src="https://raw.githubusercontent.com/kkroening/ffmpeg-python/master/examples/graphs/av-pipeline.png" alt="av-pipeline graph" width="80%" />
74+
75+
```python
76+
in1 = ffmpeg.input('in1.mp4')
77+
in2 = ffmpeg.input('in2.mp4')
78+
v1 = in1['v'].hflip()
79+
a1 = in1['a']
80+
v2 = in2['v'].filter_('reverse').filter_('hue', s=0)
81+
a2 = in2['a'].filter_('areverse').filter_('aphaser')
82+
joined = ffmpeg.concat(v1, a1, v2, a2, v=1, a=1).node
83+
v3 = joined[0]
84+
a3 = joined[1].filter_('volume', 0.8)
85+
out = ffmpeg.output(v3, a3, 'out.mp4')
86+
out.run()
87+
```
88+
8989
## [Jupyter Frame Viewer](https://github.com/kkroening/ffmpeg-python/blob/master/examples/ffmpeg-numpy.ipynb)
9090

9191
<img src="https://raw.githubusercontent.com/kkroening/ffmpeg-python/master/doc/jupyter-screenshot.png" alt="jupyter screenshot" width="75%" />

0 commit comments

Comments
 (0)
0