You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When video is recorded from iPhone, it has some metadata information of orientation. While creating the thumbnail from ffmpeg it doesn't take that into the consideration and creates thumbnail of different orientation.
It would be great if you read that orientation in thumbnail() and pass the rotating argument to ffmpeg accordingly
May be this snippet should work under thumbnails()
probe = self.probe(fname)
rotation = 0
for stream in probe.streams:
if stream.type == 'video' and stream.metadata.get('rotate'):
rotation = int(stream.metadata.get('rotate'))
break
if rotation == 180:
cmds.extend(["-vf", "vflip,hflip"])
elif rotation == 90:
cmds.extend(["-vf", "transpose=1"])
elif rotation == 270 or rotation == -90:
cmds.extend(["-vf", "transpose=2"])
The text was updated successfully, but these errors were encountered:
When video is recorded from iPhone, it has some metadata information of orientation. While creating the thumbnail from ffmpeg it doesn't take that into the consideration and creates thumbnail of different orientation.
It would be great if you read that orientation in thumbnail() and pass the rotating argument to ffmpeg accordingly
May be this snippet should work under thumbnails()
The text was updated successfully, but these errors were encountered: