viddl - Command Line tool to Edit (cut, crop and resize) Video Clips

Channel: Linux
Abstract: the following command will start the video at 10 seconds into the original video and stop at 15 seconds viddl httpsv=UKlkIzD-Yj8 --cx 20 --cy 20 --cw

Viddl is a ruby command line utility that can be used to download video from youtube. You can easily download, cut, crop and resize video clips using Viddl.

In this tutorial, we will see how to install Viddl on CentOS 7. Then we will see how to downlaod, cut, crop and resize youtube video using Viddl.

Requirements
  • A system running CentOS 7 Desktop or Server with working internet connection.
  • A root password setup in your system.
Getting Started

Before starting, you will need to install EPEL repository in your system.

Online Video Editor: discover six e...

To view this video please enable JavaScript, and consider upgrading to a web browser that supports HTML5 video

Online Video Editor: discover six easy-to-use sites

Login to root user and run the following command to install EPEL repo:

yum install epel-release -y

Once EPEL is installed, update your system with the latest stable version with the following command:

yum update -y
Install Required Packages

Before installing Viddl, you will need to install ffmpeg and youtube-dl in your system.

By default, ffmpeg is not available in CentOS 7 repository. So you will need to install Nux Dextop repo in order to install Viddl.

You can install it with the following command:

rpm --import http://li.nux.ro/download/nux/RPM-GPG-KEY-nux.ro
rpm -Uvh http://li.nux.ro/download/nux/dextop/el7/x86_64/nux-dextop-release0-1.el7.nux.noarch.rpm

You should see the following output:

Retrieving http://li.nux.ro/download/nux/dextop/el7/x86_64/nux-dextop-release-0-1.el7.nux.noarch.rpm
Preparing... ################################# [100%]
Updating / installing...
1:nux-dextop-release-0-1.el7.nux ################################# [100%]

Once the Nux Desktop repository is installed, run the following command to install ffmpeg:

yum install ffmpeg ffmpeg-devel -y

Next, install youtube-dl with the following command:

yum install youtube-dl -y
Install Viddl

You can install Viddl using gem command. Gem is a package management framework for Ruby.

First, install gem with the following command:

yum install gem -y

Next, install Viddl by running the following command:

gem install viddl
Working with Viddl

Viddl is now installed in your system. Let's see some example and usage of viddl command line tool.

You can see different viddl command line options with the following command:

viddl --help

You should see the following output:

    Usage: viddl [url] [options]
    -d, --duration=DURATION          Duration
    -e, --end=END                    End time
    -s, --start=START                Start time
    -w, --width=WIDTH                Width
    -h, --height=HEIGHT              Height
        --cx=CX                      Crop X
        --cy=CY                      Crop Y
        --cw=CWIDTH                  Crop Width
        --ch=CHEIGHT                 Crop Height
        --no-audio                   No audio
        --help                       Show this message

To download full video from youtube, run the following command with no option:

viddl https://www.youtube.com/watch?v=UKlkIzD-Yj8

The above command will download and save the file in /tmp directory.

Next, run the following command to start the video at 10 seconds into the original video and run for five seconds:

viddl https://www.youtube.com/watch?v=UKlkIzD-Yj8 -s 10 -d 5

Same way, the following command will start the video at 10 seconds into the original video and stop at 15 seconds

viddl https://www.youtube.com/watch?v=UKlkIzD-Yj8 -s 10 -e 15

Next, resize the video to 640 x 480 size with the following command:

viddl https://www.youtube.com/watch?v=UKlkIzD-Yj8 -w 640 -h 480

If you want to crop a video in 40 x 40 pixel box at position 20 x 20, run the following command:

viddl https://www.youtube.com/watch?v=UKlkIzD-Yj8 --cx 20 --cy 20 --cw 40 --ch 40

To download the video without audio, run the following command:

viddl https://www.youtube.com/watch?v=UKlkIzD-Yj8 --no-audio
Conclusion

Congratulations! you have successfully installed Viddl on CentOS 7 server. I hope you have now enough knowledge to install and use Viddl. Feel free to comments me if you have any questions.

Ref From: linoxide
Channels:

Related articles