GNOME Bugzilla – Bug 574169
avidemux/theoradec don't work well together
Last modified: 2009-03-06 18:04:43 UTC
Hi, I created a video encoded in theora and contained in the avi container. Programs used were: VirtualDub and ffdshow(using libtheora). The avi's FOURCC is 'THEO'. This file plays fine in Windows using Media Player Classic and ffdshow. But: In Ubuntu 8.10(64 bit) it doesn't. Totem-gstreamer fails. It only plays the sound(mp3). I tried using gst-launch and manually constructing a pipeline. I think I know where the problem is. Avidemux, unlike the other demuxers, has a fixed number of possible src caps. The other demuxers have 'ANY' as src caps. Also none of the avidemux's src caps are "video/x-theora" which explains why avidemux(and totem) fails at this video. Why not just give avidemux 'ANY' src caps? Sidenote: You may be happy to know that also mplayer and VLC fail to play this video file(only the audio).
The problem has nothing to do with avidemux not having 'ANY' caps, but to the fact that it doesn't know that 'THEO' is the mapping for theora streams. If you make such a file available, we can add the mapping and make sure it plays back fine.
Created attachment 130173 [details] Test avi This is a test avi encoded with VirtualDub and ffdshow(uses libtheora). It justs displays colorbars for 5 seconds.
So adding the 'THEO' <=> video/x-theora mapping in libgstriff only helped a little bit. There are many issues left: * There is a 'codec_data' field exposed by the demuxer... but we have no clue what's contained in it. * The decoder complains about not having received the header packets I tried assuming the codec_data field was the header packet... but it's not. To put it another way : VirtualDub/ffdshow are the only software apparently that can produce (and supposedly handle?) the combination of avi+theora. I couldn't find *any* document for how you're supposed to map theora in avi containers. I would strongly recommend choosing either: * another video codec * or use the ogg container format The files you're creating will be readable only by ffdshow (hmm... can you actually read them with ffdshow?)...
Created attachment 130184 [details] [review] Patch to add theora to libgstriff Here's the patch to make libgstriff aware of the 'THEO' fourcc if you want to try the file.
I know that avi is not a recommended container for theora. I just encountered a file on the wild that contained it and I was unable to play it in Linux. Just two notes: 1.Media Player Classic uses it's own avi splitter. Maybe you could have a look in it's source. (http://sourceforge.net/projects/guliverkli2) 2.If I open the file in a hexeditor and change the FOURCC to "theo" then mplayer is able to play the file without any complaining. VLC resizes to the frame size but it doesn't display any frame. Gstreamer just fails and plays the audio(if any).
The problem is more the interaction between the avi demuxer and the theora decoder. gsttheoradec makes a lot of assumptions on the fact that it came from an ogg container, and I think that's the major issue.
(In reply to comment #6) > The problem is more the interaction between the avi demuxer and the theora > decoder. > > gsttheoradec makes a lot of assumptions on the fact that it came from an ogg > container, and I think that's the major issue. IIRC it also has some code paths for non-Ogg streams. Theora inside Matroska works fine too ;)
commit d6705e8b346407d83d731f6b43e70ccee1952737 Author: Wim Taymans <wim.taymans@collabora.co.uk> Date: Fri Mar 6 18:53:17 2009 +0100 riff: add theora mapping Add theora mappings. See #574169.
commit fac1d4cc0965f8cc96f900d3ac23365e9b75cd0d Author: Wim Taymans <wim.taymans@collabora.co.uk> Date: Fri Mar 6 19:02:58 2009 +0100 theoradec: parse and use codec_data in the caps Parse the codec_data in the caps and use this as the headers. Fixes #574169.