From ca85cbbbd3a5b6b258279cfa16e9157c896d2773 Mon Sep 17 00:00:00 2001 From: Karl Kroening Date: Fri, 13 Jul 2018 03:58:30 +0200 Subject: [PATCH] Add examples --- examples/README.md | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/examples/README.md b/examples/README.md index 0438cb0..41d56d8 100644 --- a/examples/README.md +++ b/examples/README.md @@ -68,6 +68,35 @@ out, _ = (ffmpeg ) ``` +## Assemble video from sequence of frames + +glob + +```python +( + ffmpeg + .input('/path/to/jpegs/*.jpg', pattern_type='glob', framerate=25) + .output('movie.mp4') + .run() +) +``` + +With additional filtering: + +glob-filter + +```python +( + ffmpeg + .input('/path/to/jpegs/*.jpg', pattern_type='glob', framerate=25) + .filter_('deflicker', mode='pm', size=10) + .filter_('scale', size='hd1080', force_original_aspect_ratio='increase') + .output('movie.mp4', crf=20, preset='slower', movflags='faststart', pix_fmt='yuv420p') + .view(filename='filter_graph') + .run() +) +``` + ## Audio/video pipeline av-pipeline graph @@ -93,3 +122,4 @@ out.run() ## [Jupyter Stream Editor](https://github.com/kkroening/ffmpeg-python/blob/master/examples/ffmpeg-numpy.ipynb) jupyter demo +