forked from Zulko/moviepy
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix stretched vertical video, add ffmpeg_params to VideoFileClip
- add test to determine whether ffmpeg supports autorotate - FFMPEG_VideoReader: set size based on video rotation metadata - use `-noautorotate` to disable autorotation (ffmpeg >=2.7 autorotates by default) - closes Zulko#212, closes Zulko#577, closes Zulko#682
- Loading branch information
Showing
7 changed files
with
101 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# -*- coding: utf-8 -*- | ||
"""Image clip tests meant to be run with pytest.""" | ||
import sys | ||
|
||
import pytest | ||
from moviepy.video.VideoClip import ImageClip | ||
|
||
sys.path.append("tests") | ||
|
||
import download_media | ||
|
||
|
||
def test_download_media(capsys): | ||
with capsys.disabled(): | ||
download_media.download() | ||
|
||
def test_exifrotate(): | ||
image_file = 'media/balloons_portrait.jpg' | ||
with ImageClip(image_file, duration=1) as clip: | ||
assert clip.img.meta['EXIF_MAIN']['ExifImageWidth'] == 4032 | ||
assert clip.img.meta['EXIF_MAIN']['ExifImageHeight'] == 3024 | ||
assert clip.img.meta['EXIF_MAIN']['Orientation'] == 6 | ||
assert clip.size == (3024, 4032) | ||
|
||
with ImageClip(image_file, duration=1, | ||
imageio_params={'exifrotate': False}) as clip: | ||
assert clip.size == (4032, 3024) | ||
|
||
|
||
if __name__ == '__main__': | ||
pytest.main() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters