question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Video rotation metadata

See original GitHub issue

I am getting this warning when reading videos from mobile phones

imageio_ffmpeg - WARNING - The frame size for reading (480, 720) is different from the source frame size (720, 480).

This means I have to rotate frames either 90º or 270º.

ffmpeg -i provides such rotation info of videos, For example:

ffmpeg -i myrotatedMOV.mov
....

Duration: 00:00:14.31, start: 0.000000, bitrate: 778 kb/s
    Stream #0:0(und): Video: h264 (Baseline) (avc1 / 0x31637661), yuv420p, 480x360, 702 kb/s, 29.98 fps, 30 tbr, 600 tbn, 1200 tbc
    Metadata:
      rotate          : 180
      creation_time   : 2013-01-09 12:47:36
      handler_name    : Core Media Data Handler
    Stream #0:1(und): Audio: aac (mp4a / 0x6134706D), 44100 Hz, mono, s16, 62 kb/s
    Metadata:
      creation_time   : 2013-01-09 12:47:36
      handler_name    : Core Media Data Handler

How can I get such information with imageio_ffmpeg? Tried get_meta_data() function but is not there

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
hmaarrfkcommented, Jul 21, 2022

I think this can likely get closed.

1reaction
almarkleincommented, Jun 23, 2020

As a first step, it should be possible to add code here to add the rotation info to the metadata. That way users at least have a way to deal with it.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Rotation Metadata in Video Files Created by Mobile Devices
Videos recorded using mobile devices contain a lot of metadata. One piece of such data is the rotation metadata.
Read more >
Change rotation flag in MP4 video (without losing metadata)
exiftool version 10.89 now has support to rotate mp4 videos without changing other metadata. Usage: exiftool -rotation=90 video.mp4.
Read more >
How to rotate videos using FFmpeg - Shotstack
Get video rotation metadata using FFprobe or FFmpeg​​ To fix the video rotation so it is compatible with the widest range of software...
Read more >
How to edit or add video metadata of "rotation" in mp4?
Is there any program that I can add "rotation" metadata? It would be OK if there's the way to edit video content with...
Read more >
Using video rotation in AWS Elemental MediaConvert
This rotation metadata, sometimes referred to as rotation atoms or boxes, provides rotation metadata to the player device that is used for viewing...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found