Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Video with rotation metadata is stretched #682

Closed
cvn opened this issue Dec 10, 2017 · 4 comments
Closed

Video with rotation metadata is stretched #682

cvn opened this issue Dec 10, 2017 · 4 comments
Labels
lib-misc Issues pertaining to misc. 3rd-party libraries. video Related to VideoClip and related classes, or handling of video in general.

Comments

@cvn
Copy link

cvn commented Dec 10, 2017

Hello all,

I'm processing some vertical videos shot on an iPhone. With moviepy 0.2.3.2 and this code:

with VideoFileClip("ficus_vertical.mp4") as clip:
    clip.write_videofile('output.mp4')
I get this output I expected this

Source file: ficus_vertical.mp4

The problem is that ffmpeg is autorotating the video according to the metadata, but moviepy is sizing it to the pre-rotated frame size. This problem is also mentioned by #577. Autorotate has been enabled by default since ffmpeg 2.7.

I have a branch that fixes the issue, and also allows for autorotate to be disabled. I will submit a PR after my test media is added to the moviepy_media repo.

cvn added a commit to cvn/moviepy that referenced this issue Dec 10, 2017
- FFMPEG_VideoReader: set size based on video rotation metadata
- use `-noautorotate` to disable autorotation (ffmpeg >=2.7 autorotates by default)
- closes Zulko#212, Zulko#577, Zulko#682
cvn added a commit to cvn/moviepy that referenced this issue Dec 10, 2017
- 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
cvn added a commit to cvn/moviepy that referenced this issue Dec 12, 2017
- 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
cvn added a commit to cvn/moviepy that referenced this issue Dec 12, 2017
- 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
@pkarp0
Copy link

pkarp0 commented Dec 28, 2017

There is a workaround described here:
#586

@cvn
Copy link
Author

cvn commented Jan 4, 2018

Thanks, @pkarp0. I hope the issue will be fixed soon, whether by my PR or another means, but the workarounds are useful in the meantime.

@pkarp0
Copy link

pkarp0 commented Jan 4, 2018

@cvn Awesome. Perhaps you could take a look at my issue next:
#680

@keikoro keikoro added video Related to VideoClip and related classes, or handling of video in general. lib-misc Issues pertaining to misc. 3rd-party libraries. labels Dec 16, 2018
@mondeja
Copy link
Collaborator

mondeja commented Jan 25, 2021

Duplicate of #586

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lib-misc Issues pertaining to misc. 3rd-party libraries. video Related to VideoClip and related classes, or handling of video in general.
Projects
None yet
Development

No branches or pull requests

4 participants