[dapper] playable movies can't be played if inside a web page!

Bug #38584 reported by Nicolò Chieffo
12
Affects Status Importance Assigned to Milestone
Totem
Fix Released
Medium
totem (Ubuntu)
Fix Released
Medium
Ubuntu Desktop Bugs

Bug Description

hello! I was surfing a web page with a video inside, this is the link

http://www.allmusic.tv/video.asp?video=ams/pt01

as you can notice if you try, the place where the video should be visualized is black, and totem controls whick should appear in the bottom, seem to have crashed (see attached pic)

Then I decided to visualize the source page and get the link to the video by hands, which is mms://mediaserver.kataweb.it/allmusic/ams/pt01.wmv

then I opened my totem-xine and put this link, and I realized it could play the video!!!! so it sould play it from the webpage too...

Revision history for this message
Nicolò Chieffo (yelo3) wrote :

no pic, since this time the bar appeared,but again no video is visualized

Revision history for this message
Nicolò Chieffo (yelo3) wrote : bar-ok.png

screenshot, when the page has just been loaded

Revision history for this message
Nicolò Chieffo (yelo3) wrote : bar-crashed.png

totem was crashed also before, becuse bar buttons could not be pressed.
but in this screenshot we can see totem really crashed.
if I try to make an action on the tab (close, back) firefox hangs for a minute (I think he's trying to close gently totem), then executes the action and comes back to its ordinary status

Revision history for this message
Sebastien Bacher (seb128) wrote :

Thanks for your bug. I've forwarded it upstream: http://bugzilla.gnome.org/show_bug.cgi?id=339142

Changed in totem:
assignee: nobody → desktop-bugs
status: Unconfirmed → Confirmed
Revision history for this message
Sebastien Bacher (seb128) wrote :

Do you know how to get a backtrace? Could you get one for the totem crash?

Revision history for this message
Nicolò Chieffo (yelo3) wrote : Re: [Bug 38584] Re: [dapper] playable movies can't be played if inside a web page!

dear sebastian, I did this:
firefox --g-fatal-warnings

and then I visited the link to the video: this is the output:
Init scriptable instance
mode 1
argv[0] src mms://mediaserver.kataweb.it/allmusic/ams/pt01.wmv
argv[1] type video/x-ms-asf-plugin
argv[2] pluginspage
http://www.microsoft.com/windows/mediaplayer/download/default.asp
argv[3] autostart 1
argv[4] showcontrols 1
argv[5] showstatusbar 1
argv[6] autorewind 0
argv[7] showdisplay 0
argv[8] height 387
argv[9] width 516
CMD line: /usr/lib/totem/totem-mozilla-viewer --xid 50350854 --width
516 --height 387 --url
mms://mediaserver.kataweb.it/allmusic/ams/pt01.wmv fd://0
** Message: totem_embedded_open 'fd://0'

of course fd://0 is not what it should be launched...
anyway I tried to do this from a command line:
/usr/lib/totem/totem-mozilla-viewer --width 516 --height 387
mms://mediaserver.kataweb.it/allmusic/ams/pt01.wmv

and it works! what I did is just remove --url and fd://0 leaving the
argument of --url a normal argument!

Revision history for this message
Nicolò Chieffo (yelo3) wrote :

anyway /usr/lib/totem/totem-mozilla-viewer is in totem-xine package,
not in totem-xine-firefox-plugin

Revision history for this message
Gary Coady (garycoady) wrote :

fd://0 refers to stdin (the backend reads from the frontend through a pipe). It usually has to be done this way (rather than passing a URL) because firefox may have to pass cookies/authentication details/etc. to the website.

Though that brings up an interesting point here - could it be that the only URLs to have trouble might be mms: URLs? Because Mozilla obviously wouldn't know how to download them... something to investigate.

Further info:
nsPluginInstance::SetWindow is called three times, but after that - nothing. No call to nsPluginInstance::Write or nsPluginInstance::WriteReady. Which is also a suggestion that firefox wasn't able to send any data.

One more thing about the apparent hang of the UI - if you test totem-mozilla-viewer by passing a video in over stdin, the UI doesn't seem to be updated until a sufficient amount of data to display video is shown.

Revision history for this message
Nicolò Chieffo (yelo3) wrote :

well, I tried to put in the firefox address bar the url with mms://...
and it automatically opens a totem new window with the video inside
(working). every first time I try it I have a connection refused
message, but the second time works
--
If fd://0 means standard input, why passing the url to totem?

if I click on the crashed totem I get this debugging messages:
** Message: GetHelperForLanguage
** Message: GetInterfaces

how did you get the nsPluginInstance::SetWindow??

it should be great if we tried with other sites too!

Revision history for this message
Gary Coady (garycoady) wrote :

I'm sorry if I gave the wrong impression with my previous comment - it was just a set of comments on my findings so far.

To answer your questions as best I can:
if you open a URL in the address bar with mms:, then a helper application will be called. That can show the URL in another window. However, that isn't much use when trying to use a plugin.

The debug messages you see are just debug messages, and don't help with this problem. The nsPluginInstance comment is a reference to the way Netscape/Mozilla/Firefox communicates with plugins, though it's difficult to get good documentation on this :-)

The model used by totem is that firefox downloads the content, and passes it to the totem backend. I don't know why the URL is passed to totem, and the argument doesn't look like it was used. This model makes sense for http: and ftp: URLs, but NOT for mms: URLs, as firefox cannot handle them itself (I think).

My proposed way of handling this would be to check if the URL passed to the plugin starts with mms: - if it does, then pass the URL to totem instead of fd://0.

I will be attaching a possible fix in a minute, though it does need a bit more testing than I have given it so far.

Revision history for this message
Gary Coady (garycoady) wrote : Fix streaming for specified URL

This patch does a few things:

1. passes URL on command line to totem instead of fd://0, if it begins with mms:
2. in totem_plugin_write_ready and totem_plugin_write, tells firefox it doesn't want any data, if URL begins with mms:
3. adds video/x-wmv MIME type, otherwise the video format isn't recognised

Note: the video/x-wmv type is recognised as having the name "ASF video", where maybe it should have "WMV video".

Revision history for this message
Sebastien Bacher (seb128) wrote :

Thank you for the work on that Gary!

This upload fixes the issue:

 totem (1.4.0-0ubuntu4) dapper; urgency=low
 .
   * debian/patches/08_aspect_ratio_fix.dpatch:
     - patch from upstream CVS, work by j^ <email address hidden>, fix the aspect ratio
       setting usage (Ubuntu: #40904)
   * debian/patches/09_play_protocol_not_listed_by_firefox.dpatch:
     - patch from upstream, work by Gary Coady <email address hidden>, fix the
       playing of protocoles not listed by firefox (Ubuntu: #38584)

Changed in totem:
status: Confirmed → Fix Released
Revision history for this message
Nicolò Chieffo (yelo3) wrote :

I must reopen the bug! try this link:

http://multimedia.repubblica.it/home/219614

the message is this:
in italian:
"Non e stato trovato il plug-in per visualizzare il contenuto multimediale. Per scaricarlo gratuitamente, clicca qui.

Per visualizzare il contenuto multimediale fuori dal browser, clicca qui"

translated in english
"Multimedia plugin not found. Download it for free here.

to visualize multimedia content out of your browser click here"

I tried the second "click here" and the browser crashed.

I'll try using mplayer firefox plugin and I'll let you know

Changed in totem:
status: Fix Released → Needs Info
Revision history for this message
Nicolò Chieffo (yelo3) wrote :

Yes, mozilla-mplayer works well!
What's wrong with totem-firefox plugin?

Revision history for this message
Gary Coady (garycoady) wrote :

The JavaScript which displays the movie in this case looks for a plugin called "Windows Media", and if it doesn't find it, presents the dialog you saw.
While Totem provides one plugin instance, called "Totem Mozilla Plugin", mplayer provides a few, one of which is called "Windows Media Player Plugin".

If you think that Totem should also pretend to be called "Windows Media Player" for the sake of broken websites like this, could you please open a separate wishlist bug for that? The basic feature would be that totem-firefox-plugin would name itself after various Windows plugins, for the sake of websites that look explicitly for such names in the list of plugins. (it is going quite far in search of full compatibility, and I wouldn't be sure that upstream would consider fixing it).

I was unable to reproduce the crash. If you can reproduce it, could you please try to obtain a backtrace by following the instructions on http://wiki.ubuntu.com/DebuggingProgramCrash.
This will greatly aid us in tracking down your problem.
To run firefox under a debugger, run "firefox -g" from the command line.
Since it would confuse this bug to add the crash information to it (one bug should be about one thing), could you add any information you find to a new bug entry?

If this is okay with you, I'll reclose this bug tomorrow - the particular bug described when the bug was opened, was fixed.
Thanks.

Revision history for this message
Nicolò Chieffo (yelo3) wrote : Re: [Bug 38584] Re: [dapper] playable movies can't be played if inside a web page!

OK, I'll open the two new bugs! thank you

Revision history for this message
Sebastien Bacher (seb128) wrote :

Don't bother for the Window Media Player name, I've already opened a bug upstream about that and upstream closed it saying that's the website being bugged: http://bugzilla.gnome.org/show_bug.cgi?id=337414

Revision history for this message
Nicolò Chieffo (yelo3) wrote :

I can't understand why they're so strict... It's a very simple work to
be done whith 0 effort!
anyway I've opened the bug, since I didn't read the email, I'm sorry...

please take a look at this other bug too! it seems that both totem and
mplayer are not started!
https://launchpad.net/distros/ubuntu/+source/totem/+bug/42719

Revision history for this message
Sebastien Bacher (seb128) wrote :

They are "so strict" because they can use only one name for their software, and why should them call it "Window Media Player"? It's a free player and has nothing to do with Window, there is no reason to acknowledge than only Microsoft is authorized to do a media player. If everybody does that the websites are never going to be fixed

Revision history for this message
Nicolò Chieffo (yelo3) wrote :

Ok! thank you for better explanation! bye

Revision history for this message
Gary Coady (garycoady) wrote :

Closing the bug again, as the initially reported issue was fixed.
A new bug will be opened if the later-reported problem can be repeated.

Changed in totem:
status: Needs Info → Fix Released
Changed in totem:
importance: Unknown → Medium
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.