Saturday 3 January 2009

Fedora 10 and Multimedia - Is It Worse or Better?

Well, a hard question. At first I got thrilled by some new features, especially the automatic codec install, and pretty stable pace of improvements on gstreamer front, but lately I'm starting to notice issues as well.

First let me say that while both video and audio handling in gstreamer got generally improved I recently came across a clip (video in h264 and dual audio FLAC and mp3 in matroska + karaoke using styled ASS subs) that fails misserably pretty everywhere. Totem plays the audio fine, but the video gets pretty quickly out of sync, in gst-launch the video even eventually stops altogether. Gxine does not support styled subs, but other than that it plays it pretty well, though it picks wrong audio track. Mplayer plays it well, but the subtitles are totally out of sync. And that's probably the biggest woe of recent mplayer builds (where recent spans even to some time before Fedora 10 GA) - slightly more complex styled (ASS) subs are frequently out of sync or not displayed at all (usually when there are more subtitles at once).

So I was looking for a workaround using different video player, but... VLC a xine-lib don't support styled subtitles and for gstreamer there is a bug filled, with experimental plugin attached (using libass). So I've created packages for libass (it's built-in in mplayer, but I needed a standalone library) and for the gstreamer plugin (called assrender) and installed it. Yep, totem does not know about the new plugin for subtitles rendering, but after some googling and trying I sort-of learned how to make gst-launcher use it.

And well, though gst-launcher is good for debugging it's not good for playback, so I wanted to make a simple one-purpose media player using gstreamer and ruby (just for the fun of it :) But it seems, ruby bindings for gstreamer are not exactly in a state that makes it possible at the moment...

The assrender plugin, though highly experimental and not official, works pretty well and even support using fonts that are attached in matroska files (that's a really useful and pretty widely used), but because it supports only RGB colorspace output there are two colorspace conversions needed (YUV to RGB and back) which consumes cpu cycles and on my not so hi-end laptop it makes HD (1280p) videos, that are just about what my CPU is capable of, to fail miserably. So dear lazy web, if you want not-so-hard to do coding for gstreamer, you can help out with bringing libass support there. It would remove the last obstacle which prevents me from using gstreamer for everything ;-)

But at the same time, I am a bit concerned about mplayer as well - because on the same hardware, since Fedora Core 6 it's playback capabilities are getting steadilly worse. Not that it cannot play videos, but mplayer tends to fail resuming of paused video, then there's the issue with subtitles and lastly I've experienced a very weird bug (and workarounded it for my own purposes) - there's one assertion in ffmpeg code that prevents playing of certain matroska videos in mplayer.

Basically someone obviously expected that if you have chapters in a movie, than they will be strictly chronological, meaning next chapter (in list) won't start before current one. In matroska this is not always true and the failed assertion makes mplayer crash... For those who are interested, it's in libavformat/utils.c in compute_chapters_end () somewhere around line 1950 or 1960... It's this simple line:

assert(s->chapters[i]->start <= s->chapters[i+1]->start);

I'm still in doubts whether I should fill a bug or not about it... In my opinion there should be just if conditional, assert seems to me like an overkill, especially given that not aborting the code here (if the assertion fails) does not make mplayer doing things it is not expected to do.

8 comments:

Anonymous said...

Fedora 10 is awful with video. Worst version I tested. Video and DVD rendering are slow, slow ... Mediaplayers brake all the time ...

I hope it will get better.

Chitlesh GOORAH said...

to anonymous, << you are surely doing something wrong.

By the way, is there any reason why my blog posts are linked to your blog post ?

Martin said...

Chitlesh, I'm not sure. Certainly I have not added the links... But at the morning my blogpost was listed in fedora planet feed in your blog.

Damjan said...

Last time I used Fedora was to help some friend, but Fedora it's too difficult for me, all that GUI's, but the system
commands are not in the $PATH :D, so I had to type i.e /sbin/ifconfig all the time :D.

The built-in firewall and SE-Linux is cool, I believe it's good for Servers.

Anonymous said...

Just get the full pack of codecs from Fluendo. Imho it's reasonably priced. If not, consider it a bit of support for their work on gstreamer :) Recently they added the h.264 and aac stuff for 64bit too. Works very well on my x86_64 laptop with F10.

nicu said...

On the multimedia front, I have troubles with a basic task that used to work flawlessly: rip an audio CD into Wav of Flac and burn the track to another CD. I don't think I'm doing something wrong and my suspect is gstreamer... ripping with grip seems to work, have not tried yet to burn from command line (or anything non-gstreamer).

Martin said...

Pieter, actually I use rpmfusion's codecs. In my country they are luckily legal. And so far they were working pretty good, setting appart some recent issues with h246...

nicu, I use Sound Juicer for ripping. It's working pretty good so far and I like its gui as well. But I don't burn audio CD's very much, I cannot recall if the last time I burned an audio CD, it was via nautilus or via rhythmbox, but it worked...

nicu said...

That was my workflow: rip with SoundJuicer and burn with Brasero, but somwhow in F10 neither Brasero or Serpetine are able to burn audio CDs from those ripped files (and I neither do it often, since F10 i had to to it about 2-3 times for a friend who want to mix some discs).