Skip to content

Commit

Permalink
Add support for multiple streams and metadata parsing to 'ffmpeg_pars…
Browse files Browse the repository at this point in the history
…e_infos' (#1466)

* Fix conflicts

* Fix formatting

* Improve documentation and minor changes to ffmpeg_parse_infos func def

* Fix error parsing when 'decode_file=True' and add test

* Refactor a bit the parser

* Add two doctrings in tests

* Fix formatting

* Better exception catching

* More comments

* Raise proper errors if file not found in 'parse_ffmpeg_infos'
  • Loading branch information
mondeja authored Jan 21, 2021
1 parent d7e067b commit 2482d13
Show file tree
Hide file tree
Showing 6 changed files with 683 additions and 156 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Support for `copy.copy(clip)` and `copy.deepcopy(clip)` with same behaviour as `clip.copy()` [\#1442](https://github.com/Zulko/moviepy/pull/1442)
- `audio.fx.multiply_stereo_volume` to control volume by audio channels [\#1424](https://github.com/Zulko/moviepy/pull/1424)
- Support for retrieve clip frames number using `clip.n_frames` [\#1471](https://github.com/Zulko/moviepy/pull/1471)
- `video.io.ffmpeg_reader.ffmpeg_parse_infos` returns data from all streams by FFmpeg inputs in attribute `inputs` [\#1466](https://github.com/Zulko/moviepy/pull/1466)
- `video.io.ffmpeg_reader.ffmpeg_parse_infos` returns metadata of the container in attribute `metadata` [\#1466](https://github.com/Zulko/moviepy/pull/1466)

### Changed <!-- for changes in existing functionality -->
- Lots of method and parameter names have been changed. This will be explained better in the documentation soon. See https://github.com/Zulko/moviepy/pull/1170 for more information. [\#1170](https://github.com/Zulko/moviepy/pull/1170)
Expand Down
File renamed without changes.
4 changes: 0 additions & 4 deletions moviepy/audio/io/readers.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,6 @@ def __init__(
self.nchannels = nchannels
infos = ffmpeg_parse_infos(filename, decode_file=decode_file)
self.duration = infos["duration"]
if "video_duration" in infos:
self.duration = infos["video_duration"]
else:
self.duration = infos["duration"]
self.bitrate = infos["audio_bitrate"]
self.infos = infos
self.proc = None
Expand Down
Loading

0 comments on commit 2482d13

Please sign in to comment.