Rockbox Technical Forums

Support and General Use => Plugins/Viewers => Topic started by: Slerped2005 on August 15, 2006, 03:58:23 PM

Title: Will rockbox ever support Xvid?
Post by: Slerped2005 on August 15, 2006, 03:58:23 PM
The great codec that makes dvd quality audio in very little space?
Title: Re: Will rockbox ever support Xvid?
Post by: Llorean on August 15, 2006, 04:14:07 PM
I hate to tell you, but XVid is a video codec, not an audio codec.

As for whether Rockbox will support it, it depends entirely on whether someone actually does the work. MPEG1 and MPEG2 playback are what is being currently working on, but I'm sure if someone found a suitable XVid codec for adaption, it might be considered. Of course a patch with some work begun would help the case even more.
Title: Re: Will rockbox ever support Xvid?
Post by: senab on August 15, 2006, 05:30:40 PM
Xvid is just a (open-source) encoder for MPEG4 video, and not a format itself.

Other MPEG4 Video encoders include (there are more, but these are the main):

* DivX (which is closed-source).
* 3ivx (closed-source)
* MS MPEG-4 (as you can probably tell is closed source again).
* Quicktime (closed source)
* Nero (Closed Source)

Therefore from Rockbox's point of view, DivX would be the way to go for MPEG4 decoding. Not sure what license it has though, I think it's GPL off the top of my head.
Title: Re: Will rockbox ever support Xvid?
Post by: Bagder on August 15, 2006, 05:33:40 PM
serab,

You better go over and correct wikipedia then: http://en.wikipedia.org/wiki/XviD

"XviD is a free and open source MPEG-4 video codec. XviD was created by a group of volunteer programmers after the OpenDivX source was closed in July 2001.

XviD features MPEG-4 Advanced Simple Profile features such as b-frames, global and quarter pixel motion compensation, lumi masking, trellis quantization, and H.263, MPEG and custom quantization matrices.

XviD is a primary competitor of DivX (XviD spelled backwards). While DivX is closed source and may only run on Windows, Mac OS and Linux, XviD is open source and can potentially run on any platform."
Title: Re: Will rockbox ever support Xvid?
Post by: senab on August 15, 2006, 05:45:04 PM
Hmmmm, every video file I've ever encoded with Divx has been MPEG4 in nature and be able to be decoded by my iPod.

Quote from: Xvid FAQ
·  What is XviD?

XviD is an ISO MPEG-4 compliant video codec, so designed to compress/decompress digital video. It's a open source project, which is developed and maintained by a handful of skilled and interested engineers from all over the world.

·  Why should I use XviD?

Well, you don't need to at all. We, the developers of XviD, are just a group of engineers, who happen to enjoy working in the field of video compression. So if you choose something else than XviD, no problem...

But: there are good reasons why you could like to use XviD: We believe that XviD is the best available MPEG-4 video codec solution today and additionally XviD is open source!

So what would need correcting Bagder?  ???
Title: Re: Will rockbox ever support Xvid?
Post by: Llorean on August 15, 2006, 05:50:26 PM
MPEG4 is a standard. If you read the wikipedia article on it, most implementations don't include the whole standard. For example, in many cases if someone has only Divx installed, they won't be able to play XVid encoded movies, but the opposite is not necessarily true, becuase XVid was, I believe, designed to be able to play Divx encoded movies.

So, they are in truth unique codecs since each one offers different encoding and playback features. If they were all the same, then there would be no need for additional codec installations to be able to play back movies depending on which MPEG4 encoder was used.
Title: Re: Will rockbox ever support Xvid?
Post by: senab on August 15, 2006, 05:55:22 PM
Now I'm no expert on MPEG-4, but in my understanding there are two video codecs in the standard: H264 (AVC) and the codec we're on about called 'Part 2' MPEG-V (which includes SP and ASP profiles).

The codec's I mentioned above, should all be playable by a MPEG4 decoder aslong as they're ISO compliant (which XviD is).
Title: Re: Will rockbox ever support Xvid?
Post by: Bagder on August 15, 2006, 05:57:47 PM
Quote
So what would need correcting Bagder?

So what is a "format" and what is a "codec" in your terms?
Title: Re: Will rockbox ever support Xvid?
Post by: Llorean on August 15, 2006, 06:00:49 PM
Well, I suppose the problem then was that there aren't as many MPEG4 compliant decoders out there as would be nice. Outside of those using ffmpeg, I've found I've needed to install directshow filters in the past to be able to play XVid and Divx encoded files.

Either way, Xvid both encodes and decodes, and therefor fits the definition of "codec" rather nicely.

The question of whether its output fits within a specific category (MPEG4 compliant) is irrelevant. Though from a Rockbox implementation standpoint, it's fair to ask if XVid will be supported, because then you say "Will you support the MPEG4 video spec enough to support playback of XVid encoded files".
Title: Re: Will rockbox ever support Xvid?
Post by: senab on August 15, 2006, 06:01:27 PM
@Badger: When I say format, an example would be AAC, MP3, Vorbis, etc.

When I say codec I mean an implementation of that format, eg LAME for MP3, FAAD for AAC, twolame for MP2, etc.

These terms may be "wrong" but it's what I mean.
Title: Re: Will rockbox ever support Xvid?
Post by: Llorean on August 15, 2006, 06:03:02 PM
So, seeing as everyone else was calling it a codec the whole time, what were you trying to correct?
Title: Re: Will rockbox ever support Xvid?
Post by: senab on August 15, 2006, 06:05:30 PM
Yes you're right, but they should be compliant anyway. Even Quicktime decodes XviD and DivX if muxed into MP4 properly.

I wasn't trying to correct anything lol, it's just what come out when I was typing.
Title: Re: Will rockbox ever support Xvid?
Post by: soap on August 15, 2006, 06:18:56 PM
For what it's worth, many (most?) (current) hardware decoders don't like quarter pixel motion compensation, even if they can handle the rest of ASP.
Title: Re: Will rockbox ever support Xvid?
Post by: senab on August 15, 2006, 06:23:09 PM
Have a look at this for a superb overview:

http://forum.doom9.org/showthread.php?s=&threadid=73022#post461587
Title: Re: Will rockbox ever support Xvid?
Post by: linuxstb on August 16, 2006, 12:45:07 PM
Going back to the original question - xvid support in Rockbox - there is an initial port of the xvidcore library to Rockbox on the patch tracker:

http://www.rockbox.org/tracker/task/2848

I haven't tested it on a real device, so don't know how it performs to libmpeg2 (the basis for the current work in mpegplayer), but xvidcore compiles to a plugin around 750KB in size (meaning you need to increase the size of the Rockbox plugin from the default 512KB in order to run it).  Compare this to mpegplayer which currently compiles to a plugin around 75KB in size - 10% of the size.

So whilst many consider xvid to be a better codec, from a developer's point of view, libmpeg2 is much easier to work with, and will be a lot easier to optimise to the extent needed for decent quality playback in Rockbox.

But I would be curious to compare the quality of xvid files to MPEG-2 files - if anyone wants to take the Elephants Dream video from here:

http://orange.blender.org/

and re-encode it to a comparable size and bitrate to some of the files I've enoded to MPEG-2 here:

http://download.rockbox.org/mpeg/

Title: Re: Will rockbox ever support Xvid?
Post by: saratoga on August 17, 2006, 01:00:03 AM
Yes you're right, but they should be compliant anyway. Even Quicktime decodes XviD and DivX if muxed into MP4 properly.

I wasn't trying to correct anything lol, it's just what come out when I was typing.

Did Apple finally start supporting ASP?  WHen I tried it a couple months ago, it couldn't do Xvid or Divx unless you used special settings to turn off most of the features, regardless of container.
Title: Re: Will rockbox ever support Xvid?
Post by: senab on August 17, 2006, 09:14:04 AM
From Quicktime 7, ASP is supported.