VideoHelp Forum




+ Reply to Thread
Results 1 to 10 of 10
  1. Here is a MediaInfo data from an video taken in portrait mode on my phone:

    Width : 1920 pixels
    Height : 1080 pixels
    Display aspect ratio : 16:9

    The "Display aspect ratio" should be 9:16. This is causing problems when I try to edit the file in OpenShot.

    If I run the file through a converter the Display Aspect Ratio changes to .563 and then it works fine in OpenShot.

    Is there a way just change the metadata without running it through a converter?
    Quote Quote  
  2. Member Cornucopia's Avatar
    Join Date
    Oct 2001
    Location
    Deep in the Heart of Texas
    Search PM
    Since we don't have the FULL mediainfo data, this is just a guess, but:

    I suspect that the recording was supposed to be portrait mode and was shot with a phone/cam that normally records in landscape mode and this particular shot was rotated to achieve the portait mode. And, instead of it recording it directly in 1080x1920, it recorded as 1920x1080 with rotational metadata.
    My guess is also, that whatever you are using to view/edit is not recognizing such metadata.

    If this is true, and if you cannot work with tools that DO support rotation, your only recourse is to do what you did and manually rotate and then re-encode (probably losing some quality in the process).

    If my hunch is wrong, please enlighten us with further details.


    Scott
    Quote Quote  
  3. If your video is avc or hevc you could try my clever Ffmpeg-GUI to change the aspect ratio without reencoding.
    Quote Quote  
  4. As suggested by Cornucopia, most likely Rotation was set to 90° by the recording app. This information is present in mediainfo. The AR itself is correct. Such files will be played in portrait mode by video players such as mpc-hc.
    The issue is however that the rotation flag is not supported by your editing app.

    If you are re-encoding the file anyway you should just rotate it in your editing app. Otherwise, you can cut with your app then set the rotation flag again with ffmpeg when you are done.
    Quote Quote  
  5. Member Cornucopia's Avatar
    Join Date
    Oct 2001
    Location
    Deep in the Heart of Texas
    Search PM
    @ProWo, you presume the original file doesn't have the appropriate metadata, and if that is true your method might be valid to add it.

    I am presuming the original file already HAD the metadata (just about ALL devices, phones, cams I know of DO), but that the apps used did not support/recognize/honor that metadata. If that is the case, your method will do nothing to help. (Unless it creates different/additional metadata in some other section of the file that DOES get recognized)


    More info is necessary...


    Scott
    Quote Quote  
  6. Originally Posted by Cornucopia View Post
    @ProWo, you presume the original file doesn't have the appropriate metadata, and if that is true your method might be valid to add it.
    I am presuming the original file already HAD the metadata (just about ALL devices, phones, cams I know of DO), but that the apps used did not support/recognize/honor that metadata. If that is the case, your method will do nothing to help. (Unless it creates different/additional metadata in some other section of the file that DOES get recognized)
    More info is necessary...
    Scott
    I have noticed that if you have a video with DAR 1.7778 (16:9) and you change the DAR metadata to e.g. 1.333 (4:3) this video is also displayed in 4:3. So worth a try.
    The OP should just enter 0.5625 as DAR and see if it works.
    Quote Quote  
  7. Setting rotation in container with ffmpeg should not be confused with changing AR.
    Quote Quote  
  8. FWIW, from my experience:
    My mobile phone wraps the files in .mp4 containers which support the rotation flag. For example a picture taken in portrait (phone held upright) mode will have the rotaion flag 90 degrees. Media info will however report it as 16:9, width 1920, height 1080. When the player recognizes the flag, it will display the picture upright, i.e. as 9:16. If the player does not recognize the flag or when the container is changed, the portrait picture will be displayed as a landscape picture with DAR 16:9. Also, the demuxed video stream will normally not keep the rotation info in its metadata; it's in the container only.
    Hence in order to make it independent of the flags and container I always reencode the video with something like
    Code:
    ffmpeg.exe -i "source.mp4" -map 0 -c:a copy -c:v libx264 -preset medium -crf 18 -filter:v "scale=-2:1080, pad=1920:1080:(ow-iw)/2:(oh-ih)/2, setdar=16/9" "out.mp4"
    Mobile phone files may have to be reencoded anyway as they are often VFR (variable frame rate) which most editors have problems with.
    Last edited by Sharc; 2nd Jan 2021 at 04:19.
    Quote Quote  
  9. Here is a MediaInfo data from an video taken in portrait mode on my phone:
    DON'T DO DAT.
    Image
    [Attachment 54471 - Click to enlarge]
    (from)
    Quote Quote  
  10. Thank you all for the replies. I looked again at the MediaInfo data and saw that it did have an entry for Rotation that was set to 90. So it looks like OpenShot just ignores that flag.
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!