Archive for May, 2008

Year of AAC in FFmpeg

Saturday, May 31st, 2008

I’ve started working on AAC encoder for FFmpeg. I’ve bricked (=made a dead-tree brick copy) a bit of standard (it’s really big) and have written a bit of code too. Hopefully we will have fully working AAC encoder to the end of summer. It’s time to get rid of libfaac and libfaad dependencies!

The phrase chosen as title was coined by Robert Swain, who works on bringing GSoC-2006 AAC decoder to FFmpeg and adding SBR support to it.

VC-1 test source

Friday, May 23rd, 2008

To my great surprise there are people working with reference decoder and asking for files with some features and digestable by it. Well, here is an ultimate answer – RCV muxer for FFmpeg (hey, writing a muxer and patching FFmpeg build system were two things I haven’t done yet).

You can get FFmpeg sources, apply this patch, compile and try ffmpeg -i file.wmv -vcodec copy out.rcv. Good luck!

BIG FAT WARNING. It is not guaranteed to work with reference decoder on all files. Try files with smaller dimensions.
Or hack reference decoder to ignore image dimensions (ffplay would play those files correctly while reference decoder complains on something about “image size is too big for this level”).

RV: present state

Sunday, May 18th, 2008

If you are interested in what’s going with my RV decoder from GSoC 2007 then here are your answers.

What works:

  • RV30 decoding mostly works
  • RV40 decoding mostly works
  • Pictures are quite recognizable

What needs to be resolved:

  • RV40 loop filter
  • RV30 loop filter (a bit easier)
  • RV30 motion vectors in B-frames (sometimes they are a bit jumpy)
  • RV30 chroma problems (colours are always moving to the upper left corner of the frame – incorrect rounding?)
  • RV30 slice uniting problem (some splitted slices should be united by decoder – at least I know how and when to do this)

If you want to help with loop filter then loop at
loop filter work scheme (SVG, ~128Kb) and give your proposals on how it works.
Legend (macroblock is 4×4 subblocks, no borders as they will ruin this scheme):

  • numbers at the top and left eddge – macroblock numbers
  • black lines – subblock edges where loop filtering took place
  • hex number at the top left corner of macroblock – coded block pattern, it’s red for intra types macroblocks and for P macroblocks with DC coeffs coded separately
  • blue square – coded subblock

Any suggestions (and pointers to the information about H.264 loop filtering explained clearer than in standard) are welcome.

I’d like to finish it before starting my work on AAC encoder…

BTW, you can use ffmpeg-rv.patch from soc/rv40 repository to enable RV30/40 decoding in ffmpeg.

Subtitles

Tuesday, May 6th, 2008

I consider subtitles to be more of evil. Why? Because they steal precious screen space, create a distraction and usually of a bad quality. Also external subtitles can create a lot of problems with synchronization, especially when movie is cut into parts. Our television channels have extremely small subtitles translating Russian speech into Ukrainian but nobody reads them anyway (and I don’t watch TV at all). Those subtitles can provide some amusement though because of very crooked translation (I’ve heard that “Vienna ball” was translated like “Vienna jumpings”, it’s hard to translate that word back).

I know, newer container formats like Matroska and OGM (both are not good) have support for subtitles and there are ‘advanced’ subtitle formats designed for them (like ASS) with a lot of features — font family/size/style selection, placing text in different parts of the screen, etc (backscratching is not there yet). Well, one day they will achieve what DVD subtitles already have – information overlay over moving picture.

Another issue with subtitles is the quality of translation. Well, usually translations are bad, especially low-budget when they don’t even have money for dub (fansubbing is a different thing). Personally I’ve found that neither Spanish, French nor Italian subtitles had helped me with understanding Wagner operas. And Chinese subtitles are hard to read (and impossible without the dictionary or Chinese man).
It’s better to learn language instead.

And now for something completely different – good examples of subtitles.
(more…)