Rockbox Technical Forums

Rockbox Development => Feature Ideas => Topic started by: LambdaCalculus on July 08, 2008, 08:58:20 AM

Title: Ogg Theora Movie Playback
Post by: LambdaCalculus on July 08, 2008, 08:58:20 AM
One idea I've been kicking around for a while is adding support for an additional video codec into Rockbox. In this case, I'm thinking about Theora (part of the Ogg container format).

Stop in and discuss. Theora is open and royalty-free, included with many other projects (including ffmpeg, VLC, and others), and is licensed under a BSD-style license.

For those interested, here's a link to the current SVN trunk of libtheora:

http://www.theora.org/svn/
Title: Re: Ogg Theora Movie Playback
Post by: GodEater on July 08, 2008, 09:24:04 AM
To save me from having to do a lot of reading, is there any indication of how good this is for an embedded target? Is it nicely fixed point for example ?
Title: Re: Ogg Theora Movie Playback
Post by: gevaerts on July 08, 2008, 09:55:55 AM
I think that if we add another codec, we need to think about an audio-codec like architecture (i.e. one player, multiple codecs).

I personally would like to see more intergration of video playing in the "normal" playback system, so you can e.g. have video files in a playlist

(sorry for trying to turn this into a more general video features thread)
Title: Re: Ogg Theora Movie Playback
Post by: LambdaCalculus on July 08, 2008, 11:20:45 AM
I think that if we add another codec, we need to think about an audio-codec like architecture (i.e. one player, multiple codecs).

I personally would like to see more intergration of video playing in the "normal" playback system, so you can e.g. have video files in a playlist

I think that's been brought up a few times before, actually. I wonder if adding another video codec will give us all an excuse to rearrange the architecture for video playback...
Title: Re: Ogg Theora Movie Playback
Post by: pondlife on July 08, 2008, 12:14:52 PM
I'd suggest that the existing audio buffering could be used for video, and a new codec system written for both audio and video.... if we want to integrate.

pondlife
Title: Re: Ogg Theora Movie Playback
Post by: Llorean on July 08, 2008, 12:33:23 PM
I'd have to say, if a new video codec IS going to be added, I'd prefer to encourage someone to do MPEG4/ASP rather than Theora. Theora's quality has never seemed great, and there's just not a lot of enthusiasm for it. In terms of open codecs, Snow is a lot more interesting but it's more or less a given that it's not gonna run on our hardware.

MPEG4/ASP (DivX, XViD, and probably other various implementation-specific names as well) is often implemented by OF manufacturers (including the H300 and I believe the iPod Video which supports it alongside H.264) so it would allow us some limited support of videos for the original firmwares as well.

And while Theora's under a very, very open license, there's at least two FOSS MPEG4/ASP implementations available to pull code from as a starting point as well.

The main point with Theora is, I'm just not sure anyone will ever use it. More stuff already converts to MPEG2 anyway.
Title: Re: Ogg Theora Movie Playback
Post by: GodEater on July 09, 2008, 02:17:00 AM
If we're talking about implementing a more flexible video playback engine with pluggable codecs, I don't really see what difference it makes which codecs get implemented. Just my 2 cents.
Title: Re: Ogg Theora Movie Playback
Post by: Llorean on July 09, 2008, 02:18:05 AM
I'm just sayin', if someone is interested in implementing "a new video codec" but doesn't care too much which one they do, I'd personally advocate a different one.
Title: Re: Ogg Theora Movie Playback
Post by: Strife89 on July 09, 2008, 09:04:22 AM
Here is a link to the source code for the VLC media player. Not sure what it's written in (I'm on a Windows PC at the moment so I can't check), but I thought it might be interesting.

http://download.videolan.org/pub/videolan/vlc/0.8.6h/vlc-0.8.6h.tar.gz

 or

http://download.videolan.org/pub/videolan/vlc/0.8.6h/vlc-0.8.6h.tar.bz2

EDIT: Aha. There is indeed, a Vorbis.c and a Theora.c file under /modules in the tarball. However, Theora.c wants to include
Code: [Select]
#include <vlc/vlc.h>
#include <vlc/decoder.h>
#include <vlc/input.h>
#include <vlc/sout.h>

#include <ogg/ogg.h>

#include <theora/theora.h>
those files. So I'm under the impression that to use these files (as an example) would require a TON of editing.......

EDIT 2: I really am an idiot. Just ignore everything I've said.
Title: Re: Ogg Theora Movie Playback
Post by: saratoga on July 09, 2008, 06:48:37 PM
VLC is mostly just using ffmpeg, which is where half our codecs come from anyway.  Its not a big deal that they include other files, thats actually pretty normal for codecs and isn't all that difficult to deal with.

If we were to add a new codec to mpegplayer, it'd be pretty easy to grab it out off ffmpeg.  The hard part would be fitting it into mpegplayer I think.