From bf87179efe8faf7360c5fced22d34178879042c3 Mon Sep 17 00:00:00 2001 From: Karl Kroening Date: Sat, 2 Jun 2018 02:21:59 -0700 Subject: [PATCH] Update README.md --- examples/README.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/examples/README.md b/examples/README.md index df635b4..6ecc707 100644 --- a/examples/README.md +++ b/examples/README.md @@ -1 +1,10 @@ # Examples + +## [Get video info](https://github.com/kkroening/ffmpeg-python/blob/master/examples/video_info.py) + +```python +probe = ffmpeg.probe(args.in_filename) +video_stream = next((stream for stream in probe['streams'] if stream['codec_type'] == 'video'), None) +width = int(video_stream['width']) +height = int(video_stream['height']) +```