avatar
Published on

Ubuntu Some Handy Tools to Edit Audio / Video

Authors
  • Name
    Twitter

There are several tools & libraries to edit audio/video files in Linux, such as change dimensions, video converter, resize/rotate images etc.

Mainly we'll use avconv, which can be used as command line in Linux.

1. Resize / Rotate images

In Ubuntu, use nautilus-image-converter. It adds 2 new menu items, when you right click an image: resize and rotate. To install, run the command on your terminal:

sudo apt-get install nautilus-image-converter

Restart nautilus by running nautilus -q , and open your file browser. Right click on an image to see options for Resizing and Rotating.

Image

You can even resize multiple images by selecting those images, right click and Resize.


2. Trim / cut an audio or video

Use a command line tool avconv to trim audio/video. Install as:

sudo apt-get install libav-tools

To trim an audio/video run the command

avconv -i srcFileName -c:a copy -c:v copy -ss 00:03:40 -t 00:01:12 targetFileName

Time parameter is given in format hh:mm:ss

The first time parameter is the start time. The second time parameter is the duration of the clip that you want from the start time. (not the end time)


3. Change video resolution

Again avconv is used for this. (install as stated above)

For eg. to change resolution of a video to 640x480, run the command

avconv -i video.mp4 -s 640x480 output.mp4

[Note]: If the above command doesn't run and gives you a warning to run with -strict -2, Run the command as avconv -i video.mp4 -s 640x480 -strict -2 output.mp4


4. Change video format

Using avconv to change format of a video, for eg, from mov to mp4. (install as stated above)

avconv -i video.mov -strict -2 output.mp4


5. Extract audio from Video file

Using avconv, run the command

avconv -i video.mp4 -vn -f mp3 sound.mp3