Package: medipack
MEDIPACKMedipack isMedia + Package, A command-line tool used totrim,crop,resizemedia files.
It can also be used toextractoutaudioorvideofrom a media file.InstallationInstall using pip (Recommended)sudo python3 -m pip install medipackyou may use--useroption to install locally for user only in~/.local/binpython3 -m pip install medipack --userdon't forget~/.local/binshould be in yourPATH. Add lineexport PATH=$PATH:"~/.local/bin"in your.bashrcBuild from SourceClone the repository and checkout to stable commit- git clone https://github.com/srbcheema1/medipack
- cd medipack
- git checkout <latest_version say: v0.0.x>
- `python3 setup.py install --user`install requirementspython3 -m pip install --user -r requirements.txtInstall Medipackpython3 setup.py install --userVerify installationcheck for workingmedipack -hif it displays help message you are ready to go.troubleshootingIn casemedipack -his not working, ensure that binary path is in PATH.
Add lineexport PATH=$PATH:"~/.local/bin"in your~/.bashrcor~/.zshrc.bash users run these commandsecho export PATH="$PATH":"~/.local/bin" >> ~/.bashrc
source ~/.bashrczsh users run these commandsecho export PATH="$PATH":"~/.local/bin" >> ~/.zshrc
source ~/.zshrcUsagesrb@srb-pc:$ medipack --help
usage: medipack.py [-h] [-v] {trim,crop,resize,extract} ...

positional arguments:
  {trim,crop,resize,extract}

optional arguments:
  -h, --help            show this help message and exit
  -v, --version         Display version numbersuboptions are:
    trim        trim a video/audio file from given starting point to given ending point.
    crop        crop frame window of video.
    resize      resize the file by reducing video quality. to make small size video files.
    extract     extract audio-only or video-only file from media fileFor more help regarding suboptions run:

medipack trim -h
medipack crop -h
medipack resize -h
medipack extract -hSupported formatsmp4mp3supported actionstrimcropresizeextractExamplestrimsrb@srb-pc:$ medipack trim -h
usage: medipack trim [-h] [-s START] [-e END | -t TIME] [-o OUTPUT] [inp]

positional arguments:
  inp                   input video file ex: input.mp4

optional arguments:
  -h, --help            show this help message and exit
  -s START, --start START
                        start time for cuting in format hh:mm:ss or mm:ss
  -e END, --end END     end time for cuting in format hh:mm:ss or mm:ss
  -t TIME, --time TIME  clip duration in format hh:mm:ss or mm:ss
  -o OUTPUT, --output OUTPUTtrimming a video from 01:04 to 14:08medipack trim input.mp4 -s 01:04 -e 14:08 -o output.mp4
medipack trim input.mp4 -s 01:04 -t 13:04 -o output.mp4
medipack trim input.mp4 -s 01:04 -e 14:08
medipack trim input.mp4 -s 01:04 -t 13:04
medipack trim input.mp4
medipack trimtrimming an audio from 01:04 to 14:08medipack trim input.mp3 -s 01:04 -e 14:08 -o output.mp3cropsrb@srb-pc:$ medipack crop -h
usage: medipack crop [-h] [-t TOP] [-b BOTTOM] [-l LEFT] [-r RIGHT]
                     [-o OUTPUT]
                     [inp]

positional arguments:
  inp                   input video file ex: input.mp4 (default: None)

optional arguments:
  -h, --help            show this help message and exit
  -t TOP, --top TOP     percentage of screen to be chopped from top (default: 0)
  -b BOTTOM, --bottom BOTTOM
                        percentage of screen to be chopped from bottom (default: 0)
  -l LEFT, --left LEFT  percentage of screen to be chopped from left (default: 0)
  -r RIGHT, --right RIGHT
                        percentage of screen to be chopped from right (default: 0)
  -o OUTPUT, --output OUTPUT
                        output file name, ex: output.mp4 (default: None)To crop the bottom right quarter of a video windowmedipack crop input.mp4 -t 50 -l 50 -o output.mp4
medipack crop input.mp4 -t 50 -l 50To crop away top 10% of areamedipack crop input.mp4 -t 10 -o output.mp4To crop away right 20% of the areamedipack crop input.mp4 -r 20 -o output.mp4To crop away top 10% of area and right 20% of the areamedipack crop input.mp4 -t 10 -r 20 -o output.mp4resizesrb@srb-pc:$ medipack resize -h
usage: medipack resize [-h] [-q QUALITY] [-o OUTPUT] [inp]

positional arguments:
  inp                   input video file ex: input.mp4

optional arguments:
  -h, --help            show this help message and exit
  -q QUALITY, --quality QUALITY
                        output video quality (on scale of 100) (default: 50)
  -o OUTPUT, --output OUTPUT
                        output file name, ex: output.mp4To resize a video to reduce its sizemedipack resize input.mp4 -q 40 -o output.mp4
medipack resize input.mp4 -q 40extractsrb@srb-pc:$ medipack extract -h
usage: medipack extract [-h] (-v | -a) [-o OUTPUT] [inp]

positional arguments:
  inp                   input video file ex: input.mp4

optional arguments:
  -h, --help            show this help message and exit
  -v, --video
  -a, --audio
  -o OUTPUT, --output OUTPUT
                        output file nameTo extract audio from media filemedipack extract --audio input.mp4 -o output.mp3
medipack extract --audio input.mp4To extract video from media filemedipack extract input.mp4 --video -o output.mp4
medipack extract input.mp4 --videoNoteFor audio-input files only trim action is supported.If you dont provide output file then the outputfile will be names as _output. for base.extension file. [exceptextractoption in this output file will get name .mp3 by default]You may skip options, medikit is smart enough to detect or ask you the required options as per requirementIn case of any bug/issue, Please report this tosrbcheema2@gmail.com. Or, even better, submit a PR to fix it!Contact / Social MediaDevelopment byDeveloper / Author:Srb Cheema