maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Applications (https://talk.maemo.org/forumdisplay.php?f=41)
-   -   How To : Associate MPlayer, Transmission, and other apps as default handlers (https://talk.maemo.org/showthread.php?t=17757)

pipeline 2008-05-14 11:14

Re: How To : Associate MPlayer, Transmission, and other apps as default handlers
 
I got it to work using a hack. It actually is an asx file (you can look at the file in /var/tmp/)... it just doesn't have the asx extension. I'm guessing most of these 'no extension' mime launches will be asx so i'll make default.

Would be better to be able so see what mime type launched the callback but i havent found out how to find that out yet.

I'll add this to install later today but here's what i modified in /usr/bin/dbus-switchboard.py :

(at the top, after the argstr = argstr.replace("file:///", "/"), i added :

Code:

    ASXhack = "no"
    if (argstr.find(".") == -1) :
      ASXhack = "yes"
      argstr = argstr + ".asx"

    foundhandler = "no"

then later right in the middle, before i set runcmd (and after system_note_infoprint), i add :
Code:

                        if (ASXhack == "yes") :
                                argstr = argstr.replace(".asx", "")

Indentation is very important in python, so you if you can't get it i'll update later on today.

Also make sure to kill python processes after a change unless u run dbus-switchboard from xterm.

The video does, by the way, look incredible... good quality and perfect aspect ratio.

pipeline 2008-05-14 23:27

Re: How To : Associate MPlayer, Transmission, and other apps as default handlers
 
Ok, I've updated dbus-switchboard with the asx hack. Any associated files passed without a file extension will be interpreted as an asx file.

AFAIK, mplayer doesnt handle WMV streams as good as the nokia Media Player. Since your example seems to be a windows media format you might get better results not using dbus switchboard for those asx/asf/wmv mime types. Not sure why that file type would use mime type of mplayer for wmv i guess in most linux distros thats your best bet whereas on maemo nokia probably liscensed paid for wmv codec.

I also added and associated gnumeric files, tweaked mplayer to not log to console (little performance boost to high bandwith vids), and added (but not associated) Timidity for midi's and xarchiver (for whatever types you want).

Note timidity has no ui and cpu is high so you will have to kill task or wait for song to end which is why its not default in xref.

Link to 1.1.3 version in first post.

tsvest 2008-05-15 08:29

Re: How To : Associate MPlayer, Transmission, and other apps as default handlers
 
Thanks pipeline,

Last night I made the changes as per your previous post and the hack works fine :)
I did a lot of testing with different streams and I found that there are still many links that didn’t work. They are in format ‘channel.php?some_code’. I’ve read somewhere that this is problem related to Linux – do you know something about this?

You can check the following link as an example http://e-televizor.com/window.php?cid=1525 It produced the following file in /var/tmp/reflector:59936.asx?bkup=21918&prop=e

Code:

<ASX VERSION="3.0">
<ENTRY>
<REF HREF="mms://a1937.l4534659936.c45346.e.lm.akamaistream.net/D/1937/45346/v000 1/reflector:59936" />
</ENTRY>
<ENTRY>
<REF HREF="mms://a1919.l4534621918.c45346.e.lm.akamaistream.net/D/1919/45346/v000 1/reflector:21918" />
</ENTRY>
</ASX>

So this looks again like an .asx file, but for some reason it won’t play in mplayer. Any ideas for hack in this case?

Regarding the previous link a posted: It is the newest online TV in Bulgaria called ReTV. I guess they made a good effort to stick to the contemporary technologies. Unfortunately it plays far away from smooth on my N800. How is it playing on your IT? Do I need to make some changes in the settings of mplayer to improve the playback? It would be nice to have these settings active when dbus-switchboard transfers the link to mplayer.

Ism 2008-05-17 02:23

Re: How To : Associate MPlayer, Transmission, and other apps as default handlers
 
Quote:

Originally Posted by tsvest (Post 181876)
Thanks pipeline,

Last night I made the changes as per your previous post and the hack works fine :)
I did a lot of testing with different streams and I found that there are still many links that didn’t work. They are in format ‘channel.php?some_code’. I’ve read somewhere that this is problem related to Linux – do you know something about this?

You can check the following link as an example http://e-televizor.com/window.php?cid=1525 It produced the following file in /var/tmp/reflector:59936.asx?bkup=21918&prop=e

Code:

<ASX VERSION="3.0">
<ENTRY>
<REF HREF="mms://a1937.l4534659936.c45346.e.lm.akamaistream.net/D/1937/45346/v000 1/reflector:59936" />
</ENTRY>
<ENTRY>
<REF HREF="mms://a1919.l4534621918.c45346.e.lm.akamaistream.net/D/1919/45346/v000 1/reflector:21918" />
</ENTRY>
</ASX>

So this looks again like an .asx file, but for some reason it won’t play in mplayer. Any ideas for hack in this case?

Regarding the previous link a posted: It is the newest online TV in Bulgaria called ReTV. I guess they made a good effort to stick to the contemporary technologies. Unfortunately it plays far away from smooth on my N800. How is it playing on your IT? Do I need to make some changes in the settings of mplayer to improve the playback? It would be nice to have these settings active when dbus-switchboard transfers the link to mplayer.

Your example link plays quite well (smoothly) with Media player. With mplayer you
can use the mms: address (there is no space in the URL between v000 and the following 1) or watch it with
mplayer -playlist http://mfile.akamai.com/45346/live/reflector:59936.asx
I think the quality is OK. No automation/filetype association here but
this particular channel works OK with my N800.
Thanks for the link.

bunanson 2008-05-17 04:27

Re: How To : Associate MPlayer, Transmission, and other apps as default handlers
 
link works great with N810 too. Thanks,

bun

tsvest 2008-05-17 09:28

Re: How To : Associate MPlayer, Transmission, and other apps as default handlers
 
You guys are welcome. There are a lot of video channels at http://www.e-televizor.com and http://www.utv.bg. Maybe it is a good idea to start another thread where the forum members will post which channels work well on their internet tablets.

However I can't understand what's going on with my NIT :confused:
Indeed http://e-televizor.com/window.php?cid=1525 works now on my N800, but now I am unable to open the stream http://retv.bg/

Also it takes a lot of time to open the streams in MPlayer and then the playback isn't smooth. I checked the MPlayer output in xterm and at a certain stage it says that my device is too slow to play the video :(

pipeline 2008-05-17 12:12

Re: How To : Associate MPlayer, Transmission, and other apps as default handlers
 
I would revert the old windows media mime types to point to default mp_ui

some of those wm streams probably use proprietary codecs which mplayer doesnt have or doesnt do as well as the nokia media player which probably liscensed codecs?

also the retv link was very slow for me... like a slideshow... i thought that might have been internet bendwidth since its overseas, but its probably more codec related

Ism 2008-05-17 18:28

Re: How To : Associate MPlayer, Transmission, and other apps as default handlers
 
Quote:

Originally Posted by tsvest (Post 182612)
You guys are welcome. There are a lot of video channels at http://www.e-televizor.com and http://www.utv.bg. Maybe it is a good idea to start another thread where the forum members will post which channels work well on their internet tablets.
...
Also it takes a lot of time to open the streams in MPlayer and then the playback isn't smooth. I checked the MPlayer output in xterm and at a certain stage it says that my device is too slow to play the video :(

There is already a thread for TV channels which work "well" on their internet tablets:

http://www.internettablettalk.com/fo...ad.php?t=19044

Please add new channels to that thread. It should be greatly
appreciated.

Try to install mplayer version rc1 .27 if you haven't already. It should
be better than previous versions.

ArnimS 2008-06-16 15:57

Re: How To : Associate MPlayer, Transmission, and other apps as default handlers
 
mega-bump. Would this be ui-able?

pipeline 2008-06-16 22:47

Re: How To : Associate MPlayer, Transmission, and other apps as default handlers
 
Yes, given enough (some) time. I'm not the best at python user interfaces though so that would be a learning curve (time).

A simple first version UI would just let you maintain apps list and xref lists but would probably require glade.

The uglier question is what to do about defaults.list and sinking (back) to hildon/dbus apps. Sinking to dbus is still a little ugly like if you wanted to pick between mplayer and Media Player... i'm working through that quirkiness in emelfm2 associations to hildon apps but its still very much a hack with shim scripts and dbus messages that i would want to burn some grey matter and testing time on.


All times are GMT. The time now is 06:13.

vBulletin® Version 3.8.8