VideoHelp Forum
+ Reply to Thread
Results 1 to 6 of 6
Thread
  1. I'm trying to reduce the size of a video.

    The source is mp4 (avc)
    Source :
    General
    Complete name : C:\encode\someVideo.mp4
    Format : MPEG-4
    Codec ID : M4V
    File size : 685 MiB
    Duration : 1h 2mn
    Overall bit rate mode : Variable
    Overall bit rate : 1 532 Kbps
    Encoded date : UTC 2014-01-21 21:59:24
    Tagged date : UTC 2014-01-21 21:59:24

    Video
    ID : 1
    Format : AVC
    Format/Info : Advanced Video Codec
    Format profile : Baseline@L3.2
    Format settings, CABAC : No
    Format settings, ReFrames : 2 frames
    Codec ID : avc1
    Codec ID/Info : Advanced Video Coding
    Duration : 1h 2mn
    Bit rate mode : Constant
    Bit rate : 1 400 Kbps
    Maximum bit rate : 3 176 Kbps
    Width : 960 pixels
    Height : 540 pixels
    Display aspect ratio : 16:9
    Frame rate mode : Constant
    Frame rate : 29.970 fps
    Color space : YUV
    Chroma subsampling : 4:2:0
    Bit depth : 8 bits
    Scan type : Progressive
    Bits/(Pixel*Frame) : 0.090
    Stream size : 626 MiB (91%)
    Encoded date : UTC 2014-01-21 21:59:24
    Tagged date : UTC 2014-01-21 21:59:24

    Audio
    ID : 2
    Format : AAC
    Format/Info : Advanced Audio Codec
    Format profile : LC
    Codec ID : 40
    Duration : 1h 2mn
    Bit rate mode : Variable
    Bit rate : 128 Kbps
    Maximum bit rate : 138 Kbps
    Channel(s) : 2 channels
    Channel positions : Front: L R
    Sampling rate : 44.1 KHz
    Compression mode : Lossy
    Stream size : 56.2 MiB (8%)
    Encoded date : UTC 2014-01-21 21:59:24
    Tagged date : UTC 2014-01-21 21:59:24

    Im trying to reduce its size by reencoding it with low bitrate (crf of 22)

    I'm using Handbrake to do this. Here's my cmdLine :

    handbrakecli -i "C:\encode\someVideo.mp4" -f "mkv" --encoder "x264" --x264-preset "ultrafast" --x264-tune "film" --quality "22" --aencoder "copy" -o "C:\encode\someVideo.mkv"


    All I want is to reduce the filesize. But Handbrake is changing the height of the video.

    Here is the mediaInfo of the output video :
    Output Video :
    General
    Unique ID : 147862266883122470173661100523323077491 (0x6F3D3C9B392480C4EC0146B0A7D33373)
    Complete name : C:\encode\someVideo.mkv
    Format : Matroska
    Format version : Version 2
    File size : 74.3 MiB
    Duration : 3mn 43s
    Overall bit rate : 2 789 Kbps
    Writing application : HandBrake 0.9.8
    Writing library : libmkv 0.6.5

    Video
    ID : 1
    Format : AVC
    Format/Info : Advanced Video Codec
    Format profile : Baseline@L3.1
    Format settings, CABAC : No
    Format settings, ReFrames : 1 frame
    Codec ID : V_MPEG4/ISO/AVC
    Duration : 3mn 43s
    Width : 960 pixels
    Height : 544 pixels
    Display aspect ratio : 16:9
    Frame rate mode : Variable
    Frame rate : 29.970 fps
    Color space : YUV
    Chroma subsampling : 4:2:0
    Bit depth : 8 bits
    Scan type : Progressive
    Writing library : x264 core 120
    Encoding settings : cabac=0 / ref=1 / deblock=0:-1:-1 / analyse=0:0 / me=dia / subme=0 / psy=1 / psy_rd=1.00:0.15 / mixed_ref=0 / me_range=16 / chroma_me=1 / trellis=0 / 8x8dct=0 / cqm=0 / deadzone=21,11 / fast_pskip=1 / chroma_qp_offset=0 / threads=3 / sliced_threads=0 / nr=0 / decimate=1 / interlaced=0 / bluray_compat=0 / constrained_intra=0 / bframes=0 / weightp=0 / keyint=300 / keyint_min=30 / scenecut=0 / intra_refresh=0 / rc=crf / mbtree=0 / crf=22.0 / qcomp=0.60 / qpmin=3 / qpmax=69 / qpstep=4 / ip_ratio=1.40 / aq=0
    Language : English
    Default : Yes
    Forced : No
    Color primaries : BT.601-6 525, BT.1358 525, BT.1700 NTSC, SMPTE 170M
    Transfer characteristics : BT.709-5, BT.1361
    Matrix coefficients : BT.601-6 525, BT.1358 525, BT.1700 NTSC, SMPTE 170M

    Audio
    ID : 2
    Format : AAC
    Format/Info : Advanced Audio Codec
    Format profile : LC
    Codec ID : A_AAC
    Duration : 3mn 43s
    Channel(s) : 2 channels
    Channel positions : Front: L R
    Sampling rate : 44.1 KHz
    Compression mode : Lossy
    Default : Yes
    Forced : No
    Ignore the Video Duration (I terminated the process as soon as i saw that handbrake changed the height.)

    As you can see, the height changed from 540px (in source video) to 544px (in output video).

    My question is : "Why is Handbrake changing the height of the video ?"

    I play these video in my 1920x1080 monitor.
    I don't see any black borders in the source file.
    But i see Black borders on left and right side of the output video.

    How do i instruct Handbrake not to change the height ?
    And, why is it changing the height ? I'm pretty sure that there is some explanation to this, can you please tell me what it is ?

    Thanks
    Quote Quote  
  2. Member
    Join Date
    Sep 2012
    Location
    Australia
    Search Comp PM
    540 isn't divisible by 16, by default handbrake produces mod16 output. You'll need to find the command to disable loose anamorphic and apply strict anamorphic instead.
    Quote Quote  
  3. Member
    Join Date
    Sep 2012
    Location
    Australia
    Search Comp PM
    --strict-anamorphic

    or

    --modulus 2

    should do it.
    Quote Quote  
  4. Member
    Join Date
    Mar 2011
    Location
    Nova Scotia, Canada
    Search Comp PM
    If you don't understand anamophism look it up on handbrake's site docs. They're actually amazingly good. I know of very few programs that you pay for with docs that nice.
    Quote Quote  
  5. I would avoid using mod 2. Some devices can't play it properly. Stick with mod 4 or mod 8. Mod 16 to be safest.
    Quote Quote  
  6. Member
    Join Date
    Sep 2012
    Location
    Australia
    Search Comp PM
    540 is 12 off Mod 16, so that particular video would require --modulus 4 or less to avoid resizing, however, strict itself is mod 2 so loose mod 2 would be pretty much exactly the same thing. I believe the OP wanted to avoid the resizing of any of his videos, in which case either would do, and compatibility only becomes an issue if it affects his particular device or if he intends to distribute the file to a wider audience.
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!