@@ -23,24 +23,6 @@ height = int(video_stream['height'])
23
23
)
24
24
```
25
25
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
-
44
26
## [ Convert video to numpy array] ( https://github.com/kkroening/ffmpeg-python/blob/master/examples/ffmpeg-numpy.ipynb )
45
27
46
28
<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
86
68
)
87
69
```
88
70
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
+
89
89
## [ Jupyter Frame Viewer] ( https://github.com/kkroening/ffmpeg-python/blob/master/examples/ffmpeg-numpy.ipynb )
90
90
91
91
<img src =" https://raw.githubusercontent.com/kkroening/ffmpeg-python/master/doc/jupyter-screenshot.png " alt =" jupyter screenshot " width =" 75% " />
0 commit comments