Log in

View Full Version : MPEG 4 Specification - where to get it?


conio123
11th March 2010, 13:15
Hello,
I'm writing a program that will convert AVI movies to DVD on GPU - I'm using OpenCL to do the job. Conversion on GPU will be much, much faster than on CPU, so if this project succeeded, it would be quite nice (I want of course share my tool if I manage to make it). But I have some problems - the biggest is with actually getting some info about compression algorithm used in AVI files - I found that it is MPEG 4 Part 2 (whatever it means, especially this part 2:) ). On ISO site this specication costs about 400 or 500 swiss franks, so quite expensive thing. That's why I'm writing here - could anybody tell me, or supply some good links, about MPEG4 in general and compression algorithms (how to decompress it) in detail? I found one way - it's reading libavcodec/xvid source code, but it's time consuming and propably the last thing I can do. I also found that different codecs like Divx, Xvid, etc. use different implementations of MPEG4, so they have their own features which makes my project even more complicated - implementing every single feature would be horrible :). So, once more, please help me about MPEG4 and decompressing it (compression to MPEG2 (DVD) is much better documented, I found something about it). I promise that if I finish this tool, I'll share it, so that compression will take few minutes instead of few hours.
Big thanks for help,
Conio

Blue_MiSfit
12th March 2010, 01:47
AVIs do not always contain MPEG-4 Part 2 (ASP)!! AVI is just a container format. I'd agree that they most frequently contain MPEG-4 video, but definitely not always!

It sounds like you're thinking of writing you own AVI splitter, MPEG-4 decoder, and audio decoders (among others), and THEN writing your own MPEG-2 video encoder!!

My word of advice: GOOD LUCK :) I hope you're a skilled programmer with a lot of time on your hands.

You might look into using libavcodec/libavformat (or ffms2) for your decoding processes, and do the encoding on the GPU.

Just a high level suggestion.

~MiSfit

SeeMoreDigital
12th March 2010, 13:03
conio123,

Given, that it's possible to buy very cheap DVD players that support the playback of MPEG-4 Part-2 (in .AVI) files via CD-R, DVD~R, USB pen-drive or memory card... Personally, I can't see the point of creating such an application

conio123
12th March 2010, 14:30
Well, there is some point in my opinion - many people have good dvd players without Divx/AVI support, so they could make something from this application. Plus I want to learn OpenCL, so that this project will help me. So, could you point me on some papers? Decoding it on CPU (via libavcodec/xvid) could be a nice idea, but how much percentage of time (approximately) does it take to decode, encode, etc? Is decoding rather quick process and encoding takes most of the computing power?
Thanks :)

Mr VacBob
16th March 2010, 06:32
OpenCL is not at all helpful for this - GPU video decode is done with dedicated hardware and good encoding is done with frame-parallel threading and careful CPU SIMD. GPU would be slower than CPU for most operations.