maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Applications (https://talk.maemo.org/forumdisplay.php?f=41)
-   -   mediaserv: choice of languages/platforms [poll] (https://talk.maemo.org/showthread.php?t=17984)

Jaffa 2008-03-16 20:03

mediaserv: choice of languages/platforms [poll]
 
Hi,

Many of you will be aware of my mediaserv on-demand video converter.

Currently it's pretty much limited to Unix-like OSes such as Linux and (apparently) Mac OS X.

This is because it's written in Perl, and Perl's threading is a bit ropey on, say, Windows. Unfortunately, it's a bit ropey on everything and I'm not quite happy with it.

So, I'm thinking of rewriting the mediaserv bit in another language with a more robust multi-threaded implementation. tablet-encode would stay in Perl.

The disadvantage of a rewrite would be that it becomes trickier to install (potentially): the same dependencies you need for tablet-encode are not sufficient for mediaserv.

So, the poll above is to garner input from the users here. The choices are:
  1. Do nothing. Carry on polishing the existing Perl version, but it works fine for you and don't need it on Windows (because you don't use it or you have better options such as TVersity)
  2. Java. Very powerful threading, implementations on many OSes, easy to ship and install an application containing all its dependencies. Most likely to be my choice, but then I have Java runtimes on all my boxes.
  3. Python. Seems to have better threading than Perl.
  4. C/D/Vala. Probably the latter two. Possibly even Vala. Not sure how well it works for non-Windows apps. Lack of docs for Vala. D is possibly too esoteric.
  5. C#. Would run on Linux under Mono, but I've no burning desire to learn it.
  6. Ruby. I've got "Programming Ruby" on my bookshelf. Not sure how good its thread implementation is.

Remember, this is for the server component; the UI would still be through Media Player/mplayer, the web browser and RSS feeds.

Anything I'm missing?

Bundyo 2008-03-16 20:16

Re: mediaserv: choice of languages/platforms [poll]
 
I would prefer native language since it runs better. Voted for D, but FreePascal/Lazarus is nicely cross-platform too and also does a single executable.

Jaffa 2008-03-16 22:18

Re: mediaserv: choice of languages/platforms [poll]
 
Quote:

Originally Posted by Bundyo (Post 156082)
I would prefer native language since it runs better. Voted for D, but FreePascal/Lazarus is nicely cross-platform too and also does a single executable.

Thanks for the input. Jumping from Delphi to FreePascal/Lazarus shouldn't be too hard - but Pascal's not a language I like too much. I'll look into Lazarus further, though.

D/Vala are both obvious choices for a native language version, but I'm not sure why you says "it['ll] run better". mediaserv doesn't do much which requires CPU power, off-loading all the heavy lifting to mencoder.

The key requirements, therefore, are: maintainability; robustness/reliability; ease of use for end-user.

Native language wins on all three counts to a degree, coming out miles ahead of anything else on the last point.

Bundyo 2008-03-16 22:35

Re: mediaserv: choice of languages/platforms [poll]
 
Lazarus is closer to Delphi than was before, and easy interface design beats the other C group. However, you won't need too much on the interface part to judge on that :)

If i'm not mistaken you have a scanner there and also the actual server - more speed will help with large collections, but the native languages should run as CGI, so you will lose from request startup time. Something with apache module will fare better for serving. Unless you want to do a whole web server. :)

Easiest for the user will be a stand-alone installation that will get them all the functionality without messing with config files at all, small IDE for choosing a directory and eventually a tray icon. I think i just described Orb :)

yabbas 2008-03-16 23:34

Re: mediaserv: choice of languages/platforms [poll]
 
Native C please.

I run an NSLU2 and I'd need to save as many clock cycles as possible :)

ukki 2008-03-16 23:41

Re: mediaserv: choice of languages/platforms [poll]
 
Ah, a subject close to my heart. I'm really not sure Windows users need more programs for streaming video as they have Orb and Tversity. Mediaserv seemed to work fine when I tried it, not sure it needs to be more optimized, because I don't think it needs to serve more than few video at a time. And the program doing the transcoding is what consumes cpu. What I would like to see is more features. More media formats like dvd-images and live-tv, subtitles, seeking etc.

Bundyo 2008-03-16 23:48

Re: mediaserv: choice of languages/platforms [poll]
 
Oh, yes, LiveTV ;)

But i don't see a problem with the subs - they should transcode just fine...

luca 2008-03-17 12:01

Re: mediaserv: choice of languages/platforms [poll]
 
Quote:

Originally Posted by yabbas (Post 156152)
Native C please.

I run an NSLU2 and I'd need to save as many clock cycles as possible :)

Freepascal fits that bill too. (edit: besides, I doubt you could do transcoding on the nslu2)

luca 2008-03-17 12:03

Re: mediaserv: choice of languages/platforms [poll]
 
I second Bundyo suggestion (fpc is not your grandfather's pascal), but, what about incorporating to mediaserv the patches for vdr recordings that I sent you a while ago? ;)

Jaffa 2008-03-17 13:11

Re: mediaserv: choice of languages/platforms [poll]
 
Quote:

Originally Posted by luca (Post 156322)
I second Bundyo suggestion (fpc is not your grandfather's pascal), but, what about incorporating to mediaserv the patches for vdr recordings that I sent you a while ago? ;)

That's where this came from :-)

This weekend development should be picking up again.

Jaffa 2008-03-17 13:28

Re: mediaserv: choice of languages/platforms [poll]
 
Quote:

Originally Posted by luca (Post 156321)
Freepascal fits that bill too. (edit: besides, I doubt you could do transcoding on the nslu2)

But... it's *Pascal* FFS.

Does it have garbage collection? Threading is something "to be improved in the next version", which is worrying.

D and Vala both look interesting, and up to the challenge. With Vala slightly ahead of D, IMHO.

TA-t3 2008-03-17 14:36

Re: mediaserv: choice of languages/platforms [poll]
 
The documentation for Vala took a sudden giant leap a short while ago, there's about 56MB of docu (mostly taken by the bindings documentation) on http://www.vala-project.org/doc/
I think it's a good choice for writing gtk/cairo/hildon programs. For general programming D looks quite nice.

luca 2008-03-17 16:28

Re: mediaserv: choice of languages/platforms [poll]
 
Quote:

Originally Posted by Jaffa (Post 156338)
But... it's *Pascal* FFS.

It's object pascal, please
Quote:

Does it have garbage collection?
No, you have to take care of freeing objects yourself.
OTOH it has a native string type that you don't have to allocate/deallocate.

Quote:

Threading is something "to be improved in the next version", which is worrying.
Oh, I wasn't aware of that, and I use threading all the time.

Quote:

D and Vala both look interesting, and up to the challenge. With Vala slightly ahead of D, IMHO.
I don't really know them, but they both seem to be too much like C to be any good FFS ;)
(maybe they're better, but I can usually recompile the whole lazarus ide in the time that gcc compiles "hello world", and seeing that vala translates to C which is then compiled to native code....maybe you enjoy watching paint dry :D)

Jaffa 2008-03-17 17:39

Re: mediaserv: choice of languages/platforms [poll]
 
Paint drying's often more entertaining than what's on TV at the moment!

I'll have a closer look at FreePascal, but've had quite a bit of fun with Delphi recently.

luca 2008-03-17 19:01

Re: mediaserv: choice of languages/platforms [poll]
 
Quote:

Originally Posted by Jaffa (Post 156437)
Paint drying's often more entertaining than what's on TV at the moment!

sad but true, but keep in mind that what you have over there (at least bbc4 had reruns of "the prisoner" and "the avengers") is way better than what we have over here (though "il commissario montalbano" is pretty good, but that's all).
At least with my dish I can choose the least of many evils ;)

cLin 2008-03-18 00:49

Re: mediaserv: choice of languages/platforms [poll]
 
nm: ignore post

Jaffa 2008-03-18 12:58

Re: mediaserv: choice of languages/platforms [poll]
 
Quote:

Originally Posted by cLin (Post 156625)
nm: ignore post

Hmm, and now I'll never know ;-)

To clarify, my comment about "fun with Delphi" should have additional sarcasm tags, or at least sarcastic quotes around 'fun'.

Bundyo 2008-03-18 13:36

Re: mediaserv: choice of languages/platforms [poll]
 
Yeah, we already got that ;)

Jaffa 2008-03-18 13:47

Re: mediaserv: choice of languages/platforms [poll]
 
Quote:

Originally Posted by Bundyo (Post 156794)
Yeah, we already got that ;)

Just checking, I'd hate to be taken as a Delphi supporter ;-)


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

vBulletin® Version 3.8.8