Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I'm looking at this question

Reduce size of MP4

and I want to do it using avconv, however, I'd also like to shrink the frame size by about half. My problem is when I do

avconv -i "$file" -s 640x480 -strict experimental "mp4/$file.mp4"

The output is incredibly pixelated and degrades quality of video too much. I'm trying to convert video file to smaller size for my handheld. Basically, I'm trying to get this:

Video
ID                                       : 1
Format                                   : AVC
Format/Info                              : Advanced Video Codec
Format profile                           : Main@L3.1
Format settings, CABAC                   : No
Format settings, ReFrames                : 4 frames
Format settings, GOP                     : M=2, N=48
Codec ID                                 : V_MPEG4/ISO/AVC
Duration                                 : 21mn 31s
Bit rate mode                            : Variable
Maximum bit rate                         : 1 101 Kbps
Width                                    : 1 280 pixels
Height                                   : 720 pixels
Display aspect ratio                     : 16:9
Frame rate mode                          : Variable
Frame rate                               : 23.976 fps
Standard                                 : Component
Color space                              : YUV
Chroma subsampling                       : 4:2:0
Bit depth                                : 8 bits
Scan type                                : Progressive
Default                                  : Yes
Forced                                   : No

To look like this

Video
ID                                       : 1
Format                                   : AVC
Format/Info                              : Advanced Video Codec
Format profile                           : High@L3.0
Format settings, CABAC                   : Yes
Format settings, ReFrames                : 4 frames
Codec ID                                 : avc1
Codec ID/Info                            : Advanced Video Coding
Duration                                 : 21mn 45s
Bit rate                                 : 218 Kbps
Width                                    : 624 pixels
Height                                   : 352 pixels
Display aspect ratio                     : 16:9
Frame rate mode                          : Constant
Frame rate                               : 23.976 fps
Color space                              : YUV
Chroma subsampling                       : 4:2:0
Bit depth                                : 8 bits
Scan type                                : Progressive
Bits/(Pixel*Frame)                       : 0.041
Stream size                              : 33.9 MiB (60%)
Writing library                          : x264 core 138 r2 9e941d1
Encoding settings                        : cabac=1 / ref=3 / deblock=1:0:0 / analyse=0x3:0x113 / me=hex / subme=7 / psy=1 / psy_rd=1.00:0.00 / mixed_ref=1 / me_range=16 / chroma_me=1 / trellis=1 / 8x8dct=1 / cqm=0 / deadzone=21,11 / fast_pskip=1 / chroma_qp_offset=-2 / threads=3 / lookahead_threads=1 / sliced_threads=0 / nr=0 / decimate=1 / interlaced=0 / bluray_compat=0 / constrained_intra=0 / bframes=3 / b_pyramid=2 / b_adapt=1 / b_bias=0 / direct=1 / weightb=1 / open_gop=0 / weightp=2 / keyint=250 / keyint_min=23 / scenecut=40 / intra_refresh=0 / rc_lookahead=40 / rc=crf / mbtree=1 / crf=23.0 / qcomp=0.60 / qpmin=0 / qpmax=69 / qpstep=4 / ip_ratio=1.40 / aq=1:1.00

Question: How do you reduce bit rate and frame size using avconv? If it can't be done in avconv, can it me done in ffmpeg? Video in upper part ~= 200mb, video in lower part ~=50mb, I want to get 50mb with as little pixelation as possible.

share|improve this question

2 Answers 2

up vote 2 down vote accepted

Please, whenever you ask for help with avconv, attach its full output. Otherwise whoever replies has to resort to guessing.

My guess in this situation would be that your avconv (or more precisely libavcodec) isn't compiled with libx264, so the internal mpeg4 ASP encoder (with atrocious defaults) is used. So the solution is to get libavcodec with libx264 support - on Ubuntu you should install libavcodec-extra-53, otherwise you might need to compile on your own.

share|improve this answer
    
i think ur right, i compiled ffmpeg using this guide ffmpeg.org/trac/ffmpeg/wiki/UbuntuCompilationGuide, but avconv isnt using correct libs, let me try ffmpeg when i get home and ill approve ur answer if it works –  Nik Sep 10 '13 at 1:31

I don't know avconv, but in any case you should half the original resolution. Seeing that your original resolution is 1280x720, you should use 640x360. This way the encoder has to resize exactly 4 pixels into one instead of 4.52826734 (made up) like with your chosen resolution. This at least avoids problems when the encoder doesn't have capable resizing algorithms available.

share|improve this answer
    
this is a good point as well, too bad i can't up vote, will try –  Nik Sep 10 '13 at 1:32

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.