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 728702 - Can't play MIDI file
Can't play MIDI file
Status: RESOLVED OBSOLETE
Product: GStreamer
Classification: Platform
Component: gst-plugins-bad
1.2.3
Other All
: Normal normal
: NONE
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2014-04-22 06:52 UTC by Bastien Nocera
Modified: 2018-05-05 15:56 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
bzipped2 gstreamer log (558.49 KB, application/octet-stream)
2016-02-22 13:35 UTC, Bastien Nocera
  Details
send stream-start event before caps (1.18 KB, patch)
2016-04-18 15:06 UTC, Vincent Penquerc'h
none Details | Review

Description Bastien Nocera 2014-04-22 06:52:09 UTC
gstreamer1-plugins-fc-0.2-8.fc20.x86_64
gstreamer1-plugins-bad-free-extras-1.2.3-1.fc20.x86_64
gstreamer1-plugins-ugly-1.2.3-1.fc20.x86_64
gstreamer1-plugins-base-tools-1.2.3-1.fc20.x86_64
gstreamer1-plugins-base-debuginfo-1.2.3-1.fc20.x86_64
gstreamer1-plugins-good-extras-1.2.3-2.fc20.x86_64
gstreamer1-vaapi-0.5.8-3.fc20.x86_64
gstreamer1-plugins-bad-free-1.2.3-1.fc20.x86_64
gstreamer1-1.2.3-1.fc20.x86_64
gstreamer1-libav-1.2.3-1.fc20.x86_64
gstreamer1-plugins-good-1.2.3-2.fc20.x86_64
gstreamer1-plugins-entrans-docs-1.0.0-2.fc20.noarch
gstreamer1-plugins-bad-freeworld-1.2.3-1.fc20.x86_64
gstreamer1-debuginfo-1.2.3-1.fc20.x86_64
gstreamer1-plugins-base-1.2.3-1.fc20.x86_64
gstreamer1-plugins-entrans-1.0.0-2.fc20.x86_64

$ gst-play-1.0 /home/hadess/Projects/Peak/B2G/frameworks/base/data/sounds/testfiles/test.mid
Now playing /home/hadess/Projects/Peak/B2G/frameworks/base/data/sounds/testfiles/test.mid
Missing plugin: audio/x-midi-event decoder
WARNING No decoder available for type 'audio/x-midi-event'.
WARNING debug information: gsturidecodebin.c(930): unknown_type_cb (): /GstPlayBin:playbin/GstURIDecodeBin:uridecodebin0
ERROR Your GStreamer installation is missing a plug-in. for file:///home/hadess/Projects/Peak/B2G/frameworks/base/data/sounds/testfiles/test.mid
ERROR debug information: gstdecodebin2.c(3928): gst_decode_bin_expose (): /GstPlayBin:playbin/GstURIDecodeBin:uridecodebin0/GstDecodeBin:decodebin0:
no suitable plugins found
Reached end of play list.

$ gst-inspect-1.0 | grep midi
midi:  midiparse: MidiParse
typefindfunctions: audio/midi: mid, midi
typefindfunctions: audio/riff-midi: mid, midi
fluidsynthmidi:  fluiddec: Fluidsynth
wildmidi:  wildmidi: WildMidi
Comment 1 Wim Taymans 2014-05-01 08:46:19 UTC
Is it because of missing soundfont?
Comment 2 Reinout van Schouwen 2014-05-10 19:57:09 UTC
I have the same error (Mageia 4) and have the timidity freepats installed. But I don't know if they are in the location where GStreamer is looking for them.
Comment 3 Stefan Sauer (gstreamer, gtkdoc dev) 2014-07-16 16:11:35 UTC
Can you attach the file? debug log?
Comment 4 Antonio Ospite 2014-09-30 11:55:48 UTC
gst-play-1.0 from GStreamer 1.4 works for me with midi files.

Bastien, can you test?
Comment 5 Tim-Philipp Müller 2016-02-21 23:34:12 UTC
Closing this bug report as no further information has been provided. Please feel free to reopen this bug report if you can provide the information that was asked for in a previous comment.
Thanks!
Comment 6 Bastien Nocera 2016-02-22 13:34:41 UTC
$ gst-play-1.0 "/home/hadess/Projects/Test files/Ebook thumbnailers/mobi-thumbnailer-hack/Characteristic_rock_drum_pattern.mid"
Press 'k' to see a list of keyboard shortcuts.
Now playing /home/hadess/Projects/Test files/Ebook thumbnailers/mobi-thumbnailer-hack/Characteristic_rock_drum_pattern.mid
WARNING No decoder available for type 'audio/x-midi-event'.
WARNING debug information: gsturidecodebin.c(939): unknown_type_cb (): /GstPlayBin:playbin/GstURIDecodeBin:uridecodebin0
ERROR Your GStreamer installation is missing a plug-in. for file:///home/hadess/Projects/Test%20files/Ebook%20thumbnailers/mobi-thumbnailer-hack/Characteristic_rock_drum_pattern.mid
ERROR debug information: gsturidecodebin.c(1006): no_more_pads_full (): /GstPlayBin:playbin/GstURIDecodeBin:uridecodebin0:
no suitable plugins found:
gstdecodebin2.c(4555): gst_decode_bin_expose (): /GstPlayBin:playbin/GstURIDecodeBin:uridecodebin0/GstDecodeBin:decodebin0:
no suitable plugins found:
Missing decoder: audio/x-midi-event (audio/x-midi-event)

Reached end of play list.

gstreamer1-plugins-bad-freeworld-1.6.2-1.fc23.x86_64
gstreamer1-plugins-base-1.6.3-1.fc23.x86_64
gstreamer1-1.6.2-1.fc23.x86_64
gstreamer1-plugins-ugly-1.6.2-1.fc23.x86_64
gstreamer1-plugins-bad-free-extras-1.6.3-2.fc23.x86_64
gstreamer1-plugins-base-tools-1.6.3-1.fc23.x86_64
gstreamer1-devel-1.6.2-1.fc23.x86_64
gstreamer1-libav-1.6.2-1.fc23.x86_64
gstreamer1-plugins-base-devel-1.6.3-1.fc23.x86_64
gstreamer1-plugins-good-1.6.2-1.fc23.x86_64
gstreamer1-plugins-bad-free-1.6.3-2.fc23.x86_64
Comment 7 Bastien Nocera 2016-02-22 13:35:27 UTC
Created attachment 321840 [details]
bzipped2 gstreamer log
Comment 8 Bastien Nocera 2016-02-22 13:35:50 UTC
(In reply to Wim Taymans from comment #1)
> Is it because of missing soundfont?

If that's the case, I'd expect a better error message.
Comment 9 Antonio Ospite 2016-02-22 15:56:43 UTC
Here where gst-play-1.0 works fine, it uses a pipeline equivalent to this one:

  gst-launch-1.0 filesrc location=out.mid ! midiparse ! fluiddec ! autoaudiosink

fluiddec is the element which can consume audio/x-midi-event data.

from your log it looks like midiparse gets used but fluiddec (from libgstfluidsynthmidi.so in gst-plugins-bad) is not even available.

Can this be a packaging issue?

JFYI an alternative pipeline for midi files is this one:

  gst-launch-1.0 filesrc location=out.mid ! wildmidi ! autoaudiosink

I guess that it does not get picked up because midiparse has a greater priority than wildmidi?
  
P.S. IMHO a log without colors is slightly better when you share it.
Comment 10 Vincent Penquerc'h 2016-04-18 13:29:46 UTC
I can repdroduce this.
midiparse (primary) gets plugged, but nothing takes the audio/x-midi-event data data it creates. wildmidi is only secondary, but takes the original audio/midi (and kinda works when autoplugged if I removed the midiparse plugin, but spews various warnings that ought to be fixed too).
Comment 11 Vincent Penquerc'h 2016-04-18 15:06:32 UTC
Created attachment 326270 [details] [review]
send stream-start event  before caps

This gets rid of the warnings when wildmidi gets autoplugged.
Comment 12 Vincent Penquerc'h 2016-04-18 15:09:48 UTC
As for the midiparse plugging, it'd seem easy to give a higher rank to elements that don' require another element, so that they are tried first. I'm not sure if it's possible/easy to remove already plugged elements when it turns out the chain can't be continued (ie, if we plugged midiparse, and we realize we have no element that can be plugged then, remove midiparse and continue).
But then monkeying with the ranks feels like a bit of a hack. Opinions ?
Comment 13 Edward Hervey 2018-05-05 13:57:42 UTC
Can someone retest and provide a recent log/file with current gstreamer ?
Comment 14 Bastien Nocera 2018-05-05 15:56:49 UTC
The test from comment 6 works now, it also works in totem using the repeat mode (which seeks back to the beginning).

Thanks for the reminder.