I'm a newbie in video editing on linux and am trying to rotate a video I took with my phone using AVCONV on an Ubuntu 12.04 machine. It all seems to go honky dory except the output is losing quality.
The original video is 1920 x 1080 - 30fps - 1:47 long - 270MB
I initially attempted converting by running:
avconv -i in.mp4 -strict experimental -vf transpose=1 out.mp4
After seeing poor results I enforced frame rate, frame size and compression:
avconv -i in.mp4 -strict experimental -vf transpose=1 -r 30 -s hd1080 -qcomp 1 out.mp4
the resulting video compresses down to 45MB (from 270MB) and is really pixelated. Can you tell me how to avoid this and maintain the original quality of the video?
Here's what the converter spits out:
avconv version 0.8.16-4:0.8.16-0ubuntu0.12.04.1, Copyright (c) 2000-2014 the Libav developers
built on Sep 16 2014 18:33:49 with gcc 4.6.3
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'tractor_powered_cable-car.mp4':
Metadata:
major_brand : isom
minor_version : 0
compatible_brands: isom3gp4
creation_time : 2015-01-01 10:28:17
Duration: 00:01:47.34, start: 0.000000, bitrate: 20145 kb/s
Stream #0.0(eng): Video: h264 (High), yuv420p, 1920x1080, 19974 kb/s, PAR 65536:65536 DAR 16:9, 29.99 fps, 90k tbr, 90k tbn, 180k tbc
Metadata:
creation_time : 2015-01-01 10:28:17
Stream #0.1(eng): Audio: aac, 48000 Hz, stereo, s16, 155 kb/s
Metadata:
creation_time : 2015-01-01 10:28:17
File 'out.mp4' already exists. Overwrite ? [y/N] Y
[buffer @ 0x21940e0] w:1920 h:1080 pixfmt:yuv420p
[transpose @ 0x218dcc0] w:1920 h:1080 dir:1 -> w:1080 h:1920 rotation:clockwise vflip:0
Output #0, mp4, to 'out.mp4':
Metadata:
major_brand : isom
minor_version : 0
compatible_brands: isom3gp4
creation_time : 2015-01-01 10:28:17
encoder : Lavf53.21.1
Stream #0.0(eng): Video: mpeg4, yuv420p, 1080x1920 [PAR 1:1 DAR 9:16], q=2-31, 200 kb/s, 30 tbn, 30 tbc
Metadata:
creation_time : 2015-01-01 10:28:17
Stream #0.1(eng): Audio: aac, 48000 Hz, stereo, s16, 200 kb/s
Metadata:
creation_time : 2015-01-01 10:28:17
Stream mapping:
Stream #0:0 -> #0:0 (h264 -> mpeg4)
Stream #0:1 -> #0:1 (aac -> aac)
Press ctrl-c to stop encoding
frame= 3218 fps= 46 q=31.0 Lsize= 44341kB time=107.27 bitrate=3386.3kbits/s dup=1 drop=0
video:41833kB audio:2441kB global headers:0kB muxing overhead 0.150674%
Thanks, Shakus