plays midi, but complains about missing codec afterwards

Bug #208068 reported by Mark Van den Borre on 2008-03-28
50
This bug affects 3 people
Affects Status Importance Assigned to Milestone
GStreamer
Fix Released
Medium
gst-plugins-bad0.10 (Ubuntu)
Low
Unassigned
Hardy
Low
Emilio Pozuelo Monfort
wildmidi (Ubuntu)
Undecided
Unassigned
Hardy
Undecided
Unassigned

Bug Description

platform: Ubuntu 8.04 beta, up to date as of 2008-03-28

Software MIDI playback using totem works great.

Only... after the MIDI file has played, totem complains about a missing "audio/midi decoder-plugin" it can't find. Pity...

TEST CASE
Install gstreamer0.10-plugins-bad from hardy (make sure you have freepats installed too).
Play a midi file with Totem.
When the midi ends, you will see an error that there's no codec for playing midi files. You can't play it again, unless you restart Totem.

Now install gstreamer0.10-plugins-bad from hardy-proposed.
Play a midi file with Totem.
When it ends, it won't complain, and you will be able to play it again without closing.
END TEST CASE

jlparise (jlparise) wrote :

Hello, thanks for filing a bug report to help make Ubuntu and totem better!

I think if you attached the MIDI that caused this issue to this bug it would help. Also, is it one particular MIDI file or all MIDI files?

Also, try running totem from the command line. Attach any output before and after the error to this bug report.

Changed in totem:
assignee: nobody → jlparise
status: New → Incomplete
Mark Van den Borre (markvdb) wrote :

Totem has this "missing codec" issue with any MIDI file. http://mutopiaproject.org/ftp/BachJS/BWV678/bwv678/bwv678.mid is just one of them.

mark@looksaus:~$ totem --debug /tmp/bwv678.mid
libWildMidi(WildMidi_Init:3707): ERROR Library not Initialized
** Message: don't know how to handle audio/midi
** Message: Error: Een audio/midi decoder plugin is vereist voor het afspelen van deze gegevens, echter deze is niet geïnstalleerd.
gstdecodebin.c(792): close_pad_link (): /play/decodebin1:
No decoder to handle media type 'audio/midi'

** Message: Missing plugin: gstreamer|0.10|totem|audio/midi decoder|decoder-audio/midi (audio/midi decoder)

** (gnome-codec-install:11578): WARNING **: return value of custom widget handler was not a GtkWidget
extra codec-installatie afgewezen
libWildMidi(WildMidi_Init:3707): ERROR Library not Initialized
** Message: don't know how to handle audio/midi
** Message: Error: Een audio/midi decoder plugin is vereist voor het afspelen van deze gegevens, echter deze is niet geïnstalleerd.
gstdecodebin.c(792): close_pad_link (): /play/decodebin2:
No decoder to handle media type 'audio/midi'

** Message: Missing plugin: gstreamer|0.10|totem|audio/midi decoder|decoder-audio/midi (ignoring)
** Message: All missing plugins are blacklisted, doing nothing

Mark Van den Borre (markvdb) wrote :

Added the requested information.

Changed in totem:
status: Incomplete → Confirmed
Pedro Villavicencio (pedro) wrote :

please do not confirm your own reports.

Changed in totem:
status: Confirmed → New
Pedro Villavicencio (pedro) wrote :

I'm able to reproduce the file on Hardy, but i got a few messages like:

libWildMidi(WM_BufferFile:629): ERROR Unable to stat /usr/share/midi/freepats/Tone_000/000_Acoustic_Grand_Piano.pat (No such file or directory)
libWildMidi(WM_BufferFile:629): ERROR Unable to stat /usr/share/midi/freepats/Tone_000/074_Recorder.pat (No such file or directory)
libWildMidi(WM_BufferFile:629): ERROR Unable to stat /usr/share/midi/freepats/Tone_000/068_Oboe.pat (No such file or directory)
libWildMidi(WM_BufferFile:629): ERROR Unable to stat /usr/share/midi/freepats/Tone_000/075_Pan_Flute.pat (No such file or directory)

but it's proably not the same bug since you're having codecs issues rather, not confirming.

Emilio Pozuelo Monfort (pochu) wrote :

I've reproduced this:

1/ Install gstreamer0.10-plugins-bad (doesn't matter if you install it manually or via automatic-codec-installation)
2/ Open a midi file with totem
3/ Wait until it's reproduced, and in the end, it will tell you there's no codec to play that file!

This sounds more like a bug in the GStreamer wildmidi plugin though, as otherwise we would get this dialog for every other file...

Changed in totem:
assignee: jlparise → nobody
Pedro Villavicencio (pedro) wrote :

confirming, but more like a gstreamer issue re assigning.

Changed in totem:
status: New → Confirmed
Pedro Villavicencio (pedro) wrote :

attaching gstreamer log of it.

Changed in gst-plugins-bad0.10:
importance: Undecided → Low
status: Confirmed → Triaged
Conrad Knauer (atheoi) wrote :

I can confirm this; I made a brief mention of this in a comment to Bug #111555

"when it gets to the end of the song, I get the "search for suitable codec?" message, but the result is "There is no matching application available." (yet... it was just playing! 8-)"

This appears to happen with all MIDIs on my system BTW. Confirmed also on the bwv678.mid linked above.

jlparise (jlparise) wrote :

Can anyone confirm that this is also a bug in gstreamer? If we could figure out this bugs relation to gstreamer it could help solve the issue.

Emilio Pozuelo Monfort (pochu) wrote :

jlparise, this is already tracked down to gstreamer, and there's an upstream bug report about it.

Greg A (etulfetulf) wrote :

This affects Rhythmbox as well.

Greg A (etulfetulf) wrote :

The upstream report suggests this is caused by wildmidi itself. I'm adding wildmidi as an 'affects'.

Emilio Pozuelo Monfort (pochu) wrote :

If you mean this:

>Sebastian Dröge has told me he believes this is caused by wildmidi reporting a
> wrong error.

I think that was referring to the gstreamer's wildmidi plugin, not to wildmidi itself.

Greg A (etulfetulf) wrote :

Yes I did mean that. I don't know how GStreamer plugins work - is the plugin 'data' held in the gstreamer package or in the libwildmidi0 package?

fluteflute wrote:
> Yes I did mean that. I don't know how GStreamer plugins work - is the
> plugin 'data' held in the gstreamer package or in the libwildmidi0
> package?
>

IIUC, it's in GStreamer, and it uses the wildmidi library (libwildmidi)

Changed in gstreamer:
status: Unknown → New
bmdavis (bdafrica) wrote :

Yeah, can't play it with TOTEM or RHYTHMBOX on Hardy as well.

-Brian

Emilio Pozuelo Monfort (pochu) wrote :

bmdavis wrote:
> Yeah, can't play it with TOTEM or RHYTHMBOX on Hardy as well.

This is about being able to play midi files, but totem/rhythmbox complaining of
a missing codec after it. If you can't play midi files at all, please report a
new bug. Thanks!

If you can't play midi files and you get something like this:
libWildMidi(WM_BufferFile:629): ERROR Unable to stat /usr/share/midi/freepats/Tone_000/000_Acoustic_Grand_Piano.pat (No such file or directory)

You are missing the "freepats" package, just type "sudo apt-get install freepats". In my opinion libwildmidi should have a dependecy on freepats. Without freepats libwildmidi will not play anything.

See this Bug #218235 for missing pat files...

Any progress on this bug, would love to have some midi action in Rythmbox.

Emilio Pozuelo Monfort (pochu) wrote :

snowpunk98 wrote:
> Any progress on this bug, would love to have some midi action in
> Rythmbox.
>

It works with Rhythmbox, this is a different issue

Greg A (etulfetulf) wrote :

Not it doesn't. This bug covers rhythmbox and totem (and anything else using gstreamer).

Emilio Pozuelo Monfort (pochu) wrote :

That's bug 218235, install freepats.

Greg A (etulfetulf) wrote :

Freepats is installed - bug #208068 (this one) still occurs in both totem and rhythmbox.

Emilio Pozuelo Monfort (pochu) wrote :

So it plays, but complains afterwards? I thought "would love to have some midi action in Rythmbox" meant it wasn't playing.

I know this bug still happens, that's why it's opened and forwarded upstream.

Greg A (etulfetulf) wrote :

Well it's impossible to listen to a collection of midi files in rhythmbox without restarting it for every file. I assumed snowpunk meant this bug as they reported it under this bug. :) Let's just wait and see what snowpunk says his/her problem is.

I have Rythmbox set to scan my music DIR, in there I have a MP3 and MIDI subdir. When I open Rythembox it asks me to search for a suitable codec to play them. It then has import errors on the left hand pane and in there are all the .mid files. When I double click any of them to play it does not play anything. I have the wildmidi library installed (not the player). I have not tried the freepats fix you suggest however I can later, so currently midi does not work in Rythmbox.

Greg A (etulfetulf) wrote :

Ok, I think Emilio is correct that you are experiencing Bug #218235. However, once you do so this one will probably occur for you.

Emilio Pozuelo Monfort (pochu) wrote :

So try installing freepats. But even if it doesn't work then, file a new bug
report, this is about a different issue

I installed freepats, now if I import a mid into Rythmbox it does not complain, however after it finishes playing and I attempt to play it again it prompts me to search for a suitable codec again. in Totem however, if I open a brand new session and open a midi it says "totem could not play 'file:///home/user/Music/MIDI/1942.mid there is no plugin to handle this movie"

Freepats is not complete, there are sound files missing and it don't sound so good anyway. But there is a solution: timidi+fluid. If fluid is to large, maybe fluid could at least be used to complete freepats.

Markus
PS: please see also Bug #196135 for a OGG sample to compare freepats and fluid.

I was playing around with gstreamer and libwildmidi.
It seems that gstreamer runs WildMidi_Init() from libwildmidi each time a song is played and it should ONLY be calling that function once. I fixed this problem on my own system by compiling my own version of libwildmidi that if a program tried calling it more than once, it ignores it and continues on it's job.

Emilio Pozuelo Monfort (pochu) wrote :

<email address hidden> wrote:
> I was playing around with gstreamer and libwildmidi.
> It seems that gstreamer runs WildMidi_Init() from libwildmidi each time a song is played and it should ONLY be calling that function once. I fixed this problem on my own system by compiling my own version of libwildmidi that if a program tried calling it more than once, it ignores it and continues on it's job.

That's nice! Could you attach a patch here?

Also, do you think that's a reasonable solution or should we fix the GStreamer
plugin instead so that it doesn't call WildMidi_Init more than once?

Emmet Hikory (persia) wrote :

I'd much rather change the GStreamer plugin to either only call WildMidi_Init once or cleanly exit before opening for the next song. The issue with having WildMidi_Init ignore subsequent calls is that WildMidi stays active, and so the user may have issues if the configuration is changed, etc.

Changed in gstreamer:
status: New → Fix Released
Changed in wildmidi:
status: New → Invalid
Changed in gst-plugins-bad0.10:
status: Triaged → Fix Committed
Joe Kilner (joekilner) wrote :

I am still seeing this problem in rhythmbox with midi files. Does this mean that the bug hasn't been fixed or is the "Fix Released" status of this bug misleading...

Greg A (etulfetulf) wrote :

Have you tried in Intrepid or with a compiled new version? The fix is very unlikely to make its way into Hardy.

Greg A (etulfetulf) wrote :

This is definitely fixed now (in Ubuntu Intrepid).

Changed in gst-plugins-bad0.10:
status: Fix Committed → Fix Released

In Hardy Heron LTS the problem is still present (I also installed freepats ma nothing new happens). Can you fix this in Hardy too? I hope it isn't like other bugs only fixed in Intrepid.
I think the fix should be ported to Hardy too or at least there should be a message in Hardy, when a user try to listen to midi files (you can do this in Totem as it's the default player in Ubuntu) that helps him to resolve the issue (for example: "to listen to midi files you have to install this package", or "to listen to midi files you have to do these steps" and so on).

I think we can standardize two types of patches:
1) one patch is the typical fix of a bug (made in the last stable release)
2) the second type of patch is a workaround (a message, a pop-up, etc) that helps user to resolve the bug in some way (that is "install a package", "do these steps", and so on). This type of patch is useful (and mandatory to do) when we cannot backport a fix into the previous supported distros (even if I think LTS should involve a major effort to patch backporting).

Changed in gst-plugins-bad0.10:
assignee: nobody → pochu
importance: Undecided → Low
status: New → In Progress
Changed in wildmidi:
status: New → Invalid
Emilio Pozuelo Monfort (pochu) wrote :

Attached is the debdiff for hardy-proposed (which I've already uploaded and is waiting for approval).

I've tested it in Hardy and it fixes the issue.

description: updated
Changed in gst-plugins-bad0.10:
status: In Progress → Confirmed
Martin Pitt (pitti) wrote :

Accepted into hardy-proposed, please test and give feedback here. Please see https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you in advance!

Changed in gst-plugins-bad0.10:
status: Confirmed → Fix Committed
Luca Falavigna (dktrkranz) wrote :

Fine from motu-sru POV.

Emilio Pozuelo Monfort (pochu) wrote :

I can confirm the fix works fine in Hardy.

Martin Pitt (pitti) wrote :

Copied to hardy-updates.

Changed in gst-plugins-bad0.10:
status: Fix Committed → Fix Released
Arnt Richard Johansen (arj) wrote :

I experience this issue on Ubuntu 8.04.4 LTS.

totem version: 2.22.1-0ubuntu3
gstreamer0.10-plugins-bad version: 0.10.6-5

Kip Warner (kip) wrote :

I confirm this bug's presence under Lucid. I have wildmidi installed. Playing through either Totem or Rhythmbox doesn't work with MIDIs. I just get prompted to search for a suitable codec. It finds nothing, though I already have both timidity and wildmidi libs / binaries installed.

$ totem --debug credits.mid
(totem:5857): Totem-DEBUG: Received SaveYourself(SmSaveLocal, !Shutdown, SmInteractStyleNone, !Fast) in state idle
(totem:5857): Totem-DEBUG: Setting initial properties
(totem:5857): Totem-DEBUG: Sending SaveYourselfDone(True) for initial SaveYourself
(totem:5857): Totem-DEBUG: Received SaveComplete message in state save-yourself-done
(totem:5857): Totem-DEBUG: Init of Python module
(totem:5857): Totem-DEBUG: Registering Python plugin instance: BBCViewer+TotemPythonPlugin
(totem:5857): Totem-DEBUG: Creating object of type BBCViewer+TotemPythonPlugin
(totem:5857): Totem-DEBUG: Creating Python plugin instance
(totem:5857): Totem-DEBUG: totem_playlist_add_one_mrl (): credits.mid (null) (null)

** Message: Error: Your GStreamer installation is missing a plug-in.
gstdecodebin2.c(2944): gst_decode_bin_expose (): /GstPlayBin2:play/GstURIDecodeBin:uridecodebin0/GstDecodeBin2:decodebin20:
no suitable plugins found

** Message: Missing plugin: gstreamer|0.10|totem|audio/midi decoder|decoder-audio/midi (audio/midi decoder)
(totem:5857): Totem-DEBUG: Finalizing Python plugin instance

Changed in gstreamer:
importance: Unknown → Medium

For best midi experience under Ubuntu install fluid-soundfonts-gm (GM!); it is 74 MB but it has the best samples. Use this together with timidity - to activate you need to change the /etc/timidity/timidity.cfg to use the file (just comment freepats and uncomment fluid gm)... or if you don't want to use so much space use freepats package...

Kip Warner (kip) wrote :

Hey Markus. My friend is a hardcore 8-bit junky. He eats, sleeps, and shits in 8-bit. Is there a soundfont that he can use that's oldschool NESish?

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.