mplayer plugin for firefox can't play midi

Bug #231421 reported by Markus Schulz
20
This bug affects 3 people
Affects Status Importance Assigned to Milestone
mplayer (Ubuntu)
Opinion
Undecided
Unassigned

Bug Description

I want to play: http://kids.niehs.nih.gov/lyrics/alphabet.htm

I had no plugin install, I tried them all - both don't work for midi:
Media plugin for Gecko browser
MPlayer plugin for Mozilla

So I did download the midi file and mplayer can not play the midi, but totem player can play the midi after installing the freepats package.?

Ubuntu 8.04

Revision history for this message
Markus Schulz (schulz-alpharesearch) wrote :

markus@markus-desktop:~/Desktop$ mplayer groovy.mid
MPlayer 1.0rc2-4.2.3 (C) 2000-2007 MPlayer Team
CPU: AMD Athlon(tm) 64 Processor 3800+ (Family: 15, Model: 47, Stepping: 2)
CPUflags: MMX: 1 MMX2: 1 3DNow: 1 3DNow2: 1 SSE: 1 SSE2: 1
Compiled with runtime CPU detection.
mplayer: could not connect to socket
mplayer: No such file or directory
Failed to open LIRC support. You will not be able to use your remote control.

Playing groovy.mid.

Exiting... (End of file)
markus@markus-desktop:~/Desktop$

description: updated
Revision history for this message
Markus Schulz (schulz-alpharesearch) wrote :

Here is a workaround, but someone should take the not working plugins out of firefox and add this plugin to the list:

http://ubuntuforums.org/showthread.php?t=229671

HowTo: playing embedded midi in firefox
Info
Midi files aren't working in firefox without a special plugin and ofcourse a midi software 'renderer'.
The plugin doesn't cooperate very nice with Acrobat Reader in firefox, but using xpdf in firefox solves this problem.

Installation
Open up a terminal and execute
Code:

sudo apt-get install timidity mozplugger

Answer yes to all questions and the installation will be complete.

Restart firefox (don't forget to close all instances) and voila, embedded midi files should now play.

J.G. (j.gorski)
Changed in mplayer (Ubuntu):
status: New → Confirmed
Revision history for this message
Hibou57 (Yannick Duchêne) (yannick-duchene) wrote :

Still the same with Ubuntu 10.10, after I've tried many things to make it work, … no way, can't play a so much simple audio format which is 35 years old. By the way, that's same with Opera for Ubuntu too (except that with Opera, I could cheat it : if I give the type attribute, the string "audio/x-wav" instead of "audio/midi", Opera plays the MIDI file with the same application it use to play wave files, and this work).

There are tens and tens of application which can play MIDI in Ubuntu, why FireFox can't play MIDI file in Ubuntu ? That's really incredible.

Note : except me and the author of this bug report, there are also many and many others Ubuntu users impacted; just try a search on "ubuntu firefox midi", to figure it.

Revision history for this message
Hibou57 (Yannick Duchêne) (yannick-duchene) wrote :

Here an hint to the developers to solve the bug : I've noticed Totem, which is installed by default with all Ubuntu installations, is able to play MIDI files. Totem is actually used by the Gecko plugin to play WAV files, and it works fine for that purpose. Gnome-MPLayer is *unable* to play MIDI files, so there is no reason to insist on using it. What to do : change the Gecko plug-in which invokes Totem to play WAV, so that it declares itself as able to handle MIDI files too. This should be simple enough to do, one or two lines to change in that plug-in.

If you doubt it works, then simply try to embed a MIDI file in a web page, using the EMBED HTML element, and give it the value audio/x-wav for the type attribute. You will see FireFox invoking Totem (due to the mime type specified in the type attribute) instead of Gnome-MPlayer, and you hear the MIDI file played by Totem (indeed, actually if you want a web page to play a MIDI file in Ubuntu, you have to cheat giving the MIME type of a wave file, although it's a MIDI file).

Bonus : as Opera uses Gecko plug-ins too, this would also solve the same malfunction which impact Opera too in the mean time :)

Have a nice time (and I am dreaming to see that very simple solution to be applied soon).

Revision history for this message
Kevin DeKorte (kdekorte-gmail) wrote :

Why don't you just uncheck MIDI support in gnome-mplayer,

Edit -> Preferences -> Plugin and then uncheck MIDI support. It should have been disabled by default, at least that is how it ships from me.

Revision history for this message
Hibou57 (Yannick Duchêne) (yannick-duchene) wrote :

I've un-installed gnome-mplayer completely, so this has at least the same effect. However, this leaves the question opened : either gnome-mplayer should be fixed, or either gnome-mplayer should not be the player used for MIDI files in browsers.

I do not know if a bug can be marked as fixed with a mention like “do not use that application for this purpose”, but I feel this may be an idea here, especially because there is a solution with another with another player.

Now this would lead to a second question : how do we play MIDI files in browsers if not with gnome-mplayer ? The answer I suggest is : using Totem instead. And this is precisely the matter of another bug report from someone who, three years ago, wondered why FireFox is not relying on Totem for that : https://bugs.launchpad.net/ubuntu/+source/totem/+bug/245131

Note this does not only impact FireFox, but also Opera, which is able to use installed FireFox's Mozilla plugins.

Sorry for being late, I did not received an e-mail notification for this comment.

Revision history for this message
J.G. (j.gorski) wrote :

People on #mplayer irc channel said nobody is interested to implement midi playback in this player, 'cause, as i understand it:
1. it takes many hours of programming
2. it is an old format with no worth meaning (crappy sound)
3. mplayer stands for 'movie player', and not 'media player'

I am sorry to hear that, since vlc player, also doesn't play midi files, and the timidity mozplugger didn't worked for me from box.
The solution that stays is to download midi file and play it with totem or another midi capable player.

Changed in mplayer (Ubuntu):
status: Confirmed → Opinion
Revision history for this message
Hibou57 (Yannick Duchêne) (yannick-duchene) wrote :

Igor,

There are two aspects here : one is playing MIDI files with gnome-mplayer, the other is playing MIDI files in browser. I believe you agree these are not the same question.

> 1. it takes many hours of programming
May be, I don't known, but I still trust you

2. it is an old format with no worth meaning (crappy sound)
> Old does not implies not meaningful! HTTP is old, HTML is old, SGML is old, C is even more older than any of the formers including MIDI. MIDI is still a widely used standard. Weither it is old or not is not meaningful here, and I believe, was just raised as an excuse to carry justify #1 ( “ it would take long, I don't want to take long, I need an excuse for that ” , someone one probably says in is mind)

2. (crappy sound)
> Silly, this is not due to MIDI, but to MIDI support, that is, due to either the sound card, the installed sound fonts, the system virtual synthesizer, and so on. Who infers such a conclusion such as Old => Crappy sound ? Probably someone which really does not know anything at all about MIDI (I would suggest him/here to learn about it) Actually, MIDI files played in Totem, does not sound crappy at all (the same on Windows and Mac OSX, where MIDI is even more popular).

> 3. mplayer stands for 'movie player', and not 'media player'
Agree :) And here comes the matter I introduced above : the question applied to maplyer is not the same as that question applied to FireFox.

So this seems indeed gnome-mplayer should not register any more as a plug-in able to play MIDI files. If a clear decision was made in this direction, this would raise the need for something else, which would be good enough. This could at least help to go towards Totem for that purpose.

gnome-mplayer is indeed not intended to play MIDI files, but browsers still need to be able to play MIDI files *online*. Think of it : MIDI files are far more widely used on the web than ContentEditable features, as an example. By the way, FireFox onb Windows, as well as Opera, Safari, and even Internet Explorer since its very first release, are all able to play MIDI files. The same apply to Mac OSX. Its really a pity to not be able to play MIDI files in a browser when one use Ubuntu.

What about that idea to officially assert that gnome-mplayer should not be registered anymore as a MIDI player for browsers, and then enforce the need to go to something else for that purpose ? Seems reasonable enough ?

Revision history for this message
J.G. (j.gorski) wrote :

1., 2. and 3. statements are just what i transfered from their irc channel.

About:
>There are two aspects here : one is playing MIDI files with gnome-mplayer, the other is playing MIDI files in browser.
>I believe you agree these are not the same question.

I agree, but gecko is proposed to play media files in web browser. I have a gecko web plugin.But on it's preferences in plugin tab states that MIDI Support requires Mplayer support. Gnome-mplayer and gecko-mediaplayer relay on it, so it leads to what you said:

>What about that idea to officially assert that gnome-mplayer should not be registered anymore as a MIDI player for >browsers, and then enforce the need to go to something else for that purpose ? Seems reasonable enough ?

I agree, again.
Cheers

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

Other bug subscribers

Remote bug watches

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