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 565777 - [riff] unrecognised video fourcc 0x10000002 for mpeg2 in avi
[riff] unrecognised video fourcc 0x10000002 for mpeg2 in avi
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-base
0.10.21
Other All
: Normal normal
: 0.10.23
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2008-12-27 14:51 UTC by Matěj Cepl
Modified: 2009-02-25 11:40 UTC
See Also:
GNOME target: ---
GNOME version: 2.23/2.24



Description Matěj Cepl 2008-12-27 14:51:54 UTC
Please describe the problem:
Fedora 10 fully updated and when playing .avi file from mencoder with
gst-launch playbin I get 

"Message: don't know how to handle video/x-avi-unknown,
fourcc=(fourcc)0x10000002"

The file is whole movie, so only first 999kB (cut with head) are on 
http://disk.jabbim.cz/mcepl@ceplovi.cz/head.avi

The file is originally from DVB-T caught with -dumpstream and then repackaged
into .avi with

mencoder -ovc copy -oac copy -o nejvetsi-vecernicek-na-svete.avi huge.dump

and then I run

mencoder -ss 3:00:15 -endpos 1:36:40 -forceidx -o neverland.avi -oac copy -ovc
copy nejvetsi-vecernicek-na-svete.avi 

to get my movie.

This is the information I get from ffplay:

[matej@viklef ~]$ ffplay -stats -vn -an neverland.avi 
FFplay version SVN-r15261, Copyright (c) 2003-2008 Fabrice Bellard, et al.
  configuration: --prefix=/usr --incdir=/usr/include/ffmpeg --libdir=/usr/lib
--mandir=/usr/share/man --arch=i386 --extra-cflags=-O2 -g -pipe -Wall
-Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector
--param=ssp-buffer-size=4 -m32 -march=i386 -mtune=generic
-fasynchronous-unwind-tables --enable-libdc1394 --enable-libfaac
--enable-libfaad --enable-libgsm --enable-libmp3lame --enable-libtheora
--enable-libvorbis --enable-libx264 --enable-libxvid --enable-x11grab
--enable-avfilter --enable-avfilter-lavf --enable-postproc --enable-swscale
--enable-pthreads --disable-static --enable-shared --enable-gpl --disable-debug
--disable-optimizations --disable-stripping --shlibdir=/usr/lib --cpu=i386
--disable-amd3dnow --disable-mmx --disable-sse
  libavutil     49.10. 0 / 49.10. 0
  libavcodec    51.71. 0 / 51.71. 0
  libavformat   52.22. 1 / 52.22. 1
  libavdevice   52. 1. 0 / 52. 1. 0
  libavfilter    0. 1. 0 /  0. 1. 0
  libswscale     0. 6. 1 /  0. 6. 1
  libpostproc   51. 2. 0 / 51. 2. 0
  built on Nov 20 2008 14:37:49, gcc: 4.3.2 20081105 (Red Hat 4.3.2-7)
[avi @ 0x95a8cd0]non-interleaved AVI vq=    0KB sq=    0B    
Input #0, avi, from 'neverland.avi':
  Duration: 01:36:40.04, start: 0.000000, bitrate: 4673 kb/s
    Stream #0.0: Video: mpeg2video, yuv420p, 720x576 [PAR 16:15 DAR 4:3], 6000
kb/s, 25.00 tb(r)
    Stream #0.1: Audio: mp2, 48000 Hz, stereo, s16, 256 kb/s
neverland.avi: could not open codecs

[matej@viklef ~]$ 

The file works perfectly in mplayer but only sound (no video) in totem (or
gst-launch playbin).

mencoder is MEncoder dev-SVN-r27514-4.3.2 (C) 2000-2008 MPlayer Team

Steps to reproduce:
1. gst-launch -v -t playbin uri=file:///home/matej/head.avi


Actual results:
[matej@viklef ~]$ LANG=en_IE.utf-8 gst-launch -v -t playbin uri=file:///home/matej/head.avi
Setting pipeline to PAUSED ...
/GstPlayBin:playbin0/GstDecodeBin:decodebin0/GstTypeFindElement:typefind.GstPad:src: caps = video/x-msvideo
Pipeline is PREROLLING ...
** Message: don't know how to handle video/x-avi-unknown, fourcc=(fourcc)0x10000002
/GstPlayBin:playbin0/GstDecodeBin:decodebin0/GstQueue:queue0.GstPad:sink: caps = audio/mpeg, mpegversion=(int)1, layer=(int)2, rate=(int)48000, channels=(int)2
/GstPlayBin:playbin0/GstDecodeBin:decodebin0/GstQueue:queue0.GstPad:src: caps = audio/mpeg, mpegversion=(int)1, layer=(int)2, rate=(int)48000, channels=(int)2
/GstPlayBin:playbin0/GstDecodeBin:decodebin0/GstMPEGAudioParse:mpegaudioparse0.GstPad:sink: caps = audio/mpeg, mpegversion=(int)1, layer=(int)2, rate=(int)48000, channels=(int)2
FOUND TAG      : found by element "avidemux0".
     audio codec: MPEG-1 layer 2
FOUND TAG      : found by element "avidemux0".
         encoder: MEncoder dev-SVN-r27514-4.3.2
/GstPlayBin:playbin0/GstStreamSelector:selector_audio_src0: active-pad = NULL
/GstPlayBin:playbin0/GstDecodeBin:decodebin0/GstMPEGAudioParse:mpegaudioparse0.GstPad:src: caps = audio/mpeg, mpegversion=(int)1, mpegaudioversion=(int)1, layer=(int)2, rate=(int)48000, channels=(int)2, parsed=(boolean)true
FOUND TAG      : found by element "mpegaudioparse0".
     audio codec: MPEG 1 Audio, Layer 2
FOUND TAG      : found by element "mpegaudioparse0".
         bitrate: 256000
         has crc: FALSE
    channel mode: stereo
/GstPlayBin:playbin0/GstDecodeBin:decodebin0/GstMad:mad0.GstPad:sink: caps = audio/mpeg, mpegversion=(int)1, mpegaudioversion=(int)1, layer=(int)2, rate=(int)48000, channels=(int)2, parsed=(boolean)true
FOUND TAG      : found by element "mad0".
           layer: 2
            mode: stereo
        emphasis: none
         bitrate: 256000
/GstPlayBin:playbin0/GstDecodeBin:decodebin0/GstMad:mad0.GstPad:src: caps = audio/x-raw-int, endianness=(int)1234, signed=(boolean)true, width=(int)32, depth=(int)32, rate=(int)48000, channels=(int)2
/GstPlayBin:playbin0/GstStreamSelector:selector_audio_src0.GstSelectorPad:sink0: caps = audio/x-raw-int, endianness=(int)1234, signed=(boolean)true, width=(int)32, depth=(int)32, rate=(int)48000, channels=(int)2
/GstPlayBin:playbin0/GstDecodeBin:decodebin0.GstGhostPad:src0: caps = audio/x-raw-int, endianness=(int)1234, signed=(boolean)true, width=(int)32, depth=(int)32, rate=(int)48000, channels=(int)2
/GstPlayBin:playbin0/GstDecodeBin:decodebin0.GstGhostPad:src0.GstProxyPad:proxypad1: caps = audio/x-raw-int, endianness=(int)1234, signed=(boolean)true, width=(int)32, depth=(int)32, rate=(int)48000, channels=(int)2
/GstPlayBin:playbin0/GstStreamSelector:selector_audio_src0.GstPad:src: caps = audio/x-raw-int, endianness=(int)1234, signed=(boolean)true, width=(int)32, depth=(int)32, rate=(int)48000, channels=(int)2
/GstPlayBin:playbin0/GstQueue:preroll_audio_src0.GstPad:sink: caps = audio/x-raw-int, endianness=(int)1234, signed=(boolean)true, width=(int)32, depth=(int)32, rate=(int)48000, channels=(int)2
/GstPlayBin:playbin0/GstQueue:preroll_audio_src0.GstPad:src: caps = audio/x-raw-int, endianness=(int)1234, signed=(boolean)true, width=(int)32, depth=(int)32, rate=(int)48000, channels=(int)2
/GstPlayBin:playbin0/GstBin:abin/GstAudioConvert:aconv.GstPad:src: caps = audio/x-raw-int, endianness=(int)1234, signed=(boolean)true, width=(int)32, depth=(int)32, rate=(int)48000, channels=(int)2
/GstPlayBin:playbin0/GstBin:abin/GstAudioConvert:aconv.GstPad:sink: caps = audio/x-raw-int, endianness=(int)1234, signed=(boolean)true, width=(int)32, depth=(int)32, rate=(int)48000, channels=(int)2
/GstPlayBin:playbin0/GstBin:abin.GstGhostPad:sink: caps = audio/x-raw-int, endianness=(int)1234, signed=(boolean)true, width=(int)32, depth=(int)32, rate=(int)48000, channels=(int)2
/GstPlayBin:playbin0/GstBin:abin.GstGhostPad:sink: caps = audio/x-raw-int, endianness=(int)1234, signed=(boolean)true, width=(int)32, depth=(int)32, rate=(int)48000, channels=(int)2
/GstPlayBin:playbin0/GstBin:abin.GstGhostPad:sink.GstProxyPad:proxypad3: caps = audio/x-raw-int, endianness=(int)1234, signed=(boolean)true, width=(int)32, depth=(int)32, rate=(int)48000, channels=(int)2
/GstPlayBin:playbin0/GstBin:abin/GstAudioresample:aresample.GstPad:src: caps = audio/x-raw-int, endianness=(int)1234, signed=(boolean)true, width=(int)32, depth=(int)32, rate=(int)48000, channels=(int)2
/GstPlayBin:playbin0/GstBin:abin/GstAudioresample:aresample.GstPad:sink: caps = audio/x-raw-int, endianness=(int)1234, signed=(boolean)true, width=(int)32, depth=(int)32, rate=(int)48000, channels=(int)2
/GstPlayBin:playbin0/GstBin:abin/GstVolume:volume.GstPad:src: caps = audio/x-raw-int, endianness=(int)1234, signed=(boolean)true, width=(int)32, depth=(int)32, rate=(int)48000, channels=(int)2
/GstPlayBin:playbin0/GstBin:abin/GstVolume:volume.GstPad:sink: caps = audio/x-raw-int, endianness=(int)1234, signed=(boolean)true, width=(int)32, depth=(int)32, rate=(int)48000, channels=(int)2
/GstPlayBin:playbin0/GstBin:abin/GstAutoAudioSink:audiosink/GstPulseSink:audiosink-actual-sink-pulse.GstPad:sink: caps = audio/x-raw-int, endianness=(int)1234, signed=(boolean)true, width=(int)32, depth=(int)32, rate=(int)48000, channels=(int)2
/GstPlayBin:playbin0/GstBin:abin/GstAutoAudioSink:audiosink.GstGhostPad:sink: caps = audio/x-raw-int, endianness=(int)1234, signed=(boolean)true, width=(int)32, depth=(int)32, rate=(int)48000, channels=(int)2
/GstPlayBin:playbin0/GstBin:abin/GstAutoAudioSink:audiosink.GstGhostPad:sink: caps = audio/x-raw-int, endianness=(int)1234, signed=(boolean)true, width=(int)32, depth=(int)32, rate=(int)48000, channels=(int)2
/GstPlayBin:playbin0/GstBin:abin/GstAutoAudioSink:audiosink.GstGhostPad:sink.GstProxyPad:proxypad2: caps = audio/x-raw-int, endianness=(int)1234, signed=(boolean)true, width=(int)32, depth=(int)32, rate=(int)48000, channels=(int)2
Pipeline is PREROLLED ...
Setting pipeline to PLAYING ...
New clock: GstAudioSinkClock
Got EOS from element "playbin0".
Execution ended after 2614116778 ns.
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
/GstPlayBin:playbin0/GstBin:abin/GstAutoAudioSink:audiosink/GstPulseSink:audiosink-actual-sink-pulse.GstPad:sink: caps = NULL
/GstPlayBin:playbin0/GstBin:abin/GstAutoAudioSink:audiosink.GstGhostPad:sink: caps = NULL
/GstPlayBin:playbin0/GstBin:abin/GstVolume:volume.GstPad:src: caps = NULL
/GstPlayBin:playbin0/GstBin:abin/GstVolume:volume.GstPad:sink: caps = NULL
/GstPlayBin:playbin0/GstBin:abin/GstAudioresample:aresample.GstPad:src: caps = NULL
/GstPlayBin:playbin0/GstBin:abin/GstAudioresample:aresample.GstPad:sink: caps = NULL
/GstPlayBin:playbin0/GstBin:abin/GstAudioConvert:aconv.GstPad:src: caps = NULL
/GstPlayBin:playbin0/GstBin:abin/GstAudioConvert:aconv.GstPad:sink: caps = NULL
/GstPlayBin:playbin0/GstBin:abin.GstGhostPad:sink: caps = NULL
/GstPlayBin:playbin0/GstQueue:preroll_audio_src0.GstPad:src: caps = NULL
/GstPlayBin:playbin0/GstQueue:preroll_audio_src0.GstPad:sink: caps = NULL
/GstPlayBin:playbin0/GstStreamSelector:selector_audio_src0.GstSelectorPad:sink0: caps = NULL
/GstPlayBin:playbin0/GstStreamSelector:selector_audio_src0.GstPad:src: caps = NULL
/GstPlayBin:playbin0/GstDecodeBin:decodebin0.GstGhostPad:src0: caps = NULL
/GstPlayBin:playbin0/GstDecodeBin:decodebin0/GstMad:mad0.GstPad:src: caps = NULL
/GstPlayBin:playbin0/GstDecodeBin:decodebin0/GstMad:mad0.GstPad:sink: caps = NULL
/GstPlayBin:playbin0/GstDecodeBin:decodebin0/GstMPEGAudioParse:mpegaudioparse0.GstPad:src: caps = NULL
/GstPlayBin:playbin0/GstDecodeBin:decodebin0/GstMPEGAudioParse:mpegaudioparse0.GstPad:sink: caps = NULL
/GstPlayBin:playbin0/GstDecodeBin:decodebin0/GstQueue:queue0.GstPad:src: caps = NULL
/GstPlayBin:playbin0/GstDecodeBin:decodebin0/GstQueue:queue0.GstPad:sink: caps = NULL
/GstPlayBin:playbin0/GstDecodeBin:decodebin0/GstAviDemux:avidemux0.GstPad:audio_00: caps = NULL
/GstPlayBin:playbin0/GstDecodeBin:decodebin0/GstAviDemux:avidemux0.GstPad:video_00: caps = NULL
/GstPlayBin:playbin0/GstDecodeBin:decodebin0/GstTypeFindElement:typefind.GstPad:src: caps = NULL
Setting pipeline to NULL ...
FREEING pipeline ...
[matej@viklef ~]$ 


Expected results:
just playing the movie

Does this happen every time?
yes

Other information:
Comment 1 Tim-Philipp Müller 2008-12-27 15:40:59 UTC
This seems to make it work:

Index: gst-libs/gst/riff/riff-media.c
===================================================================
RCS file: /cvs/gstreamer/gst-plugins-base/gst-libs/gst/riff/riff-media.c,v
retrieving revision 1.112
diff -u -r1.112 riff-media.c
--- gst-libs/gst/riff/riff-media.c      12 Dec 2008 07:15:22 -0000      1.112
+++ gst-libs/gst/riff/riff-media.c      27 Dec 2008 15:29:36 -0000
@@ -172,6 +172,7 @@
       break;
     case GST_MAKE_FOURCC ('M', 'P', 'G', '2'):
     case GST_MAKE_FOURCC ('m', 'p', 'g', '2'):
+    case GST_MAKE_FOURCC (0x02, 0x00, 0x00, 0x10):
       caps = gst_caps_new_simple ("video/mpeg",
           "systemstream", G_TYPE_BOOLEAN, FALSE,
           "mpegversion", G_TYPE_INT, 2, NULL);

.. but I wonder if there's a reason the usual fourcc isn't used here (bug?), and if there are other players which recognise this video stream (e.g. Windows media player, VLC, etc.)?
Comment 2 Matěj Cepl 2008-12-27 21:29:22 UTC
Yes, this patch makes my totem playing the file again. Now, the question is who to blame -- does mencoder generate bad files, or gstreamer cannot parse good .avi file?
Comment 3 Tim-Philipp Müller 2009-02-25 09:42:08 UTC
Fixed in git it seems:

Module: gst-plugins-base
Branch: master
Commit: e57073b6f94773d7b93ae65f320b6643ec3850e0
URL:    http://cgit.freedesktop.org/gstreamer/gst-plugins-base/commit/?id=e57073b6f94773d7b93ae65f320b6643ec3850e0

Author: Edward Hervey <bilboed@bilboed.com>
Date:   Tue Feb 24 10:33:05 2009 +0100

Riff: Add fourcc for mpeg1-in-avi (as produced by mencoder)

---

 gst-libs/gst/riff/riff-media.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
Comment 4 Tim-Philipp Müller 2009-02-25 11:40:18 UTC
Actually, that was only for mpeg1, so here goes the mpeg2 one:

Module: gst-plugins-base
Branch: master
Commit: 3d88a5b9855f1e9f7ac61142d7c1eaa4e85e5726
URL:    http://cgit.freedesktop.org/gstreamer/gst-plugins-base/commit/?id=3d88a5b9855f1e9f7ac61142d7c1eaa4e85e5726

Author: Tim-Philipp Müller <tim.muller@collabora.co.uk>
Date:   Wed Feb 25 09:52:38 2009 +0000

riff: add fourcc for mpeg2-in-avi (as produced by mencoder)

Fixes: #565777