diff --git a/examples/README.md b/examples/README.md index 4ec816e..d9981f5 100644 --- a/examples/README.md +++ b/examples/README.md @@ -115,6 +115,36 @@ out = ffmpeg.output(v3, a3, 'out.mp4') out.run() ``` +## Mono to stereo with offsets and video + +mono-to-stereo graph + +```python +audio_left = ( + ffmpeg + .input('audio-left.wav') + .filter('atrim', start=5) + .filter('asetpts', 'PTS-STARTPTS') +) + +audio_right = ( + ffmpeg + .input('audio-right.wav') + .filter('atrim', start=10) + .filter('asetpts', 'PTS-STARTPTS') +) + +input_video = ffmpeg.input('input-video.mp4') + +( + ffmpeg + .filter((audio_left, audio_right), 'join', inputs=2, channel_layout='stereo') + .output(input_video.video, 'output-video.mp4', shortest=None, vcodec='copy') + .overwrite_output() + .run() +) +``` + ## [Jupyter Frame Viewer](https://github.com/kkroening/ffmpeg-python/blob/master/examples/ffmpeg-numpy.ipynb) jupyter screenshot diff --git a/examples/graphs/mono-to-stereo.png b/examples/graphs/mono-to-stereo.png new file mode 100644 index 0000000..92ce0e5 Binary files /dev/null and b/examples/graphs/mono-to-stereo.png differ