After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 574169 - avidemux/theoradec don't work well together
avidemux/theoradec don't work well together
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-good
0.10.10
Other Linux
: Normal normal
: 0.10.15
Assigned To: Wim Taymans
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2009-03-04 20:24 UTC by Hammered
Modified: 2009-03-06 18:04 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Test avi (18.07 KB, video/x-msvideo)
2009-03-06 02:06 UTC, Hammered
  Details
Patch to add theora to libgstriff (848 bytes, patch)
2009-03-06 07:43 UTC, Edward Hervey
none Details | Review

Description Hammered 2009-03-04 20:24:49 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).
Comment 1 Edward Hervey 2009-03-05 07:26:03 UTC
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.
Comment 2 Hammered 2009-03-06 02:06:51 UTC
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.
Comment 3 Edward Hervey 2009-03-06 07:30:37 UTC
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?)... 
Comment 4 Edward Hervey 2009-03-06 07:43:41 UTC
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.
Comment 5 Hammered 2009-03-06 14:00:43 UTC
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).
Comment 6 Edward Hervey 2009-03-06 15:16:25 UTC
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.
Comment 7 Sebastian Dröge (slomo) 2009-03-06 15:57:17 UTC
(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 ;)

Comment 8 Wim Taymans 2009-03-06 17:54:57 UTC
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.
Comment 9 Wim Taymans 2009-03-06 18:04:43 UTC
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.