mplayer + libbluray support

MPlayer just very recently got support for playback of unencrypted Blu-Ray discs using libbluray.  (Thanks to all the devs and testers! :) )  Apparently development for the library is being hosted on VLC’s git servers now, something I had no idea about.  I thought the project was dead upstream.

I’m adding an ebuild for libbluray to the gentoo multimedia overlay if someone wants to access it.  It’s something I plan on pushing into the mainline tree soon enough, once it’s properly finished.

If you are building MPlayer from SVN, it will automatically detect the new library, and build against it.  You can use the -9999 ebuild in the portage tree.

To playback some of your Blu-Ray content, you will first need to extract it to your harddrive.  I use MakeMKV, also in the multimedia overlay, to accomplish that.

Here’s a simple way using the CLI to dump the contents:

$ makemkvcon backup –decrypt disc:/mnt/bluray/ <location to dump content>

The syntax for playback is:

$ mplayer br:// -bluray-device <path to dumped content>

By default, it will play the longest playlist (I think).  If you can get the list of playlists available, you can pass that as an optional parameter to br:// (fex: list_titles /home/steve/bluray/src; mplayer br://5 -bluray-device /home/steve/bluray/src).

libbluray also ships with a few example programs that do basic stuff like listing the titles (list_titles), dumping information about the playlists (mpls_dump), and a few more (sound_dump, index_dump, mobj_dump, libbluray_test, bdsplice, clpi_dump).

Have fun with it. :)

Advertisements

gentoo + youtube – flash + mplayer

So, if you’re getting a little tired of Flash and it’s silly security hiccups, but still can’t live without the YouTubey goodness that is the awesome sauce of life, here’s a simple solution I stumbled onto: use mplayer to watch the videos!

I haven’t found a way to embed this in my browser yet, but I haven’t really looked either, so this is for all the CLI geeks.

$ mplayer $(youtube-dl -b -g http://www.youtube.com/watch?v=9IfEInQ7aic)

And thar ya go. :)

Oh, and did you know that Flash Gordon is on Blu-Ray now?  Flash!  Aaaaaa-ah!

blu-ray on gentoo

I’m pretty excited because I got my first BD-ROM drive last night from NewEgg, a LITE-ON iHOS104-06.  That means I can do some real testing, ripping and playing around.

Decrypting Blu-Ray discs is a really confusing process … I’m still not even sure of all the steps that are involved.  Everything I understand has been cobbled together from posts on the doom9 forums.  While the forums are a great resource, it’s not a comprehensive one at times.

I was playing around with aacskeys (from doom9 forums, available in portage), and it managed to decrypt / find the keys / whatever it’s doing / work successfully on most of my movies.  I’m not sure how to get them off after that, though, or why that’s important yet, but I do know it’s a good sign. :)

For now I’m taking the simple route of using shareware to access my movies.  There’s two programs I’ve used so far to rip my Blu-Rays, AnyDVDHD and MakeMKV.  They are both nice programs with some good features, but MakeMKV is the only one that has a Linux port.

The last time I tried MakeMKV, it couldn’t decrypt all my discs, so I had to use my PS3 to rip the ISOs, and then use AnyDVDHD.  This time, though, using the most recent version (1.5.6), it managed to decrypt all of my discs.  I was going through my Blu-Rays to see if it could handle all of them, but I gave up after the 15th one, since it was working on every single one. :)

While AnyDVDHD will extract the original, unencrypted files to your harddrive, MakeMKV will additionally mux them at the same time into Matroska.  I kinda wish I could still have the originals, but I’m not going to be picky. (Edit: you can, see comments)

So, no real plans after this except to play around and post my results.  I really don’t have that much interest in playing with Blu-Rays on Linux other than curiosity.  I don’t wanna rip them and stream them to my HTPC just yet since I don’t have the storage space, and because my frontend isn’t quite as HD-ready as I’d like it to be (I still need to update some software and tweak settings … lots of testing, meh).

I am going to be looking at some other tools and see if I can get them in portage or our multimedia overlay, which reminds me, I just added MakeMKV to there this morning if someone else wants to try it out.

simple remote git repo howto

This tiny little howto has really helped me along many times.  I’ve used SVN for a long time, so the idea of having a remote repo makes sense to me.

I’ll put it up here as a small reference, but I imagine I’ll probably be the one using it the most. :)

local: git init

remote: mkdir project.git
cd project.git
git init –bare

local: git remote add origin ssh://server/~steve/project.git

git push origin master
server: git clone ~/project.git ~/projects/name
local: git push

server: git pull

google vp8 fud

I don’t usually like chiming in on matters like this, but I’m going to say this time that I’m disappointed in Ars Technica’s recent FUD-provoking article on Google’s VP8 codec being open sourced.

Specifically, and I’m not picking on Ars in general, I notice in popular journalism a technique to claim that many people are supporting a view, but then to provide only *one* source that supports that view.  That doesn’t mean that many people support it … it means that at least one person does.

For example:

Some critics of VP8 contend that its design is sufficiently similar to H.264 to warrant concern. One such critic is Jason Garrett-Glaser, a software developer who works on x264, a well-known open source implementation of H.264. In a lengthy analysis of VP8, he attacks On2’s claim that the format is superior to H.264 and says that the format’s legal status is too dubious for companies to trust.”

There are no other references to “some critics” anywhere else in the article.

Again, here’s a second example:

MPEG LA’s threats at this stage appear to be little more than self-serving saber rattling, but others who have analyzed the technology seem to believe that there could be serious patent risks on the horizon.”

There is a reference earlier to MPEG LA’s own remarks, the original piece of which makes its own conclusions as well.

Looking at that piece, the whole article is based around *one* question that he shared:

He writes:

Here’s an excerpt from my email exchange with him:

JP: Let me ask you this: Are you creating a patent pool license for VP8 and WebM? Have you been approached about creating one?

Larry Horn: Yes, in view of the marketplace uncertainties regarding patent licensing needs for such technologies, there have been expressions of interest from the market urging us to facilitate formation of licenses that would address the market’s need for a convenient one-stop marketplace alternative to negotiating separate licenses with individual patent holders in accessing essential patent rights for VP8 as well as other codecs, and we are looking into the prospects of doing so.”

That’s the other thing I don’t like about journalism … I would call it a pet peeve, but really it’s just a matter of not being able to trust the reporting when all we get is excerpts.  His entire article is written around one excerpt of an email exhange.  Why don’t journalists ever post the entire exchange?  Lack of transparency, to me, just gives the impression that they are trying to present a biased view.

I realize, of course, that in only including excerpts here that I’m doing the same thing in a sense, but at least I’m providing references to the full sources I have available so that anyone else can do their own analysis and come to their own conclusion.

If you wanted to see his own conclusions, just read the article.  First of all, the headline is: “Google’s “Royalty-Free” WebM Video May Not Be Royalty-Free for Long”.  There’s no way to draw that conclusion from the article.

I wonder if the editors come up with the titles of the articles themselves.  It  could easily have said “MPEG LA may create a patent pool for VP8”, and that would be more accurate.  Compare that possible title to the other one when reading the author’s assumption after the excerpt:

“It would seem, then, that VP8 may end up subject to the same licensing issues as H.264. If MPEG LA does create a patent pool license for the standard, the free lunch Google promised yesterday may not be free after all.”

That’s an obvious conclusion, and I could come to the same one as well — If this, then that.

We can see again, even in this article, that he uses the same tactic of using one source and pretending it’s many:

“As a number of observers have already noted VP8 isn’t free from patent liability.”

Again, it’s not a number of observers … it’s one blog post … the same one that Ars referenced as well!  Jason is a great multimedia dev, but he’s not a patent lawyer last I checked.  I’d be equally bothered if someone took my opinion, on any piece of my blog, and quoted me as the expert who knows which way the industry in Linux is going to go, or what legal battles it has to deal with in the future.

My take on the whole thing is this — first of all, I thought Jason’s original piece was very well written, and it was exactly what he set it out to be: a technical write-up of the codec.  He made some comments in passing about patents, but the focus of his post was how VP8 is better than Theora, not as good as x264 (and I would agree).  I would imagine that the poor guy didn’t expect his blog post to get as much attention as it did, and that it will probably affect future blog posts, if any.

My opinion on the MPEG LA stance, reading just the excerpt above — and not the author’s own conclusion — is that their business stance is completely normal and reasonable.  The way I read it is not that MPEG LA is claiming anything, but that some other companies might be wanting their own assurances of patent protection, and looking to their company to make sure they have their licensing ducks in a row.  That could be it, maybe not.  Either way, we don’t have any information from them to really speculate.

Personally, I’m not too worried about the whole thing.  I think VP8 will emerge just fine, there may be *some* licensing involved somewhere, but in the end, open source tools will go on just like it has for years and support the standards, and consumers will still win out with more options.

As far as journalism goes, I think we’re going to see more FUD pieces about the whole thing.  It’s a common tactic used by big bullies (anyone remember SCO?).  I’m not saying the concerns are illegitimate, but I sure wish people would use critical thinking and analysis when writing their articles, instead of trying to spin up hype and paranoia for .. whatever reasons they may have.

It’s obvious that my attitude is that modern journalism has completely lost its credibility, and that’s the reason I don’t like writing about it — is because I get into rant mode. And I apologize for that.  Also, sorry that the post kinda bounces back and forth between my points … it’s the nature of a rant, I suppose. :)

One last comment (this is one of those posts that has the misfortune of never ending), that I wanna make sure I clarify is that it’s not my intention to disprove, stir controversy or anything like that … my only goal is to encourage critical thinking which seems to be a missing element in reporting these days.  I’m personally tired of how research becomes whittled down to conclusions.  It’s like statistics — you can often make the numbers say anything you want.  But, yah, not trying to hand out pitchforks or anything, I just think it’s a good idea to be honest in reporting, present the facts, and let people come to their own conclusions.  That’s all. :)  Have a donut.

small multimedia fixes

I haven’t done much of anything lately, so it’s good to report that I actually helped fixed some breakages lately … yay. :)

For one, LIRC should actually build again, both on 2.6.32 and 2.6.33 kernels (both gentoo- and zen- tested, for the record).  Use either lirc-0.8.6-r3 or the new 0.8.7_pre1 if you like, and open or comment on existing bugs if you hit any.

I also fixed ivtv-utils so it’d build, and split v4l2-ctl into a separate ebuild so it’s simpler to access for those who need just that handy little tool.

Finally, amid all the VP8 excitement, which I’ll write up my own thoughts sometime later, there is already an ebuild for libvpx in bugzilla.  I tested it on my own overlay, and it looks good, so it should just be a matter of time before it gets included.

Just to clarify, I don’t deserve any credit here other than actually doing some small amount of legwork and putting the stuff in the tree.  In each of the above cases, there were both ebuilds and patches provided by users, without which it probably never would have either gotten done or as quickly.  Thanks, guys. :)

random dvd roundup

I’ve been shuffling stuff around lately with my DVD collection, and one thing I’ve been doing is cleaning up my DVD ripper and web frontend to catalogue my entire collection (todo: put in git, trac).  I finally finished archiving this weekend all the cartoons I have, and I actually finished ripping all of them that I want to archive, too.  They’re not all in one place yet, but by the estimates I’m running (one nice feature of my new code) is that it’s gonna take about 750 gigs of storage.  Whee!  It’s all worth it to have 8 seasons of Super Friends on demand (seriously).

I found a few bugs in my ripper this weekend, one of them was that I was only storing one possible subtitle type in my Matroska rips.  If a DVD had both VobSub and Closed Captioning, it’d only mux the first one I added.  Fixing it was fun, since it was one of those moments where you open up the code trying to find the reason for it, and you find a big comment labeled “FIXME: Add this feature here.”  Heh.  So, now it muxes both, if available.  Woots.

There is still one DVD subtitle format that I am having absolutely zero luck in finding anything about — English SDH (Subtitled for the Deaf and Hard of hearing).  According to Wikipedia, it’s basically closed captioning with color.  I can play / watch / rip closed captioning just fine (watching: mplayer -subcc dvd://, ripping: ccextractor), but not SDH.  And I haven’t seen anything that can even play them yet, although in fairness I’ve only been playing with Linux applications.  And everytime I try to explain to someone what I’m trying to do, they think I’m talking about VobSub subtitles.  Usually I get tired of trying to explain the difference and give up searching.  I could try finding some Windows apps to rip / play them, but if I can’t get something in Linux that’s scriptable to access them, then it doesn’t matter anyway.  So, if someone knows of something … plz to drop me a line, kthx.

Speaking of subtitles and MPlayer, I’ve come to the conclusion that MPlayer’s support for them is just plain sub-par.  The options to play them back (or force them off) are buggy and inconsistent across the bar.  For example, here’s a small roundup:

– Flagging a subtitle track as “default” when muxing a Matroska stream means that, if you turn on subtitles in the viewer, that should be the first one to show up.  It does not mean “these are forced subtitles, so display them automatically.”  That’s why Matroska has a “forced” tag.  default != forced.  If you’re still lost, look at the original audio and video tracks, and you’ll see they are also muxed with the “default” flag fipped on.  It’s purpose makes more sense with video with multiple audio tracks — if there’s more than one, which one do you play by default?  The one with the “default” flag!  Same principle should apply with subtitles when you turn them on.

– MPlayer can’t load Matroska subtitles externally.  You can, if you wish, mux just subtitle streams into a Matroska wrapper (ex: mkvmerge subtitles.{idx,srt} -o subtitles.mks).  But using “mplayer -sub subtitles.mks” won’t work.  Bummer. :(  I understand that in this case, the Matroska stream could contain more than one subtitle stream (VobSubs and CC in my example), and it generally expects just one (-sub subtitles.idx, fex), but still, it’d be a fancy feature. :)

– MPlayer can’t dump CC to SRT, even though it can play them (mplayer -subcc).  Bummer.

– Random rant about -noforcedsub and -nosub and -sub are conflicting / confusing, but too lazy to put together data about it, and it’s mostly related to the Matroska one above.

I just had to get that stuff off my chest. :)  I have faith in MPlayer eventually improving in said areas, and filing bugs would probably be good on my part.  I generally don’t deal with subtitles much anyway, so for me it’s kind of a “would be nice to have” set of features.  Meaning, I’ve already worked around the bugs and they don’t bother me as much anymore.  I would be curious to get SDH read support though.

I’m starting to notice a general trend here — I complain a lot about certain issues and bugs in detail, but never go out of my way to report them.  I’m becoming the kind of user that as a developer I totally hate!  Oh noes!

In reality, I like being able to be on both sides of the coin, and I’d have to agree with the assessment of most user complaints I see, that are: the barrier to entry to reporting bugs is too hard.  I could go into detail about that, but I don’t really want to, as I don’t wanna focus on the negative.  But generally speaking, sometimes it’s too much of a hassle to easily report a bug.  If it means me creating yet another user account on a bug tracker or subscribing to a mailing list, I weigh that against the strain of just ignoring or working around the bug.

I am, of course, to blame for my laziness, and I completely understand that developers (such as myself) need a detailed report with contact information along with the ability to quickly index reports.  I wonder if there’s some magical middle ground, though, where users who aren’t regular bug reporters can just easily report their issues and be on their way.  I know in Gentoo, we tend to use the forums as a poor-man’s bugzilla sometimes, and maybe that’s one way to do it.  Interesting stuff to think about.  Drive-by bug reporters, kinda thing.  They’ll come by once or twice, but not regularly.

Anyway, I can’t think of any other interesting DVD stuff I ran into this weekend.  Other than I bought season three of Taxi and it wasn’t as entertaining as I remembered it to be.  Oh well.  You win some, you lose some.