Opened 7 years ago

Closed 6 years ago

Last modified 6 years ago

#9861 closed Patch - Feature (fixed)

[PATCH] Rotate IPhone videos for proper playback

Reported by: Dave Badia <dbadia@…> Owned by: Jim Stichnoth
Priority: minor Milestone: 0.26
Component: MythTV - Video Playback Version: Master Head
Severity: medium Keywords:
Cc: Ticket locked: no

Description

IPhone videos can appear upside down in myth depending on the orientation of the phone when the video was captured. This patch checks the MOV metadata to detect the orientation and flips the frames if necessary. The MOV metadata is read by ffmpeg so this upstream ffmpeg patch is required to be merged into myth: http://git.videolan.org/?p=ffmpeg.git;a=commit;h=d3cef0a85b7d3fd133a3349341646fe15aeb0030

The flip is executed differently depending on the decoding/rendering method:

VDPAU: Simple swap of coordinates as suggested by the nvidia documentation Software: Added a new filter called vflip. This filter will be automatically applied when needed. XVMC: Didn't bother since it's going away

Test both active types and it's working well for me

This patch can be safely merged into myth prior to the ffmpeg patch - it just won't execute until that's done.

Attachments (3)

mov-flip-both (13.3 KB) - added by Dave Badia <dbadia@…> 7 years ago.
mov-flip-both2 (13.9 KB) - added by Dave Badia <dbadia@…> 7 years ago.
new patch that applies cleanly to master
mov-flip-both3 (13.7 KB) - added by Dave Badia <dbadia@…> 7 years ago.
New patch that applies cleanly to master

Download all attachments as: .zip

Change History (9)

Changed 7 years ago by Dave Badia <dbadia@…>

Attachment: mov-flip-both added

comment:1 Changed 7 years ago by robertm

Component: Plugin - MythVideoMythTV - Video Playback
Owner: changed from robertm to Janne Grunau
Type: Patch - Bug FixPatch - Feature

This doesn't actually have anything to do with mythvideo, changing component and type (since it's not a bug fix either)

comment:2 Changed 7 years ago by beirdo

Owner: changed from Janne Grunau to markk
Status: newassigned

Sending this somewhere where it might get some attention.

Changed 7 years ago by Dave Badia <dbadia@…>

Attachment: mov-flip-both2 added

new patch that applies cleanly to master

comment:3 Changed 7 years ago by markk

Owner: markk deleted

comment:4 Changed 7 years ago by Jim Stichnoth

Owner: set to Jim Stichnoth
Status: assignedaccepted

Dave, do you have an updated patch that you can upload?

Changed 7 years ago by Dave Badia <dbadia@…>

Attachment: mov-flip-both3 added

New patch that applies cleanly to master

comment:5 Changed 6 years ago by Dave Badia <dbadia@…>

Resolution: fixed
Status: acceptedclosed

In 60cf735196cf267226dd8f7ec937a82fb5f8d4b3/mythtv:

Fixes #9861. Rotate upside-down iPhone videos.

Thanks to David Badia for the patch (slightly modified to eliminate
compiler warnings and conform to coding standards).

This has been tested under the Slim and VDPAU Normal playback profiles.

Signed-off-by: Jim Stichnoth <jstichnoth@…>

comment:6 Changed 6 years ago by Jim Stichnoth

Milestone: unknown0.26
Note: See TracTickets for help on using tickets.