LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 01-09-2009, 01:50 PM   #1
xnd
LQ Newbie
 
Registered: Sep 2004
Posts: 12

Rep: Reputation: 0
Question Want to compress MJPEG videos


Hi,

I have a CanonPowershot S5IS and once in a while, I like to take videos. I noticed the oversize of the .avi files. The codec used by my camera to encode the video is MJPEG.

I would like to know if you guys know a (simple?) way to compress those videos in order to make them much smaller, so I can send them to my friends/family? Any (simple?) how-to to follow?

Thanks in advance,

XND
 
Old 01-09-2009, 02:41 PM   #2
H_TeXMeX_H
LQ Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928
Blog Entries: 2

Rep: Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301
Well, the simplest way is to use avidemux.

You can also use ffmpeg or mencoder.

As I have some movies of this type taken with a digital camera, I'll show you what I do.

First run 'ffmpeg -i' on the video and get:
Code:
bash-3.1$ ffmpeg -i photo-hq.AVI
FFmpeg version SVN-r16141, Copyright (c) 2000-2008 Fabrice Bellard, et al.
...
Input #0, avi, from 'photo-hq.AVI':
  Duration: 00:01:26.80, start: 0.000000, bitrate: 8539 kb/s
    Stream #0.0: Video: mjpeg, yuvj422p, 640x480, 30.00 tb(r)
    Stream #0.1: Audio: pcm_u8, 8000 Hz, mono, s16, 64 kb/s
At least one output file must be specified
This gives you info on the video.

To compress this a bit, encode it using libx264, libxvid, mpeg4, and even flv if you find the quality acceptable.

To do this I run:
Code:
ffmpeg -i 'input.avi' -sameq -aspect 4:3 -vcodec libx264 -r 30 -ab 64k -acodec libmp3lame output.avi
You can also try other audio codecs. Run 'ffmpeg -formats'.

For more on what these options mean see the documentation:
http://ffmpeg.mplayerhq.hu/ffmpeg-doc.html

Last edited by H_TeXMeX_H; 01-09-2009 at 02:43 PM.
 
Old 01-09-2009, 02:42 PM   #3
farslayer
LQ Guru
 
Registered: Oct 2005
Location: Northeast Ohio
Distribution: linuxdebian
Posts: 7,249
Blog Entries: 5

Rep: Reputation: 191Reputation: 191
Have you looked at avidemux ? Depending on what version of Linux you are running it may be in your repositories for easy installation. This is a GUI based application that should make it fairly simple to re-encode video clips.

There are also command line options available, such as ffmpeg.





[edit]
I need to hit the submit button faster....

Last edited by farslayer; 01-09-2009 at 02:44 PM. Reason: TExMex made me look like I copied his post because I type slow.. .
 
Old 01-09-2009, 02:47 PM   #4
xnd
LQ Newbie
 
Registered: Sep 2004
Posts: 12

Original Poster
Rep: Reputation: 0
Woaw, thanks everybody. I'll try this tonight!

Thanks for your help!!!

XND
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Convert video files to MJPEG ZiTriX Linux - Software 2 12-26-2006 04:12 PM
MJPEG in Cinelerra? danielson Linux - Software 3 03-19-2006 03:25 PM
What are MJPEG-tools? How do I use them? rrrssssss Linux - Software 1 11-20-2005 06:41 AM
How do I watch mjpeg movies in windows? akihandyman Linux - Software 1 02-27-2004 02:01 PM
MJPEG support? davecs Linux - General 0 06-24-2003 03:31 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 09:21 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration