Ubuntu Reduce Video Size

broken image



  1. Ubuntu Reduce Video Size Conversion
  2. Ubuntu Reduce Video Size Chart
  3. Ubuntu Reduce Video Size Reducer

HANDBREAK - Excellent tool for converting videos and optimizing size. I use it a lot when going from ogg to mp4 with h.264. Lowers A LOT the size. Handbreak OPENSHOT & PITIVI - Both are good video editors tha can help lower size when rendering the video. Openshot and pitivi VLC. A dialog will open where the new size can be chosen. The filesystem will be mounted to calculate the minimum size by the amount of current content. If shrinking is not supported the minimum size is the current size. Leave enough space within the filesystem when shrinking to ensure that it can work fast and reliably.

I faced this particular problem yesterday. We had the Annual fest of HSBC Analytics @ Bangalore, where our friends and colleagues gave some enthralling performances. I captured dozens of videos in my 14 megapixel Nikon D-90 with the hope that I'll upload them to YouTube for others too see. But, to my horror I discovered that each video is over 300 mb (4-5 min. of run time each). A particular video was 700 mb and it ran for 10 min.! How do I ever upload them to YouTube because it only allows 100 mb of upload per attempt? Splitting is not an option as it will ruin the fun.
So, a bit of research took me to ffmpeg

Ubuntu Reduce Video Size Conversion

- to install ffmpeg, if it is already not there in your system, you need to hit the terminal and type

Ubuntu Reduce Video Size Chart

sudo apt-get install ffmpeg
It was already installed in my system (Ubuntu 11.04) and hence, I did not run this command.
Once installed, on the terminal change directory (using cd) to the location where the video files are dumped. Next step is very simple - just type in the following command:
ffmpeg -i DSCN3085.AVI -ab 56k -ar 22050 -b 300k -r 15 -s 480x360 DSCN3085.flv
Ubuntu Reduce Video Size

Ubuntu reduce video size reducer

Replace DSCN3085.AVI with the file name and the format it is in and replace the output file name DSCN3085.flv with the desired output file name and the format. I want to upload these videos to YouTube and hence, flv format suits me perfect. The transformation was amazing - watching the videos it was difficult to distinguish between the original and the copy. Apart from intact picture quality and sound clarity, my 700 mb file got reduced to only 29 mb!
P.N.: You can replace 480x360 in the code with 320x240 as well if you want to reduce it further. Also, you can transform to and fro in the following formats: VOB, AVI, MPEG, FLV, DIVD-X, mp4, etc. Give it a try!

Much to some readers annoyance I have to compress and resize almost every image that appears on this blog. If I didn't …Well, you can imagine what loading a page full of 2.3MB PNG Budgie desktop screenshots would be like!

There are a multitude of ways you can reduce jpg and png image file size on Ubuntu. You can use proper image editing software like GIMP or a photo manager like Shotwell, or turn to the command line to do batch processing of multiple files to a given criteria.

Another way, and one I'm highlighting today, is using a Nautilus script. This is one of my go-to methods to resize full-size screenshots. With a simple right-click on any jpg or png I resize them to a given width and export them to a format that delivers best quality:size — and then upload 'em here.

This Nautilus script is the work of Spanish Linux team Atareao (perhaps most famous for stat-packed weather indicator). It's called ‘reduceimages' and it can:

  • Reduce images (constrained), with border added if needed
  • Opt to add a border to all images
  • Choose background color (i.e. useful if image is transparent PNG)
  • Reduce JPEG quality
  • Convert PNG to JPG
  • Overwrite existing image

If you fancy taking it for a spin to see if it can slot in to your workflow, you can.

Ubuntu Reduce Video Size Reducer

Pop open a Terminal window and run the command below to add the Atareao PPA to your Software Sources. This PPA provides packages for Ubuntu 16.04 LTS and above:

Next update your list of packages and install the ‘nautilus-reduceimages' script:

Finally, restart Nautilus using nautilus -q so that the script you just installed will be available in the right-click menu of Nautilus when you right-click on a compatible image file (either a jpg or a png).

This menu lets you select one of two options:

  • Reduce file size
  • Configurator

Although translated oddly it is the second option you'll want to use first. This lets you configure exactly how images are reduced and resized:

You can always tweak these settings before running the script, otherwise it simply processes images using whatever settings you entered last.

While this script is useful (to me at least!) it has a few drawbacks. The biggest is that it keeps images constrained when resizing, adding a border/background as an offset.

So, if you try to resize a 1440×900 screenshot to, I don't know, 720×50 using this script it will do this:

Instead of this:

Which, depending on what you need, might be of benefit or bane.

For more precise image resizing and quality reduction you will still need to use something more advanced than a simple script.

But for rough and ready file reductions and resizing, perfect for sharing on social media and on blogs, this Nautilus script gives you a fast and fuss-free solution.

Let us know your thoughts!





broken image