Gentoo Archives: gentoo-user

From: Nikos Chantziaras <realnc@×××××.com>
To: gentoo-user@l.g.o
Subject: [gentoo-user] Re: off topic: rotating a video
Date: Mon, 16 Feb 2015 21:11:51
Message-Id: mbtme0$sms$1@ger.gmane.org
In Reply to: [gentoo-user] off topic: rotating a video by gottlieb@nyu.edu
1 On 16/02/15 22:51, gottlieb@×××.edu wrote:
2 > I apologize in advance for this off topic query.
3 >
4 > I took a video with my phone (galaxy note 4) and via google+ uploaded it
5 > to my mail laptop. It is an mp4 and plays fine on both the phone and
6 > the labtop except that it is sideways.
7 >
8 > I was surprised that neither the player on the phone nor the player on
9 > the laptop (totem, I run gnome) seems to offer a rotation option.
10 >
11 > Am I missing a slightly hidden option or do I need another program.
12 > I do not do video editing and do no plan to in the near future.
13
14 You can change the metadata of the mp4 file without re-encoding it. This
15 requires that the player you play the video in actually respects that
16 metadata though! mplayer and mpv respect it. Your phone's player might not.
17
18 You need ffmpeg for this (media-video/ffmpeg).
19
20 ffmpeg -i yourvideo.mp4 -c copy -metadata:s:v:0 rotate=90 output.mp4
21
22 This tells media players to rotate the video 90 degrees clockwise. If
23 you want to rotate 90 degrees counter-clockwise, use "rotate=270" instead.
24
25 I don't know what the command is if you're using libav instead, but I
26 suspect it has to be something similar.

Replies

Subject Author
Re: [gentoo-user] Re: off topic: rotating a video gottlieb@×××.edu