GNOME Bugzilla – Bug 533435
wildmidi does not work
Last modified: 2008-05-16 22:00:51 UTC
This is on Mandriva Cooker with gstreamer 0.10.19 and gst-plugins-bad 0.10.7. I have enabled the build of wildmidi, but it does not work at all: $ gst-launch-0.10 playbin uri=file:///home/goetz/pattern.mid Setting pipeline to PAUSED ... ** Message: don't know how to handle audio/midi Pipeline is PREROLLING ... ERROR: from element /playbin0/decodebin0: A audio/midi decoder plugin is required to play this stream, but not installed. Additional debug info: gstdecodebin.c(792): close_pad_link (): /playbin0/decodebin0: No decoder to handle media type 'audio/midi' ERROR: pipeline doesn't want to preroll. Setting pipeline to NULL ... FREEING pipeline ... The wildmidi element is there: $ gst-inspect wildmidi Factory Details: Long name: WildMidi Class: Codec/Decoder/Audio Description: Midi Synthesizer Element Author(s): Wouter Paesen <wouter@blue-gate.be> Rank: secondary (128) Plugin Details: Name: wildmidi Description: Wildmidi Plugin Filename: /usr/lib/gstreamer-0.10/libgstwildmidi.so Version: 0.10.7 License: GPL Source module: gst-plugins-bad Binary package: Mandriva gstreamer0.10-plugins-bad package Origin URL: http://www.mandriva.com/ GObject +----GstObject +----GstElement +----GstWildmidi Pad Templates: SRC template: 'src' Availability: Always Capabilities: audio/x-raw-int rate: 44100 channels: 2 endianness: 1234 width: 16 depth: 16 signed: true SINK template: 'sink' Availability: Always Capabilities: audio/midi Element Flags: no flags set Element Implementation: Has change_state() function: 0xb769c230 Has custom save_thyself() function: gst_element_save_thyself Has custom restore_thyself() function: gst_element_restore_thyself Element has no clocking capabilities. Element has no indexing capabilities. Pads: SRC: 'src' Implementation: Has custom eventfunc(): 0xb769cc80 Has custom queryfunc(): 0xb769e550 Pad Template: 'src' SINK: 'sink' Implementation: Pad Template: 'sink' Element Properties: name : The name of the object flags: readable, writable String. Default: null Current: "wildmidi0" linear-volume : Linear volume flags: readable, writable Boolean. Default: true Current: true high-quality : High Quality flags: readable, writable Boolean. Default: true Current: true Wildmidi itself can play the file: $ wildmidi -o pattern.wav pattern.mid WildMidi 0.2.2 Open Source Midi Sequencer Copyright (C) 2001-2004 Chris Ison wildcode@users.sourceforge.net WildMidi comes with ABSOLUTELY NO WARRANTY This is free software, and you are welcome to redistribute it under the terms and conditions of the GNU General Public License version 2. For more information see COPYING Initializing Sound System Initializing WildMidi Processing Library 0.2.2 + Volume up e Better resampling n Next Midi - Volume down l Linear volume q Quit Playing pattern.mid [Approx 1m 17s Total] [ ] [100] [ 1m 17s Processed] [100%] | Shutting down Sound System Shutting Down Sound System
Could you run gst-launch with GST_DEBUG=5 or make that specific file available (or does this happen with all files?)?
Created attachment 110996 [details] debug output
Created attachment 110997 [details] MIDI file It happened with several files I have tried.
Relevant bits: CTORY gstelementfactory.c:399:gst_element_factory_create: creating element "wildmidi" NTING gstobject.c:293:gst_object_init:<GstObject@0x8161008> 0x8161008 new dmidi gstwildmidi.c:139:wildmidi_open_config: trying (NULL) dmidi gstwildmidi.c:149:wildmidi_open_config: trying /home/goetz/.wildmidirc dmidi gstwildmidi.c:158:wildmidi_open_config: trying /etc/wildmidi.cfg dmidi gstwildmidi.c:167:wildmidi_open_config: trying /etc/timidity.cfg dmidi gstwildmidi.c:176:wildmidi_open_config: trying /etc/timidity.cfg dmidi gstwildmidi.c:191:wildmidi_open_config: no config file, can't initialise dmidi gstwildmidi.c:239:gst_wildmidi_init: can't initialize wildmidi NTAGE gstbin.c:980:gst_bin_add_func:<decodebin0> added element "wildmidi0" TATES gstelement.c:2298:gst_element_set_state_func:<wildmidi0> set_state to READY TATES gstelement.c:2334:gst_element_set_state_func:<wildmidi0> current NULL, old_pending VOID_PENDING, next VO TATES gstelement.c:2368:gst_element_set_state_func:<wildmidi0> final: setting state from NULL to READY dmidi gstwildmidi.c:806:gst_wildmidi_change_state: WildMidi renderer is not initialized TATES gstelement.c:2432:gst_element_change_state:<wildmidi0> have FAILURE change_state return TATES gstelement.c:2042:gst_element_abort_state:<wildmidi0> aborting state from NULL to READY TATES gstelement.c:2475:gst_element_change_state:<wildmidi0> exit state change 0 TATES gstelement.c:2380:gst_element_set_state_func:<wildmidi0> returned FAILURE debin gstdecodebin.c:945:try_to_link_1:<decodebin0> Couldn't set wildmidi0 to READY It seems you need to make a config file to make the wildmidi element work. Maybe it searches the config in the wrong place too. Any idea where it finds the config file when using the command line tools?
Currently it checks an environment variable and several standard locations for wildmidi/timidity configuration files. This should be changed by packagers to the distribution defaults... but maybe we could provide a configure parameter and element property for setting the configuration. (and the error reporting, etc of wildmidi is of course not optimal yet) The commandline wildmidi thing has the configuration file location hardcoded at compile time and it can be set by a commandline option.
That's right, I have fixed the path to the config file in the Mandriva package, it's /etc/timidity/timidity.cfg.
...and then it works fine? I guess we should add /etc/timidity/timidity.cfg to the default paths too as it's the same for Debian and Ubuntu too ;)
Yes, then it works.
2008-05-16 Sebastian Dröge <slomo@circular-chaos.org> * ext/timidity/gstwildmidi.c: (wildmidi_open_config): Check some more common locations for a valid configuration file. Fixes bug #533435. Packagers should still #define WILDMIDI_CFG to the distributions default location.