LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 06-19-2006, 03:29 AM   #1
mshahwan
Member
 
Registered: Jul 2004
Distribution: SusE 9.1
Posts: 37

Rep: Reputation: 15
Best video Encoding (compression Vs. Quality)


After a long net search i came out to a conclusion. there is no documentations or comparission done on different video encoding codecs out there. while the audio onces are very well tested and documented the video counter part is rarely compared. The fact that there is SO many video codecs out there does not make this task any easier, so im starting this threat to find once and for all the best compression algorithm out there. although there are lots of programs that claim to be the fastest and the best , the fact is the end file is the actual result. personally I have made my choice and it is MENCODER. here is the codecs to be considered:

1- lavc
2- xvid
3- divx
4- x264

and the list goes on. if anybody has and insight on the topic please feel free to share the knowledge.
 
Old 06-19-2006, 04:36 AM   #2
lowebb
Member
 
Registered: Aug 2005
Location: Ireland
Distribution: Ubuntu, Ubuntu, Ubuntu
Posts: 119

Rep: Reputation: 15
From 'the word' on the street I hear, I think its hard to beat xvid is it not?
 
Old 06-19-2006, 05:17 AM   #3
theYinYeti
Senior Member
 
Registered: Jul 2004
Location: France
Distribution: Arch Linux
Posts: 1,897

Rep: Reputation: 66
Relying on MPlayer online documentation (which you MUST read, if you want to know the basics):
- divx: forget it! It is old, proprietary, and non-standard.
- xvid: better than divx, still with limitations.
- mpeg4: the current best choice.
- x264: the future best choice (when more appliances and software will handle it fine).

As for the other codecs, most seem specialized and not worth it, unless you have very slow hardware (nuppel) or you want DVD/SVCD compatibility (mpeg2) or VCD compatibility (mpeg1).

Yves.
 
Old 06-19-2006, 05:32 AM   #4
JunctaJuvant
Member
 
Registered: May 2003
Location: Wageningen, the Netherlands
Distribution: OS X & Linux Mint
Posts: 488

Rep: Reputation: 31
I recommend Doom9 for the latest codec shoot-out
I hope that helps.
 
Old 06-19-2006, 05:42 AM   #5
Emerson
LQ Sage
 
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~amd64
Posts: 7,661

Rep: Reputation: Disabled
A slight correction.

MPEG-4 codecs:

The only reason to use DivX is it has easy-to-use software for Windows users. As theYinYeti said, it is non-standard and lacks plenty of features. Unfortunately those DivX-certified hardware players have limitations too and are not fully MPEG-4 compatible.
XviD and lavcodec (aka FFmpeg) are good and mature MPEG-4 codecs.

AVC (aka H.264) complies to MPEG-4 Part 10 standard. Free AVC codec for Linux users is x264. Again, as said above, it is the future. Best quality, requires quite a processing power to encode.
 
Old 06-19-2006, 08:02 AM   #6
lowebb
Member
 
Registered: Aug 2005
Location: Ireland
Distribution: Ubuntu, Ubuntu, Ubuntu
Posts: 119

Rep: Reputation: 15
DivX and Xvid use the MPEG-4 codec so how can MPEG-4 be better?
 
Old 06-19-2006, 08:16 AM   #7
Emerson
LQ Sage
 
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~amd64
Posts: 7,661

Rep: Reputation: Disabled
MPEG-4 is the STANDARD. There is no codec called MPEG-4.

Edit: Technically you can call all of them MPEG-4 because they aim to be MPEG-4 standard compliant.

Last edited by Emerson; 06-19-2006 at 08:17 AM.
 
Old 06-21-2006, 05:36 PM   #8
mshahwan
Member
 
Registered: Jul 2004
Distribution: SusE 9.1
Posts: 37

Original Poster
Rep: Reputation: 15
Well MPEG is a container format not a codec. xvid is a codec. You can have mpeg container but encode using xvid or so that is what I understand. As far as MPlayer and Mencoder the best container format is AVI hands down. Now we have no established a comparision parameters so we will be looking at different codecs and comparing:
#1 Size Vs quality.
#2 encoding Speed.


divx produces very small files which is awesome but the quality does suffer compared to xvid encoding. but xvid almost doubles the file size even if I limit the sampling frequency or video bitrate. i have not tryed x264 yet but i will and i'l keep you guys posted.


p.s thanks for the doom9 link, this is very useful.
 
Old 06-22-2006, 04:52 AM   #9
lowebb
Member
 
Registered: Aug 2005
Location: Ireland
Distribution: Ubuntu, Ubuntu, Ubuntu
Posts: 119

Rep: Reputation: 15
Quote:
Originally Posted by mshahwan
Well MPEG is a container format not a codec. xvid is a codec. You can have mpeg container but encode using xvid or so that is what I understand.
I'm pretty sure MPEG is the codec, MPEG-4 has higher compression than MPEG-2 and requires higher processing power. MPEG-2 was solely a codec and needs a transport stream of some sort to deliver it. MPEG-4 is a 'container' as well as a codec and other things. There are 10(?) parts to MPEG-4 these include, 2 codecs (MPEG-4 and H264 (MPEG-4 part 10), system standard, delivery standard and so on.

MPEG-2 can use the MPEG-4 delivery standard as a transportation stream as I understand it.

Xvid and DivX uses MPEG-4 to encode files, not as a container, it is 'their' particular implementation of the codec which may differ slightly along with its configuration but they MUST follow strict guidlines on the format of the stream so ALL players can play the files when the appropriate codecs are installed.

That my understanding of it
 
Old 06-22-2006, 07:04 AM   #10
theYinYeti
Senior Member
 
Registered: Jul 2004
Location: France
Distribution: Arch Linux
Posts: 1,897

Rep: Reputation: 66
MPEG is an "Experts Group" for "Motion Picture". They regularly create new standards. Usually, Each standard number defines a container format, a video format, and what audio formats can be used alongside.

MPEG1 standard defined the mpeg container, the mpeg1 format (implemented by FFmpeg's mpeg1video codec, now used mainly for VCD) as well as successive audio formats: MPEG1 layer I (unused to my knowledge), MPEG1 layer II (a.k.a. "MP2", for (S)VCD and DVD IIRC) and MPEG1 layer III (the so-called "MP3").

MPEG2 standard defined mainly a new mpeg2 format for video, as used by SVCD and DVD. It is implemented by FFmpeg's mpeg2video codec. I'm not aware of any new audio of container format coming from this standard, except the Multichannel extension to "MP2" (a kind of "5.1" replacement for SVCD).

MPEG3... I don't know. Is there any?

MPEG4 took a long time before being released. So long in fact that Microsoft starting using it before it was officially released; that triggered the development of DivX. At some point in time, some DivX developers were in disagreement with the others (about a licence change, among other things), and started developping the Open-Source project Xvid (which is "divx" reversed). Xvid developped and finally got better than DivX ever was. Meanwhile, MPEG4 finally was finalised, and its video format is implemented by FFmpeg's mpeg4 codec, also known as "ISO mpeg4".
mpeg4 is the most complete, and Divx and Xvid are both more or less a subset of mpeg4 based on a MPEG4 "preview release".
Then, there's also the x264 codec, which seems to implement a "higher level" of the MPEG4 video standard, or something like that...
On the audio side, MPEG4 gives us the AAC format, used by Apple already.
I think there's also something special for the container with MPEG4 but I don't remember what...

This is all to the best of my knowledge. Please correct if you know better or further.

Yves.

Last edited by theYinYeti; 06-22-2006 at 07:07 AM.
 
Old 06-22-2006, 03:12 PM   #11
lowebb
Member
 
Registered: Aug 2005
Location: Ireland
Distribution: Ubuntu, Ubuntu, Ubuntu
Posts: 119

Rep: Reputation: 15
Yep, I'd agree wit hall that Yeti.

There is MPEG-3, I'm not 100% sure but I think MPEG-3 was being developed until they realised it wasnt significantly different to MPEG-2 and just became an update to that standard.

MPEG-4 (or h.264) compression is more or less the compression standard to be used for the next 10 years. MPEG-7 and MPEG-21 are in development (no idea why these numbers were picked) but they are aimed at a more 'complete multimedia environment' allowing slide shows, pictures, haptic's and the delivery system. There is no new video compression for them
 
Old 06-23-2006, 03:33 AM   #12
mshahwan
Member
 
Registered: Jul 2004
Distribution: SusE 9.1
Posts: 37

Original Poster
Rep: Reputation: 15
cool but which is better

i tryed to encode a video using xvid and lavc. xvid gave me a little better quality but took a hell of a lot longer to encode. 24 minutes (xvid) Vs. 6 minutes (lavc). Thats some serious time factor. both were encoding using mpeg4, mp3 with the same bitrates and single pass. The weird thing is the xvid file size was bigger too (12megs more than lavc). so I'm ruling xvid out unless somebody didnt get similar results. I'm thinking that it might be a parameter missing or something. can someone confirm this.

Last edited by mshahwan; 06-23-2006 at 03:38 AM.
 
  


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
Is Linux clustering for Video compression possible? A6Quattro Linux - General 1 07-17-2005 01:05 PM
TV Out quality video card????? Peppercorn Linux - Hardware 11 05-15-2005 11:54 AM
video compression to save space angryjoe General 5 11-17-2004 04:29 PM
good video compression? SciYro Linux - Software 5 09-06-2004 12:00 PM
MainConcept Capture program has a video compression option but their is not soundcomp maximalred Linux - General 0 08-23-2003 05:23 AM

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

All times are GMT -5. The time now is 10:35 AM.

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