Weird video flipping? #1056
-
For whatever reason, some of my videos on my desktop machine display in SLEAP are showing up as though they've been vertically and horizontally inverted, while displaying properly on my laptop. The video files themselves are not inverted (I've checked through opening the same files in a video editor) and the files are hosted on google drive through the cloud. Both machines are on Windows 11 OS. Do you have any idea what might be causing this inversion or ideas as to how I can make it stop? |
Beta Was this translation helpful? Give feedback.
Replies: 6 comments
-
Hi @eringiglio, Also have you tried reencoding the video to see if it still happens? Thanks! |
Beta Was this translation helpful? Give feedback.
-
I have tried re-encoding the video! It doesn't seem to help. It's the most bizarre thing. Do you think it could be something in the engine SLEAP uses to load video? I've shared an example video with you, but let me know if you'd like me to share the example SLP project file too. |
Beta Was this translation helpful? Give feedback.
-
Piping in here: There is this post about Google Drive videos being flipped once downloaded which stems from the media player not being able to handle the rotation metadata. |
Beta Was this translation helpful? Give feedback.
-
Oh, thank you! That looks like a potentially involved aspect--but why would
the SLEAP media player be different (or at least differently able to handle
the rotation metadata) between two computers? Is there a way to look at how
SLEAP is handling that metadata within a given installation?
…On Mon, Nov 21, 2022 at 2:47 PM Liezl Maree ***@***.***> wrote:
Piping in here:
There is this post
<https://support.google.com/drive/thread/3895385/video-from-google-drive-are-upside-down-once-downloaded?hl=en>
about Google Drive videos being flipped once downloaded which stems from
the media player not being able to handle the rotation metadata
<https://blog.addpipe.com/mp4-rotation-metadata-in-mobile-video-files/>.
—
Reply to this email directly, view it on GitHub
<#1040 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AB55UJSSV2BP7RNCDAMBZHDWJPNWNANCNFSM6AAAAAAR44JU6U>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
--
Erin Giglio, PhD.
Postdoctoral Associate
University of Minnesota
(770)-653-0022
|
Beta Was this translation helpful? Give feedback.
-
Okidokie, I played around with the video you sent. The issue is that the original video has some rotation metadata that is partially supported depending on where we're reading it, as @roomrys suggested. SLEAP uses opencv and ffmpeg under the hood for reading videos, and this usually will support rotation, but not on every environment/platform. We can definitely get it encoded a bit more efficiently and fix the rotation by using this command:
The important parts:
I'm not sure the best way to test this other than to just try it across the different systems you were on, but I'll send you the reencoded file back over email and you can let us know if that works for you. |
Beta Was this translation helpful? Give feedback.
-
I've just checked, and that's done it! Thank you so much; I'll re-encode the video files and that should work well moving forward. I really appreciate the detailed workover of the ffmpeg commands, too! |
Beta Was this translation helpful? Give feedback.
Okidokie, I played around with the video you sent.
The issue is that the original video has some rotation metadata that is partially supported depending on where we're reading it, as @roomrys suggested. SLEAP uses opencv and ffmpeg under the hood for reading videos, and this usually will support rotation, but not on every environment/platform.
We can definitely get it encoded a bit more efficiently and fix the rotation by using this command:
The important parts:
-an
: This removes the extraneous audio track that's stored in the file. I assume you do…