title: How to fix the size of recorded video ? Like whatsapp trim video in fixed size?
body: <p>I have recorded video and i want to trim video for specific size before saving it. 
  i cant do it with specif time but  i want to to that with fixed data size. Like whatsapp  before saving it i want to  trim the video to fixed data size.</p>
  
  <pre><code> mVideoTrimmer = ((K4LVideoTrimmer) findViewById(R.id.timeLine));
      if (mVideoTrimmer != null) {
          mVideoTrimmer.setMaxDuration(10);
       // mVideoTrimmer.setMaxSize(4);
          mVideoTrimmer.setOnTrimVideoListener(this);
          mVideoTrimmer.setOnK4LVideoListener(this);
          //mVideoTrimmer.setDestinationPath("/storage/emulated/0/DCIM/CameraCustom/");
          mVideoTrimmer.setVideoURI(Uri.parse(path));
          mVideoTrimmer.setVideoInformationVisibility(true);
      }
  }
  </code></pre>
  
  <p>And The method for the setting it to the time interval....</p>
  
  <pre><code>   public void setMaxDuration(int maxDuration) {
      mMaxDuration = maxDuration * 1000;
  }
  
  public void setMaxSize(int maxSize){
  
      mOriginSizeFile=maxSize*1024;
  
  }
  </code></pre>
  
  <p>and The calculation For the trimming for specific time interval</p>
  
  <pre><code> private void setSeekBarPosition() {
  
      if (mDuration &gt;= mMaxDuration) {
          mStartPosition = mDuration / 2 - mMaxDuration / 2;
          mEndPosition = mDuration / 2 + mMaxDuration / 2;
  
          mRangeSeekBarView.setThumbValue(0, (mStartPosition * 100) / mDuration);
          mRangeSeekBarView.setThumbValue(1, (mEndPosition * 100) / mDuration);
  
      }
  
  
      else {
          mStartPosition = 0;
          mEndPosition = mDuration;
      }
  
  
      setProgressBarPosition(mStartPosition);
      mVideoView.seekTo(mStartPosition);
  
      mTimeVideo = mDuration;
      mRangeSeekBarView.initMaxWidth();
  }
  </code></pre>
  
  <p>Now  i want to that with size.....</p>