Author Archives: Multimedia Mike

Fun With Tablets And Amazon’s App Store

I bought an Android tablet a few months ago. It is less expensive than the best tablets but no where near the bottom end of the market. I think it’s pretty good. However, one downside is that it’s not “certified” to use Google’s official marketplace. That would seem to be somewhat limiting, however…

Enter Amazon’s Android App Store
Amazon got into the business of selling Android Apps some time ago. I started experimenting with this on a Nexus One phone that Google gave me. When I installed the App Store on the Android tablet and logged in, I was pleasantly surprised to see all of my Amazon apps ready for downloading onto the tablet.

So I have an App Store for use with this Android tablet.

Anyway, the reason I bring this up is because I managed to screw up this tablet in an unusual and humorous manner. You might be wondering if an app downloaded from the Amazon App Store requires the App Store to be present in order to run. The answer is: Oh yeah! It works like this:



This means that if — perhaps out of curiosity, for example — you login to the Amazon App Store, download an app, install it, and then subsequently log out of the App Store or uninstall it altogether, the downloaded app will decline to run until you log back into the store.

Here’s the thing– I wanted to provide a minimal level of security for my Android tablet. At the very least, I wished to lock the Amazon App Store itself since Amazon is famously (and, let’s face it, understandably) reluctant to deliberately add any friction to their shopping processes. I.e., without any external protection app, the App Store app would allow anyone to purchase any app using my tablet.

So I purchased App Protector Pro from the Amazon App Store and it worked quite well. By default, it also password protects against modifying any system settings as well as installing new apps.

So, here’s where I screwed up: App Protector Pro was doing its faithful duty and I uninstalled the Amazon App Store as an experiment. Suddenly, no apps obtained from the App Store would work unless I reinstalled the App Store. Okay, fair enough, except for one thing– App Protector Pro wouldn’t run without the App Store. Well, it did, it started to, tried to, but then exited. So I couldn’t re-install the App Store:



Oops

I eventually learned how to perform a factory reset of the unit which solved the problem. And, as indicated earlier, all of my apps were available for me to re-download.

Modding, Cyanogen-style
Open source aficionados will likely point out that there are alternate firmware options which allow me to take control of my Android tablet in a free and open manner. Among these options is CyanogenMod. After I got stuck in the situation described above, I thought I would have to resort to such an option.

On the plus side, researching alternative firmware options is what taught me to boot the device into a recovery mode and ultimately restore to a factory default setting. But if you’ll allow me to indulge in a mini-rant regarding accessibility of open source software: I was more than a little frustrated in trying to understand what CyanogenMod could possibly offer me. Their homepage says it’s “an aftermarket firmware”. I’m not entirely sure what that means or how it can benefit me. Fortunately, they have a full feature list linked from the front page. They are, in order: Lockscreen gestures, phone goggles, OpenVPN, incognito mode, themes support, and DSP equalizer. I can’t say that any of those really add any value for me. I’d love to know if CyanogenMod supports Google Android Market and various other Google apps (such as maps and GMail). That’s a question that I can’t seem to find the answer to.

The themes feature opens another old wound for me. Back around 1999 when I was first getting into Linux in a serious way, I remember that themes were a big theme at the Linux User Groups I would attend. I also remember lots are online articles at the time that emphasized how highly customizable the Linux desktop was in comparison to Windows 9x. I was bothered for 2 reasons: First, I thought there were more pressing problems that needed to be addressed in Linux; and second, none of these customization options seemed particularly straightforward; many apparently required hours of compiling and tinkering.

Small digression. Anyway, back to CyanogenMod, I was glad to see that they prominently display a button in order to “View Video Tour”. Ah, internet video has us so spoiled these days. I was eager to see this aftermarket firmware in action to see what it could do for me. However, the link leads to… a forum post? The thread seems to discuss how it would be a cool idea if the community could put together a video tour. At this point, the investigation just seems bizarre. It feels like a bunch of kids doing their best to do things the grown-up way.

Okay, sorry, rant over. I try to stay positive these days. I’m sure the CyanogenMod folks are doing great, fun, and interesting work on their project. The problems they choose to solve might lack mainstream appeal, however.

Free iPad
Ultimately, I recently unloaded the little Android tablet because, well… when a free iPad comes your way, lower spec tablets feel a little silly to keep around. Yeah, it’s great to play around with. Though here’s one unsettling thing I noticed about Apple’s App Store. While browsing for worthwhile games to indulge in, I noticed that they had a section for “Top Grossing Games”. This was a separate list from the “Top Apps” charts. I found the list weird for 2 reasons: 1) Why do I care which games are raking in the most cash? How does this communicate value to me, personally? Seriously, why would I base a purchasing decision around which vendor has earned the most money?

Anyway, let’s move on to reason #2 this was scary: Most of the games in this list had a price of FREE. One of them was that Capcom Smurfs game that stirred up controversy some months ago because of kids making unsupervised in-app purchases of virtual smurfberries. I tend to think that a top-grossing, free to play game is probably one that heavily encourages in-app purchases. Strange how this emerging trend actually encourages me to seek out games from the “top paid” list vs. “top free”.

Samples RSS And Flashback Samples

I made good on my claim that I would create an RSS feed for the samples repository.

Here is the link to the samples RSS feed [ http://samples.mplayerhq.hu/samples-rss.xml ]. Also, here is the Python source code I threw together for the task.

I just want to check: I’m not the only person who still relies on RSS these days, right? The tech press has been cheerfully proclaiming its demise for some time now. But then, they have been proclaiming the same for Adobe Flash as well.

I’m no expert in RSS. If you have any suggestions for how to improve the features presented in the feed, please let me know. And, of course, keep the samples coming. This script should help provide more visibility for a broader audience.

Mario and Flashback Samples
Thanks to LuigiBlood who sent in some samples that allowed me to test out my new script for automatically syncing the repositories and updating the samples RSS feed. First, there are CPC multimedia files from the Japanese 3DO port of Flashback: The Quest for Identity. Then, there is an Interplay MVE file on the CD version of Mario Teaches Typing in which the video doesn’t decode correctly.

LuigiBlood also sent in another file from the latter game. It’s big and has the extension .AV. It could be a multimedia file as it appears to have a palette and PCM audio inside. But there’s no header and I’m a bit unsure about how to catalog it.

The New Samples Regime

A little while ago, I got a big head over the fact that I owned and controlled the feared and revered MPlayer samples archive. This is the repository that retains more than a decade of multimedia samples.

Conflict
Where once there was one multimedia project (FFmpeg), there are now 2 (also Libav). There were various political and technical snafus regarding the previous infrastructure. I volunteered to take over hosting the vast samples archive (53 GB at the time) at samples.mplayerhq.hu (s.mphq for this post).

However, a brand new server is online at samples.libav.org (s.libav for this post).

Policies
The server at s.libav will be the authoritative samples repository going forward. Why does s.libav receive the honor? Mostly by virtue of having more advanced features. My simple (yet bandwidth-rich) web hosting plan does not provide for rsync or anonymous FTP services, both of which have traditionally been essential for the samples server. In the course of hosting s.mphq for the past few months, a few more discrepancies have come to light– apparently, the symlinks weren’t properly replicated. And perhaps most unusual is that if a directory contains a README file, it won’t be displayed in the directory listing (which frustrated me greatly when I couldn’t find this README file that I carefully and lovingly crafted years ago).

The s.mphq archive will continue to exist — nay, must exist — going forward since there are years’ worth of web links pointing into it. I’ll likely set up a mirroring script that periodically (daily) rsyncs from s.libav to my local machine and then uses lftp (the best facility I have available) to mirror the files up to s.mphq.

Also, since we’re starting fresh with a new upload directory, I think we need to be far more ruthless about policing its content. This means making sure that anything that is uploaded has an accompanying file which explains why it’s there and ideally links the sample to a bug report somewhere. No explanation = sample terminated.

RSS
I think it would be nifty to have an RSS feed that shows the latest samples to appear in the repository. I figure that I can use the Unix ‘find’ command on my local repository in concert with something like PyRSS2Gen to accomplish this goal.

Monetization
In the few months that I have been managing the repository, I have had numerous requests for permission to leech the entire collection in one recursive web-suck. These requests often from commercial organizations who wish to test their multimedia product on a large corpus of diverse samples. Personally, I believe the archive makes a rather poor corpus for such an endeavor, but so be it. Go ahead; hosting this archive barely makes a dent in my fairly low-end web hosting plan. However, at least one person indicated that it might be easier to mail a hard drive to me, have me copy it, and send it back.

This got me thinking about monetization opportunities. Perhaps, I should provide a service to send HDs filled with samples for the cost of the HD, shipping, and a small donation to the multimedia projects. I immediately realized that that is precisely the point at which the vast multimedia samples archive — with all of its media of questionable fair use status — would officially run afoul of copyright laws.

Which brings me to…

Clean Up
I think we need to clean up some samples, starting with the ones that were marked not-readable in the old repository. Apparently, some ‘samples’ were, e.g., full anime videos and were responsible for a large bandwidth burden when linked from various sources.

We multimedia nerds are a hoarding lot, never willing to throw anything away. This will probably the most challenging proposal to implement.

Using lcov With FFmpeg/Libav

Last year, I delved into code coverage tools and their usage with FFmpeg. I learned about using GNU gcov, which is powerful but pretty raw about the details it provides to you. I wrote a script to help interpret its output and later found another script called gcovr to do the same, only much better.

I later found another tool called lcov which is absolutely amazing for understanding code coverage of your software. I’ve been meaning to use it to further FATE test coverage for the multimedia projects.



Click for larger image

Basic Instructions
Install the lcov tool, of course. In Ubuntu, 'apt-get install lcov' will do the trick.

Build the project with code coverage support, i.e.,

./configure --enable-gpl --samples=/path/to/fate/samples \
 --extra-cflags="-fprofile-arcs -ftest-coverage" \
 --extra-ldflags="-fprofile-arcs -ftest-coverage"
make

Clear the coverage data:

lcov --directory . --zerocounters

Run the software (in this case, the FATE test suite):

make fate

Let lcov work its magic:

lcov --directory . --capture --output-file coverage.info
mkdir html-output
genhtml -o html-output coverage.info

At this point, you can aim your web browser at html-output/index.html to learn everything you could possibly want to know about code coverage of the test suite. You can sort various columns in order to see which modules have the least code coverage. You can drill into individual source files and see highlighted markup demonstrating which lines have been executed.

As you can see from the screenshot above, FFmpeg / Libav are not anywhere close to full coverage. But lcov provides an exquisite roadmap.