Sunday, April 03, 2005

Linux, Firefox, and rtsp://

As I alluded to in the Universe in 60 Seconds comment, by default Firefox under Linux doesn't know how to handle the rtsp protocol. It didn't take long to do a Google search for a fix. The solution is found in the Gentoo Linux Wiki, and goes like this:

  1. Find your personal Firefox subdirectory. After Firefox 1, it will be something like ~/.mozilla/firefox/XYZZY123.default, where XYZZY123 is actually a random string of numbers and letters
  2. As a check to see you are in the correct directory, look for a file named prefs.js, but don't edit it.
  3. Now look for a file named user.js. If present, that's good. If not, create it in the directory where you found prefs.js.
  4. Edit your new or existing user.js file so that it includes the following lines:

    user_pref("network.protocol-handler.external.rtsp", true);
    user_pref("network.protocol-handler.app.rtsp", "/usr/bin/realplay");

    replacing /usr/bin/realplay by the location of your Real or Helix Player client, if necessary.
  5. Quit Firefox, if you haven't already.
  6. It wouldn't hurt to delete the file ~/.mozilla/firefox/pluginreg.dat
  7. Restart Firefox.
  8. Click Here (rtsp://nsfvideo.nomex.net/special_report/universe.smi)
  9. A warning box will appear. Tell it everything's OK, and don't bother coming back again.
  10. A Real/Helix Player client should appear, and the movie should start.

Caveat: this assumes that RealPlayer can handle all rtsp requests, which may not be the case in the future.

July 6, 2005: This is, without a doubt, the most frequently accessed post here at Linux & Things. It's the top Google[TM] search for ''rtsp firefox'' as well. Heck, even Windows users look here for information. So, if this page has been helpful to you, could you please leave a comment? In fact, if it's been spectacularly unhelpful, please leave me a comment on how to revise it. I'd hate to think that day after day people look for help playing RealPlayer under Firefox, come here, and then find that this page wasn't much help.

13 comments:

Anonymous said...

Very helpful thanks. Although all the messing around manually with files isn't necessary; it's sufficient to go to about:config and create the new options there.

Anonymous said...

this info was helpful, but i am not sure if i will put it to use. i looked up the rtsp protocol because my sister was having problems (clicking simply brings up an alert that the protocol is not recognized). if i do decide to mess w/ her files, this info will have been very helpful.

the previous poster's comment was great to know as well.

also, orioles are NOT flightless. don't even get me started on jayhawks. (and no, i did not use this nick only for this post; i am psychotic about birds)

rcjhawk said...

also, orioles are NOT flightless

Obviously you have not checked the standings in the American League East.

Anonymous said...

Thank you for helping me solve that "rtsp" thing :-)

rcjhawk said...

You're Welcome.

Anonymous said...

Worked like a charm - thanks!

Anonymous said...

Thanks. But is there a way to make this a GLOBAL default for Firefox?

rcjhawk said...

In

/firefoxinstallationdirectory/defaults/pref

there is a file called

firefox.js

if you add a line

pref("network.protocol-handler.external.rtsp", true);

then you might enable RTSP support. I'm not saying you will, because I haven't tried it.

There's also a /firefoxinstallationdirectory/defaults/profile/prefs.js

file, which is empty on my machine. If you put the user_prefs commands there, they might be propagated to the whole world. I don't guarantee that, either.

Unknown said...

I found that this didn't work for me but this suggestion from: https://bugzilla.mozilla.org/show_bug.cgi?id=202715did
"The solution lays within Real Player preferences.

Open Real Player/Tools/Preferences/Content/Media Types/Manually configure media
types for RealPlayer/Select, scroll down to Real-Time Streaming Protocol and
mark it.

This worked in Real Player 10.5"

Unknown said...

using windows by the way

rcjhawk said...

Kris,

That is the Windows solution. I covered it in a later post, which I guess I should reference here.

Anonymous said...

Thanks!

Between your help, oss-compat package and some quality time with the Konsole, worked out great.

Cheers

indra said...

thanks for the information hopefully can provide value to the many benefits