Jump to content

firefox / timidity / mozplugger


alphaomega

Recommended Posts

...and I just wanted to point out the following in case it is helpful to someone else.For the life of me I could not seem to get embedded midi to work using these apps.The information I found online mentioned to make sure my file associations were correct for midi files.Or to remove firefox's pluginreg.dat file and have firefox recreate it.Everything appeared to work but no sound played and the player would stop after about 1 second.Taking a chance, I made the following changes in mozpluggerrc:I changed:

audio/mid:midi,mid:MIDI audio fileaudio/x-mid:midi,mid:MIDI audio fileaudio/midi:midi,mid:MIDI audio file audio/x-midi:midi,mid:MIDI audio file		controls noisy stream: timidity -Od "$file"		controls: playmidi "$file"

To:

audio/mid:midi,mid:MIDI audio fileaudio/x-mid:midi,mid:MIDI audio fileaudio/midi:midi,mid:MIDI audio fileaudio/x-midi:midi,mid:MIDI audio file		controls noisy stream: timidity -iA -ig -Os "$file"		controls: timidity -iA -ig -Os "$file"

And I copied the totem helper application code in mozpluggerrc and modified it for use with timidity.I changed:

### Totemdefine(TM_CMD,[totem $1</dev/null])define(TM_EMBED,[embed noisy ignore_errors hidden fill swallow(Totem): TM_CMD(--toggle-controls $1)])														   define(TM_NOEMBED,[nokill noembed noisy ignore_errors: TM_CMD($1)])define(TM_VIDEO_STREAM,[stream TM_EMBED("$file")		stream TM_NOEMBED("$file")])			# Special case for Quicktimedefine(TM_LINKS,[stream links controls nokill noembed noisy ignore_errors: TM_CMD($1)])																		 define(TM_AUDIO_STREAM,[controls stream noisy ignore_errors: TM_CMD("$file")])

To:

### Timiditydefine(TM_CMD,[timidity $1</dev/null])define(TM_EMBED,[embed noisy ignore_errors hidden fill swallow(Timidity): TM_CMD(--toggle-controls $1)])define(TM_NOEMBED,[nokill noembed noisy ignore_errors: TM_CMD($1)])

And low an behold...embedded midi in web pages now works.And for pages I created with embedded midi. I had to make sure the object was not hidden(with hidden='true' I could not get it to play even with autostart='true').I hope this is helpful...Just one thing though.When configured this way, I see timidity on the taskbar.And I can click on this to bring up timidity playing the embedded file.Is this the way it is supposed to be...or is there something else I can do to hide it?Thanks in advance.Cheers

Edited by alphaomega
Link to comment
Share on other sites

Wow . . . thanks for posting these instructions . . . hope it will help other people getting to play embedded midi B) :lol: Bruno

Link to comment
Share on other sites

  • 6 months later...

And about six months later I find myself here again after doing a search on googlefor a problem I was having with embedded midi files playing at 123greetings wherethis thread came up top in the list.It appears that mplayerplug-in-wmp and mozplugger are not playing nice.Going over my notes in this thread it appeared that every thing was in place.123greetings was using a mime type of application/x-mplayer2.My mozpluggerrc is configured so that mozplugger only handle midi files.mozpluggerrc is configured with:application/x-mplayer2:midi,mid:MIDI audio fileAnd all appeared to be working.mozplugger would play the embedded midi file using timidity.But then the next thing you know mplayerplug-in-wmp would all of the sudden try to play the embedded midi files instead of mozplugger.mplayerplug-in is not configured to handle midi files:

# cat .mplayer/mplayerplug-in.conf | grep midenable-midi=0

When mplayerplug-in-wmp is disabled through firefox/tools/add-ons/plugins,I get nothing on the page for the embedded midi.When moving /usr/lib/mozilla/plugins/mplayerplug-in-wmp.so out of the way,mozplugger plays the embedded midi file.about:plugins showsThe mime type for mplayerplug-in:application/x-mplayer2 Windows file * YesThe mime type for mozplugger:application/x-mplayer2 MIDI audio file midi,mid Yesaudio/midi MIDI audio file midi,mid YesSo it appears that the two plugins are both configured to handle mime type application/x-mplayer2.Is it possible to have mozplugger override mplayerplug-in?Or configure mplayerplug-in to handle all sufixes (*) except (-mid)?Any thoughts?TIACheers

Edited by alphaomega
Link to comment
Share on other sites

Got it fixed.I configured mozpluggerrc with:application/x-mplayer2:*:MIDI audio filemozplugger is configured to play only midi files.about:plugins now shows:mplayerplug-in with:application/x-mplayer2 Windows file * Yesand mozplugger with:application/x-mplayer2 Media Files * YesAnd although both are using the mime type application/x-mplayer2,mozplugger and mplayerplug-in are now playing well together.:) Cheers

Link to comment
Share on other sites

Hey! Lotta' help we were, huh Alpha? Well, you got it fixed. That's what matters. :)
Well. I thought it was fixed but I spoke too soon.The embedded midi file at 123greetings gets played by mplayerplug-inwhen both plugins (mplayerplug-in and mozplugger) are enabled.Firefox's page information indicates that the midi file is of type application/x-mplayer2On another site, the embedded midi file gets played by mozplugger when both plugins are enabled.Firefox's page information indicates that the midi file is of type audio/midiI'm trying to figure out a way (if possible) to have mozplugger play embedded midi files when the mime type is application/x-mplayer2and have mplayerplug-in play all the other stuff that comes in with a mime type of application/x-mplayer2 (without having todisable the mplayerplug-in-wmp).???It would be so much easier if the site would indicate the type of media file being used (mime type audio/midi) instead ofindicating which application to play the media file with(mime type application/x-mplayer2). Edited by alphaomega
Link to comment
Share on other sites

securitybreach

Have you tried the vlc-plugin. The reason I ask is I have yet to find something that vlc could not play. I also normally just use the mplayer-plugin but then again I do not need midi support.

Link to comment
Share on other sites

Have you tried the vlc-plugin. The reason I ask is I have yet to find something that vlc could not play. I also normally just use the mplayer-plugin but then again I do not need midi support.
I was thinking about installing that after reading a post by eric laytonwhich led me find a package for vlc by alien bob built so that it has no dependencies (all the needed libraries compiled into the program).I wonder if it was built with fluidsynth? Looks like it.Am going to try and find a decent sound font file and try it out. Edited by alphaomega
Link to comment
Share on other sites

Sounds good, let us know how it goes.
vlc (1.0.1) and vlc-mozplugin (1.0.1) are now installed.I located a sound font file and vlc can now play midi files.And of course it plays pretty much anything else you throw at it.about:plugins shows the vlc plugin (libvlcplugin.so) installed.Now I just need to mess with the settings to switch from mplayerplug-in and mozplugger to libvlcplugin.That way all embedded media files will get played by vlc.So far, disabling the other plugins does not work(libvlcplugin does not appear to take over...instead I get a message about the needed plugin being disabled).This was for a media file with a mime type of video/mpeg.mplayerplug-in and libvlcplugin are both configured to handlethe mime type of video/mpeg (but mplayerplug-in is disabled).If I move the other plugins out of the /usr/lib/mozilla/plugins directory,libvlcplugin takes over (at least for the two mime types I've tested-video/mpeg and video/x-ms-wmv).However the video does not play correctly.The video plays but I can only see the bottom 1/4in of the video.The videos play fine in mplayer and I do have the windows codecs.I need to see if I can figure out why that is happeningand then try and figure out how to get it to playembedded midi files.Off to find more information.Cheers Edited by alphaomega
Link to comment
Share on other sites

Alpha,In the future, if you run across a SlackBuild by Eric Hameleers AKA Alien Bob, you can pretty much (110%) be sure that it's going to work without any troubles. :yes:Here's a bit if reading for you... http://www.linux-mag.com/cache/7502/1.html
Of course, that is not the way it usually works for me. LOLIt is sort of working for me.vlc can play the files (when composite is off).and vlc can play the files (when composite is on but the screengoes black if I for example minimize another window).looks like the nvidia driver may not be playing nice.the libvlcplugin is now playing embeddied media files.with composite on (I either see just the bottom 1/4 in.of the video or a black screen).with composite off (the video plays...pauses...and then just stops playing).and I still have not figured out how to get libvlcplugin to play embedded midi files. :(I notice if I play the video in vlc with composite on,the video plays but the video goes black if I minimize another window,If I turn composite off (alt-shift-f12)...the video starts showing again.;) Edited by alphaomega
Link to comment
Share on other sites

Sounds like a compositing bug of some sort. What WM/DE? Xfce? KDE? Maybe you should report it?
I'm using KDE and the problem also occurs in Xfce.I went through the vlc video output options and noted:When using opengl video output, the problem with the video going black does not occur but the video stays on top (regardless of the "always on top" setting in vlc).When using X11 video output the problem does not occur.The problems still occur with embedded media.But I'm making some progress.
Link to comment
Share on other sites

Progress is a good thing in this situation. :)
Yep...I'm slowly getting there...With compositing off, the embedded media plays fineif the media is on my local machine as opposed to coming over the internet.With compositing on, I have the problem with the video going black.It looks like the libvlcplugin is experiencing the same problem vlcwas experiencing before I set it to use x11 for video output.And I'm not sure what is going on with playback when the file is on the internet. They work fine when using the mplayerplug-in..At this point, I'm tempted to leave well enough alone.If I have to, I know I can write a simple scriptthat will move the needed plugin to /usr/lib/mozilla/pluginsso that it is in place for use before I run firefox.Just another quirk to work around.Right now, when both mplayerplug-in and libvlcplugin are installed,if I disable mplayerplug-in libvlcplugin does not take over.I have to remove mplayerplug-in for libvlcplugin to take over.Cheers Edited by alphaomega
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...