Skip to content

Weird video flipping? #1056

Answered by talmo
eringiglio asked this question in Help!
Discussion options

You must be logged in to vote

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:

ffmpeg -y -i bacon1_drug2.22.MP4 -an -c:v libx264 -preset superfast -pix_fmt yuv420p -crf 29 -metadata:s:v:0 rotate=0 bacon1_drug2.22.sf.mp4

The important parts:

  • -an: This removes the extraneous audio track that's stored in the file. I assume you do…

Replies: 6 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by roomrys
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help!
Labels
None yet
3 participants
Converted from issue

This discussion was converted from issue #1040 on November 23, 2022 17:40.