Saturday, January 31, 2009
Mediatomb and Playlists
Also, once a directory is processed by a timed rescan, I have trouble adding new playlist files, individually, from that location. A couple of weeks ago, inexplicitly, a playlist I had previously used without trouble disappeared from Mediatomb, and I could not add it back (no errors, it just didn't show up). I removed my other playlists and found I could not add those back either. So I made a brand new file, and that would not add. To fix this I had to be sure that the directory and all playlists were removed from Mediatomb, and there were no timed rescans on that folder. I added back each m3u file individually, and they worked fine.
I think it's best to stay away from timed rescan, on my installation away, for playlists (I've had no trouble with rescans of music, video and photo files). I should note that this feature is supposed to work. And I should note that I have seen Mediatomb pick up m3u files on timed rescans from my music folders in the past. But from my playlist directory, I've had odd behaviors (no, this is not related to file/diectory permissions in my case, that is a common problem though. Check that if it is not working for you).
For creating playlists I have been using fapg. This worked well for me because I had already some long lists of files to work with and fapg can take these simple lists on stdin. Many people that use Mediatomb and similar servers use other media handler just to create playlists. I have been experimenting with juk. Juk seems to be particularly suited to larger collections (a problem I have with many of these tools is that they simply have not been designed for large and well organized media collections, with correct tags and such). There are other choices. I've seen Rhythmbox mentioned quite a bit. Such tools tend to support media playing or streaming on their own, but they also have nice playlist editors and search features that are useful alone.
One of the reasons I have been working to replace the system I had built myself, is that more standard bits and pieces (like m3u files) will allow me to use a variety of off the shelf packages (there are any number of programs available to edit playlists and now I can use any one, or more than one). There are also other servers and clients that support the same protocols. One does not have to be limited to one combination, if one server is better than another for, say, one type of content or another.
Friday, January 30, 2009
Pride and Prejudice and Zombies
Here's something new, public domain classic literature, with zombies added in. No really. Seriously. Stop laughing, it's true.
"Pride and Prejudice and Zombies features the original text of Jane Austen's beloved novel with all-new scenes of bone-crunching zombie action. As our story opens, a mysterious plague has fallen upon the quiet English village of Meryton—and the dead are returning to life! Feisty heroine Elizabeth Bennet is determined to wipe out the zombie menace, but she's soon distracted by the arrival of the haughty and arrogant Mr. Darcy."
...and so on.
Toying with Bacon
"A being with no knowledge of what it means to be sightless, having never had eyes. It knows no pain, but also no hope."
Bacon man...
Awesome.
Google Street View Death Machine Hits a Deer
Image via Wikipedia
http://www.stuff.co.nz/stuff/dominionpost/4834025a27483.html
"The images show a young deer running beside the Google car before it can been seen lying on its side. A third screen grab shows the deer lying on the side of the road in the distance as the car moves away.
"The car was travelling in broad daylight down a narrow road in rural New York state when the accident happened."Thursday, January 29, 2009
Zimbabwe Abandons its Currency
Image via Wikipedia
"BBC southern Africa correspondent Peter Biles says the Zimbabwean dollar has become a laughing stock. A Z$100 trillion note was recently introduced. "
Things can always be worse.
Just $53.5 Million and It's Yours!
Image via Wikipedia
He complained the apartment was "attic-like" with small windows, low ceilings, obstructed views and ugly drainage grates. He demanded the return of his $10.7 million deposit and $30 million in damages.
In a counter suit, El-Ad accused Vavilov of libel and demanded $36 million in damages.
The Plaza overlooks Central Park and has inspired writers such as Kay Thompson, author of the "Eloise" stories about a 6-year-old girl who lived at the hotel, and Neil Simon, who wrote the Broadway play and hit film "Plaza Suite."
Wednesday, January 28, 2009
House Music - Mediatomb and PS3 Update
* Video is tricky to setup. Getting the contents of a DVD into a form that can be steamed to your PS3 is not documented nor easy. It does work, if you are persistent, and get the right software. There are legal grey areas here.
* I have two DVDs from which I could not create an AVI file that the PS3 would play. In both cases, the PS3 would act like it was indeed playing the stream, but there would be no picture nor sound. This did not appear to be related to the bit rate, frame rate or any other setting I adjusted (using dvd::rip) so I have no explanation. Other DVDs I have tried worked fine. Although me sample is small, just 6 or 7 discs.
* One other problem I had with one single disc was that the stream resulted an incorrect aspect ratio. Actually, the video was cut off at the top and bottom and all I got was a very, very narrow band in the middle of the film. Strange. No explanation. Oh, and with another disc, the AVI video froze near the end, while the soundtrack continued. When the content was over, the sound ended normally, but several minuted of video werethus missing. A lot of wierd things happen with this stuff.
* It is possible to get quite good video and sound quality in about a 2-3 GB AVI file. But the quality is not perfect, and there are occasional artifacts. The sound (in MP3) is likewise good, but not as good as it can be. So, as far as video goes, I will not be using the media server for more than a convenience. I can't see converting a library of DVDs to AVI.
* Music playlists work fine, but Mediatomb does not pick up new M3U files when it is set for a timed rescan of a directory containing such files. When it does a timed rescan, the playlist entry appears in the Mediatomb log output and, if you happen to catch it, in the web application's status line. However, the playlist is never made available in the database to select and play, and indeed does not appear in the database section of the web application. Playlists are added to Mediatomb with no trouble when they are individually added with the "add" link, rather than by using a timed scan.
* Scans that Mediatomb does on startup take quite a long time (on my system, I have a lot of content). It would be nice if this could be controlled, and also triggered manually when I know I've changed something.
* On the PS3 side, it would be nice if I could navigate in a more flexible manner by arist and album (such as when I'm playing a file from a playlist, and I'd like to see and play other tracks by that artist or the particular album).
* Also, the PS3 takes quite awhile to transfer complete information from the server when opening a media category. For example, when a playlist contains a couple thousand items, you have to select it, then wait until the PS3 has the entire list transfered. It does not cache this information at all. If you have a large music collection, then opening artists, for example, and browsing for something, is completely impractical.
* If you select a playlist to play before the entire list is transfered, then the PS3 will only play the selections that got transfered up to that point.
* There are three visualizations available on the PS3 for music. Although they are all interesting at first, just having three makes me wish "plain black screen with the track information at the bottom" was one of the choices.
* This setup provides no way to edit M3U files from the M3U. An alternative would be to store media on the PS3 and use it's playlists, but that doesn't give me the distributed interface I want.
* It would be nice if Mediatomb output information about what it is streaming. This would allow me to build alternative interfaces on the server side for playlist control.
* Multi-channel (more than stereo) soundtracks work fine.
* The PS3 will display thumbnail artwork embedded in MP3 files.
* Photos work fine, but the interface is not very robust. I'll stick with Google's Picasa, although leaving my photos volume up to date in Mediatomb's database certainly does no harm and the PS3 provides a good way to show photos to a group.
* I have not experimented with any formats other than AVI and MP3.
On the whole, the Mediatomb/PS3 (Ubuntu 8.10 server) is quite usable, as far as it goes. It doesn't do everything I want, but it's useful enough to keep installed. Next up, I plan to experiment with a streaming server, adding that stream to a Mediatomb playlist. By controlling the stream on the server, I'll have the control I want over what plays. And I'll be able to build a web interface for that control. The downside is that doing that will give up the PS3's ability to do that control 0 the stream will act just like an "internet radio station". But maybe with the combination of both approaches available, I can get (a little closer) to where I want to be.
Tuesday, January 27, 2009
Random Links
"The Senate acted responsibly to give the Obama administration time to attempt to bring order to a mismanaged process," the West Virginia Democrat said in a statement.
"Many lawmakers worry that an estimated 20 million mostly poor, elderly and rural households are not ready for the switch, which requires owners of older television sets receiving over-the-air signals to buy a converter box or subscribe to cable or satellite TV."
Well... Yes, and that will be true no matter when the switch occurs.
The easiest, maybe the only, way to fix the problems that arrise from the change-over is to let the problems occur.
* * *
http://valleywag.gawker.com/5139511/steve-jobs-reportedly-under-the-knife-at-stanford-hospital-today
"Ailing Apple CEO Steve Jobs checked into Stanford Hospital over the weekend and was scheduled for surgery this morning, we hear."
Can't we just leave this guy alone?
* * *
http://abcnews.go.com/Business/Politics/story?id=6740011&page=1
"The high-flying execs at Citigroup caved under pressure from President Obama and decided today to abandon plans for a luxurious new $50 million corporate jet from France."
I don't think the executives and boards of companies like this fully appreciate the position they are in, from the political point of view.
* * *
http://online.wsj.com/article/SB123275192235811483.html
From the WSH, book recomendations on irrational decision making; Extraordinary Popular
Delusions and the Madness of Crowds, Judgment Under Uncertainty, How We Know What Isn't So, The Winner's Curse and Predictably Irrational.
* * *
http://www.dailykos.com/storyonly/2009/1/27/11202/3227/287/689257
From Norm Coleman's lawyer:
"It will be very boring," Joe Friedberg said in a conference call with reporters.
Not only boring, but it's going to take quite a long time (you can thank Norm Coleman for that), due to the Coleman campaign's recent request to have all 11,000 rejected absentee ballots reviewed. This is, of course, after claiming there were no wrongfully rejected absentee ballots in the first place.
Monday, January 26, 2009
Email Trivia - How Many Characters Can Be in an Email Address?
So, including the '@' character, an email address is allowed to be up to 320 characters in total.
In other fascinating trivia, according to RFC-2822, section 2.1.1, the maximum line length in an email is 998 characters, excluding the CRLF.
So watch it.
Performance and Calling a BPEL WSDL From an EJB
At one point in the project however, I determined that one of these calls created a really significant performance hit. The hit occurred someplace between leaving my EJB code:
MyOperationDataResponse myOperationDataResponse = port.MyOperationDataSoapOperation(myOperationDataRequest);
...and the initial Receive operation in the BPEL (in a different Service Assembly - this might be a factor), which was the earliest I could place a log message. The delay in there was as long as 4-5 minutes, and seemed to be driven by the size of the request payload (about 2 MBs, large but not huge).
According to VisualVM, a great tool by the way, the process was spending a large amount of time in this method:
com.sun.enterprise.server.ss.provider.ASSelector.select(long)
...Which was interesting, but did not help me determine a course of action. In the end, I replaced the jaxb-style code with code that calls the web service using XMLBeans and javax.xml.soap.* classes only. I was unable to get the JAXB version of this call to hit the actually service with less than about a 5 minute delay, with the "large" payload I'm using. The equivalent part of this new call happens in .2 seconds (that's point-two). I don't know the repercussions of doing this sort of call vs. the web service client generated by Netbeans, or of having the XML Beans classes in the environment. It would be nice not to have to introduce this other style into the application. This does seem to confirm some sort of issue in either the jaxb-ws layers, or the HTTP Binding Component, though. I suspect the HTTP-BC because the payload size alone does not seem to cause a problem.
Here's the XMLBeans-style WS client code.
MyOperationDataDocument putCardDataDocument = MyOperationDataDocument.Factory.
MyOperationDataResponse.
MyOperationDataDocument.
SOAPFactory sf = SOAPFactory.newInstance();
SOAPMessage soapMessage = MessageFactory.newInstance().
SOAPPart part = soapMessage.getSOAPPart();
SOAPEnvelope soapEnvelope = part.getEnvelope();
SOAPBody body = soapEnvelope.getBody();
org.w3c.dom.Node node = putCardDataDocument.
SOAPBodyElement soapBodyElement = body.addDocument((Document)
SOAPConnectionFactory scf = SOAPConnectionFactory.
SOAPConnection con = scf.createConnection();
URL endpoint = new URL("http://localhost:9080/MySoapService/
SOAPMessage reply = con.call(soapMessage, endpoint);
con.close();
The message and response classes are created using the scomp command line utility that comes bundled with an XMLBeans install. I found surprisingly few examples like the above code online, so I hope this is helpful to someone else down the road.Jeff Sexton