1 |
On Mon, Feb 16 2015, Nikos Chantziaras wrote: |
2 |
|
3 |
> On 16/02/15 22:51, gottlieb@×××.edu wrote: |
4 |
>> I apologize in advance for this off topic query. |
5 |
>> |
6 |
>> I took a video with my phone (galaxy note 4) and via google+ uploaded it |
7 |
>> to my mail laptop. It is an mp4 and plays fine on both the phone and |
8 |
>> the labtop except that it is sideways. |
9 |
>> |
10 |
>> I was surprised that neither the player on the phone nor the player on |
11 |
>> the laptop (totem, I run gnome) seems to offer a rotation option. |
12 |
>> |
13 |
>> Am I missing a slightly hidden option or do I need another program. |
14 |
>> I do not do video editing and do no plan to in the near future. |
15 |
> |
16 |
> You can change the metadata of the mp4 file without re-encoding |
17 |
> it. This requires that the player you play the video in actually |
18 |
> respects that metadata though! mplayer and mpv respect it. Your |
19 |
> phone's player might not. |
20 |
|
21 |
Not worried about the phone. I won't touch the file there and will |
22 |
probably delete it when I get the one right on the laptop. |
23 |
|
24 |
> You need ffmpeg for this (media-video/ffmpeg). |
25 |
|
26 |
That I have (1.2.6-r1, highest stable). |
27 |
|
28 |
> ffmpeg -i yourvideo.mp4 -c copy -metadata:s:v:0 rotate=90 output.mp4 |
29 |
|
30 |
I did this command but the result is not rotated (my player is totem). |
31 |
There was a warning issued. Below is the command I used and the |
32 |
on-screen output. The resulting mp4 file plays fine but is not rotated. |
33 |
|
34 |
What did I do wrong? |
35 |
|
36 |
thanks again, |
37 |
allan |
38 |
|
39 |
|
40 |
|
41 |
|
42 |
newlap tmp # ffmpeg -i orig.mp4 -c copy -metadata:s:v:0 rotate=90 r90.mp4 |
43 |
ffmpeg version 1.2.6 Copyright (c) 2000-2014 the FFmpeg developers |
44 |
built on Feb 3 2015 14:21:53 with gcc 4.8.3 (Gentoo 4.8.3 p1.1, pie-0.5.9) |
45 |
configuration: --prefix=/usr --libdir=/usr/lib64 --shlibdir=/usr/lib64 --mandir=/usr/share/man --enable-shared --cc=x86_64-pc-linux-gnu-gcc --cxx=x86_64-pc-linux-gnu-g++ --ar=x86_64-pc-linux-gnu-ar --optflags='-march=native -O2 -pipe' --extra-cflags='-march=native -O2 -pipe' --extra-cxxflags='-march=native -O2 -pipe' --disable-static --enable-gpl --enable-postproc --enable-avfilter --enable-avresample --disable-stripping --enable-version3 --disable-indev=v4l2 --disable-indev=oss --disable-indev=jack --disable-outdev=oss --enable-bzlib --disable-runtime-cpudetect --disable-debug --disable-doc --disable-gnutls --enable-hardcoded-tables --enable-iconv --enable-network --disable-openssl --enable-ffplay --disable-vaapi --disable-vdpau --enable-zlib --enable-libvo-aacenc --disable-libvo-amrwbenc --enable-libmp3lame --disable-libfdk-aac --disable-libaacplus --disable-libfaac --disable-libtheora --disable-libtwolame --enable-libx264 --enable-libxvid --disable-libcdio --disable-libiec61883 --disable-libdc1394 --dis libavutil 52. 18.100 / 52. 18.100 |
46 |
libavcodec 54. 92.100 / 54. 92.100 |
47 |
libavformat 54. 63.104 / 54. 63.104 |
48 |
libavdevice 54. 3.103 / 54. 3.103 |
49 |
libavfilter 3. 42.103 / 3. 42.103 |
50 |
libswscale 2. 2.100 / 2. 2.100 |
51 |
libswresample 0. 17.102 / 0. 17.102 |
52 |
libpostproc 52. 2.100 / 52. 2.100 |
53 |
[h264 @ 0x122e340] Warning: not compiled with thread support, using thread emulation |
54 |
[aac @ 0x122f070] Warning: not compiled with thread support, using thread emulation |
55 |
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'orig.mp4': |
56 |
Metadata: |
57 |
major_brand : isom |
58 |
minor_version : 0 |
59 |
compatible_brands: isom3gp4 |
60 |
creation_time : 2015-02-08 21:30:20 |
61 |
Duration: 00:05:44.94, start: 0.000000, bitrate: 17240 kb/s |
62 |
Stream #0:0(eng): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1920x1080, 16996 kb/s, 29.91 fps, 29.92 tbr, 90k tbn, 180k tbc |
63 |
Metadata: |
64 |
rotate : 90 |
65 |
creation_time : 2015-02-08 21:30:20 |
66 |
handler_name : VideoHandle |
67 |
Stream #0:1(eng): Audio: aac (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 250 kb/s |
68 |
Metadata: |
69 |
creation_time : 2015-02-08 21:30:20 |
70 |
handler_name : SoundHandle |
71 |
Output #0, mp4, to 'r90.mp4': |
72 |
Metadata: |
73 |
major_brand : isom |
74 |
minor_version : 0 |
75 |
compatible_brands: isom3gp4 |
76 |
encoder : Lavf54.63.104 |
77 |
Stream #0:0(eng): Video: h264 ([33][0][0][0] / 0x0021), yuv420p, 1920x1080, q=2-31, 16996 kb/s, 29.91 fps, 90k tbn, 90k tbc |
78 |
Metadata: |
79 |
handler_name : VideoHandle |
80 |
creation_time : 2015-02-08 21:30:20 |
81 |
rotate : 90 |
82 |
Stream #0:1(eng): Audio: aac ([64][0][0][0] / 0x0040), 48000 Hz, stereo, 250 kb/s |
83 |
Metadata: |
84 |
creation_time : 2015-02-08 21:30:20 |
85 |
handler_name : SoundHandle |
86 |
Stream mapping: |
87 |
Stream #0:0 -> #0:0 (copy) |
88 |
Stream #0:1 -> #0:1 (copy) |
89 |
Press [q] to stop, [?] for help |
90 |
frame= 7166 fps=0.0 q=-1.0 size= 504481kB time=00:03:59.68 bitrate=17242.6kbitsframe=10311 fps=0.0 q=-1.0 Lsize= 726141kB time=00:05:44.93 bitrate=17245.2kbits/s |
91 |
video:715245kB audio:10529kB subtitle:0 global headers:0kB muxing overhead 0.050533% |
92 |
newlap tmp # ffmpeg -i orig.mp4 -c copy -metadata:s:v:0 rotate=90 r90.mp4 |