У меня есть видео для Android:
$ mediainfo 20140324_192544.mp4
General
Complete name : 20140324_192544.mp4
Format : MPEG-4
Format profile : Base Media
Codec ID : isom
File size : 7.65 MiB
Duration : 19s 861ms
Overall bit rate : 3 232 Kbps
Encoded date : UTC 2014-03-24 18:26:05
Tagged date : UTC 2014-03-24 18:26:05
Video
ID : 1
Format : AVC
Format/Info : Advanced Video Codec
Format profile : Baseline@L1.0
Format settings, CABAC : No
Format settings, ReFrames : 1 frame
Format settings, GOP : M=1, N=30
Codec ID : avc1
Codec ID/Info : Advanced Video Coding
Duration : 19s 780ms
Bit rate : 3 112 Kbps
Width : 640 pixels
Height : 480 pixels
Display aspect ratio : 4:3
Frame rate mode : Variable
Frame rate : 30.283 fps
Minimum frame rate : 18.211 fps
Maximum frame rate : 30.405 fps
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 8 bits
Scan type : Progressive
Bits/(Pixel*Frame) : 0.334
Stream size : 7.33 MiB (96%)
Title : VideoHandle
Language : English
Encoded date : UTC 2014-03-24 18:26:05
Tagged date : UTC 2014-03-24 18:26:05
Material_Duration : 19802
Material_StreamSize : 7693757
Material_FrameCount : 599
Audio
ID : 2
Format : AAC
Format/Info : Advanced Audio Codec
Format profile : LC
Codec ID : 40
Duration : 19s 861ms
Bit rate mode : Constant
Bit rate : 128 Kbps
Nominal bit rate : 96.0 Kbps
Channel(s) : 1 channel
Channel positions : Front: C
Sampling rate : 48.0 KHz
Compression mode : Lossy
Stream size : 310 KiB (4%)
Title : SoundHandle
Language : English
Encoded date : UTC 2014-03-24 18:26:05
Tagged date : UTC 2014-03-24 18:26:05
Теперь я делаю некоторые агрессивные изменения размера:
$ avconv -i 20140324_192544.mp4 -c:v libx264 -c:a copy -s:v 24x18 -b:v 3k 20140324_192544_2.mp4
avconv version 0.8.10-4:0.8.10-0ubuntu0.12.04.1, Copyright (c) 2000-2013 the Libav developers
built on Feb 6 2014 20:56:59 with gcc 4.6.3
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '20140324_192544.mp4':
Metadata:
major_brand : isom
minor_version : 0
compatible_brands: isom3gp4
creation_time : 2014-03-24 18:26:05
Duration: 00:00:19.86, start: 0.000000, bitrate: 3231 kb/s
Stream #0.0(eng): Video: h264 (Baseline), yuv420p, 640x480, 3108 kb/s, PAR 65536:65536 DAR 4:3, 30.25 fps, 90k tbr, 90k tbn, 180k tbc
Metadata:
creation_time : 2014-03-24 18:26:05
Stream #0.1(eng): Audio: aac, 48000 Hz, mono, s16, 128 kb/s
Metadata:
creation_time : 2014-03-24 18:26:05
File '20140324_192544_2.mp4' already exists. Overwrite ? [y/N] y
[buffer @ 0x1bb3000] w:640 h:480 pixfmt:yuv420p
[scale @ 0x1baf7a0] w:640 h:480 fmt:yuv420p -> w:24 h:18 fmt:yuv420p flags:0x4
[libx264 @ 0x1bcb180] using SAR=1/1
[libx264 @ 0x1bcb180] using cpu capabilities: MMX2 SSE2Fast SSSE3 Cache64 SlowCTZ SlowAtom
[libx264 @ 0x1bcb180] profile Main, level 4.2
[libx264 @ 0x1bcb180] 264 - core 120 r2151 a3f4407 - H.264/MPEG-4 AVC codec - Copyleft 2003-2011 - http://www.videolan.org/x264.html - options: cabac=1 ref=3 deblock=1:0:0 analyse=0x1:0x111 me=hex subme=7 psy=1 psy_rd=1.00:0.00 mixed_ref=0 me_range=16 chroma_me=1 trellis=1 8x8dct=0 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=3 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=0 b_adapt=1 b_bias=0 direct=1 weightb=0 open_gop=1 weightp=2 keyint=250 keyint_min=25 scenecut=40 intra_refresh=0 rc_lookahead=40 rc=abr mbtree=1 bitrate=3 ratetol=1.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.25 aq=1:1.00
Output #0, mp4, to '20140324_192544_2.mp4':
Metadata:
major_brand : isom
minor_version : 0
compatible_brands: isom3gp4
creation_time : 2014-03-24 18:26:05
encoder : Lavf53.21.1
Stream #0.0(eng): Video: libx264, yuv420p, 24x18 [PAR 1:1 DAR 4:3], q=-1--1, 3 kb/s, 180k tbn, 90k tbc
Metadata:
creation_time : 2014-03-24 18:26:05
Stream #0.1(eng): Audio: libvo_aacenc, 48000 Hz, mono, 128 kb/s
Metadata:
creation_time : 2014-03-24 18:26:05
Stream mapping:
Stream #0:0 -> #0:0 (h264 -> libx264)
Stream #0:1 -> #0:1 (copy)
Press ctrl-c to stop encoding
frame=1779206 fps=2348 q=-1.0 Lsize= 44331kB time=19.77 bitrate=18370.2kbits/s dup=1778607 drop=0
video:23072kB audio:310kB global headers:0kB muxing overhead 89.594479%
[libx264 @ 0x1bcb180] frame I:7117 Avg QP:51.00 size: 25
[libx264 @ 0x1bcb180] frame P:441244 Avg QP:51.00 size: 17
[libx264 @ 0x1bcb180] frame B:1330845 Avg QP:51.00 size: 12
[libx264 @ 0x1bcb180] consecutive B-frames: 0.0% 0.8% 0.0% 99.2%
[libx264 @ 0x1bcb180] mb I I16..4: 100.0% 0.0% 0.0%
[libx264 @ 0x1bcb180] mb P I16..4: 0.0% 0.0% 0.0% P16..4: 0.0% 0.0% 0.0% 0.0% 0.0% skip:100.0%
[libx264 @ 0x1bcb180] mb B I16..4: 0.0% 0.0% 0.0% B16..8: 0.0% 0.0% 0.0% direct: 0.0% skip:100.0%
[libx264 @ 0x1bcb180] final ratefactor: 128.61
[libx264 @ 0x1bcb180] coded y,uvDC,uvAC intra: 0.0% 38.5% 0.0% inter: 0.0% 0.0% 0.0%
[libx264 @ 0x1bcb180] i16 v,h,dc,p: 50% 0% 50% 0%
[libx264 @ 0x1bcb180] i8c dc,h,v,p: 100% 0% 0% 0%
[libx264 @ 0x1bcb180] Weighted P-Frames: Y:0.0% UV:0.0%
[libx264 @ 0x1bcb180] kb/s:9560.28
В результате получается файл размером 45 МБ:
$ mediainfo 20140324_192544_2.mp4
General
Complete name : 20140324_192544_2.mp4
Format : MPEG-4
Format profile : Base Media
Codec ID : isom
File size : 43.3 MiB
Duration : 19s 862ms
Overall bit rate mode : Variable
Overall bit rate : 18.3 Mbps
Encoded date : UTC 2014-03-24 18:26:05
Tagged date : UTC 2014-03-24 18:26:05
Writing application : Lavf53.21.1
Video
ID : 1
Format : AVC
Format/Info : Advanced Video Codec
Format profile : Main@L4.2
Format settings, CABAC : Yes
Format settings, ReFrames : 3 frames
Codec ID : avc1
Codec ID/Info : Advanced Video Coding
Duration : 19s 769ms
Bit rate : 9 563 Kbps
Nominal bit rate : 3 000 bps
Width : 24 pixels
Height : 18 pixels
Display aspect ratio : 4:3
Frame rate mode : Constant
Frame rate : 90 000.000 fps
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 8 bits
Scan type : Progressive
Bits/(Pixel*Frame) : 0.246
Stream size : 22.5 MiB (52%)
Writing library : x264 core 120 r2151 a3f4407
Encoding settings : cabac=1 / ref=3 / deblock=1:0:0 / analyse=0x1:0x111 / me=hex / subme=7 / psy=1 / psy_rd=1.00:0.00 / mixed_ref=0 / me_range=16 / chroma_me=1 / trellis=1 / 8x8dct=0 / cqm=0 / deadzone=21,11 / fast_pskip=1 / chroma_qp_offset=-2 / threads=3 / sliced_threads=0 / nr=0 / decimate=1 / interlaced=0 / bluray_compat=0 / constrained_intra=0 / bframes=3 / b_pyramid=0 / b_adapt=1 / b_bias=0 / direct=1 / weightb=0 / open_gop=1 / weightp=2 / keyint=250 / keyint_min=25 / scenecut=40 / intra_refresh=0 / rc_lookahead=40 / rc=abr / mbtree=1 / bitrate=3 / ratetol=1.0 / qcomp=0.60 / qpmin=0 / qpmax=69 / qpstep=4 / ip_ratio=1.25 / aq=1:1.00
Language : English
Encoded date : UTC 2014-03-24 18:26:05
Tagged date : UTC 2014-03-24 18:26:05
Audio
ID : 2
Format : AAC
Format/Info : Advanced Audio Codec
Format profile : LC
Codec ID : 40
Duration : 19s 862ms
Bit rate mode : Variable
Bit rate : 128 Kbps
Channel(s) : 1 channel
Channel positions : Front: C
Sampling rate : 48.0 KHz
Compression mode : Lossy
Stream size : 310 KiB (1%)
Language : English
Encoded date : UTC 2014-03-24 18:26:05
Tagged date : UTC 2014-03-24 18:26:05
Должно быть что-то не так с моими параметрами, верно !? Что я скучаю? Спасибо.