Goodday all forummers,
I have recently been assigned to a university project where the objectives are to reduce blocking distortions/artifacts by using MPEG-4/H.264 standard. As I have zero knowledge in this field, this project is completely new to me. Anyway, in this project I would have to:
1) Compare the performance (artifacts) of DCT and DWT.
2) Incorporate deblocking filter to smooth out the artifacts.
As a start, I've tried looking for a H.264 source code in C (a simple one would do) but I couldnt find one. I'd really appreciate if someone could give me some guidance on where it could be found and how do I 'inject' some videos to the program and run it.
Thank you so much.
+ Reply to Thread
Results 1 to 13 of 13
-
-
You can't get H.264 source code because it's covered by patents.
This is a (supposedly) patent free replacement for H.264:
http://www.videolan.org/developers/x264.html
Some of it is in assembler though. Looks like most is in C. I cannot answer ANY questions you may have on the source code, how to use it, how to build it, how to get it, etc. I'm rather puzzled by your project as people get paid big money to write code like this for a living and even the X.264 project has people working on it who probably have forgotten more than you'll ever know on the subject. I'm really not getting the point of your assignment as it's highly unlikely that anyone in your class will come up with some kind genius idea that nobody else has thought of. And I'm not sure how practical it is to do this kind of task as an assignment when it doesn't have anything to do with what 99% of your classmates will do in the real world. I thought universities had all but abandoned anything that isn't object oriented so I'm amazed that you even learn C any more. -
Thanks very much for the code. But how do I inject a video into the code and run it to see its output?
-
A software patent is a public document that often includes source code. While x264 may be free of all copyrighted code derived from the H264 reference implementation, it is still subject to patent law. The public filing of a patent is, in part, to provide information about a new invention so it can be studied by research and development teams at both universities and companies. Note, however, that a patent must be licensed before it is used for commercial purposes. While x264 employs many patented technologies, it does so as a learning and research endeavor rather than a commercial product.
It is an interesting question whether people should learn how to do things that others have already done. Why bother to learn how to add fractions, when someone else has already learned and done that? Why bother to learn English, when there is a greater than 99% chance you will never be a great author? Why learn about deblocking filters or H264 encoding?
What the x264 project proves is that you do not have to be a highly paid engineer to understand and make improvements to sophisticated video encoding techniques. It also demonstrates that object oriented programming languages aren't needed for programs that actually compute things. However, I do not think H264 video encoding standard will be useful when comparing block cosine transforms to wavelet transforms for a school project. Instead, I would suggest comparing mjpeg to jpeg2000. These video compression standards are much simpler and should make for an easier comparison. Mjpegtools includes a reasonable mjpeg encoder and opendcp includes a reasonable jpeg2000 encoder. Documentation on how to install and use these codes are on the websites
http://mjpeg.sourceforge.net/
http://code.google.com/p/opendcp/ -
Thanks ejolson for the clarification. First of all, this is my final year project in my university and I'm actually from telecommunication background where I'm more familiar with Matlab. I decided to take this project since I wanted to try something new where I have no background in. My supervisor's previous work involves the comparison of DCT and DWT using MPEG2 standard so he wants me to do the same thing using the H.264 standard to see if it yields the similar result. Honestly, I tried searching for a lot of places and still I do not know how DWT works.
Anyway, I will be using Microsoft Visual C++ 2008 Express to run the code and do the comparison. However, I'm stuck at the very beginning stage on how to run the code itself. There are so many code files that I do not know which one to run using the compiler, let alone putting in the video.
Anyone cares to lend me further assistance? -
It is difficult to compare the DCT and DWT in the context of H264 because there isn't a similar wavelet codec that could be compared to H264. A quick walk through the Wikipedia brings up the following reference
http://www-ee.uta.edu/Dip/Courses/EE5359/ArunaRavi_MSThesis.pdf
which compares H264 to the BBC Dirac codec and seems related to what you are interested in.
In the context of H264 think it would be interesting to see a comparison of AVC-Intra with jpeg2000. These are both i-frame only codecs, so there is no motion compensation algorithms that might cloud the DCT versus DWT comparison. -
Gonna have to disagree here. As a graduate of an American university (degree in computer science) some colleges are well known for giving students projects that have no real world usefulness. It's more like assigning students with no interest in hieroglyphics the task of learning to translate from ancient Egyptian to English. If they just want to teach programming concepts there are better assignments that at least might be applicable towards a real world job after college than trying to get students to reinvent the wheel with H.264.
-
Complete and utter bs with many incorrect and misleading statements wrapped around a small number of correct ones, illustrating that you have a complete and total lack of understanding of how patent law works.
x264's authors assert that it does NOT employ ANY patented technologies. A court would have to decide should the H.264 patent holders have any interest in trying to shut the project down (to date they have not).
skyjuice - You follow the above at your own peril. -
Software patents are a non-issue in France where x264 is located. In the United States and possibly in Freedonia as well x264 must be licensed from the AVC patent pool
http://www.mpegla.com/main/programs/avc/Documents/avc-att1.pdf
before it can be used for other than research and educational purposes. In the current situation of a university student working on a project in telecommunications, there is no need to worry about the patents.
In regards to the original post, since you have only a few months for this project I would suggest not using Microsoft Visual C++ 2008 Express. Instead, test binary executables of existing video encoders and do your data analysis in Matlab using the Image Processing Toolbox. For me it would be interesting to know how texture segmentation and other image properties are affected by different video compression techniques.
http://www.mathworks.com/products/image/description5.html -
Thanks for the replies. Anyway, I have decided to use Ubuntu 11.10 andfollowed steps 1-3 given in this website http://ubuntuforums.org/showthread.php?t=786095. Everything went smoothly without any problem but how do I insert a video into this code to see its output?
-
Examples of how to encode a video are in that same thread. Note that when comparing video compression schemes, the reference video should be uncompressed or at the very least intra-frame only. Otherwise, results may favor compression schemes that are most similar to the original compression used for the reference video. While it is an interesting question, how to best compress a video that was already compressed, this does not seem to be what your project is focused on.
-
I've managed to perform some encoding. My input file is not a video but a sequence of pictures (frame) in TIF format. By following the code
"x264 /path/to/inputvideofile -o outputvideo.mkv", I've managed to obtain the encoded frame in mkv format. Is it possible to encode in another format. I have another few questions:
1) Whats the difference between the code I mentioned above from the code listed on the website (one-pass crf, two-pass encode and lossless h.264 such as the one given below)
ffmpeg -i input -vcodec libx264 -preset ultrafast -crf 0 -acodec copy output.mkv
2) How can I define some of my frames as I, B and P frames?
3) I have tried looking for a block diagram for the x264 encoder but to no avail. A simple block diagram of an MPEG-2 encoder is shown in the link below
http://i564.photobucket.com/albums/s...ockDiagram.jpg . Hence, I'd really appreciate if someone manage to find the block diagram for x264.
Thank you very much. -
Actually i've just known that you also do replacing dct with dwt in h.264. I also do it right now for my undergraduate thesis, but I don't use x.264, just follow the algorithm in the standard and code in matlab.
Can I have your email? Maybe I can ask something about this matter.
Similar Threads
-
Yamb Source Code
By simonrule in forum ProgrammingReplies: 0Last Post: 3rd Nov 2009, 11:50 -
Avi Recomp source code
By simonrule in forum ProgrammingReplies: 1Last Post: 17th Oct 2009, 13:22 -
Source code for SDP Multimedia
By igorek in forum Newbie / General discussionsReplies: 2Last Post: 22nd Oct 2008, 03:37 -
Windows Vista Source Code
By Delta2 in forum Off topicReplies: 2Last Post: 14th Apr 2008, 06:46 -
How do you hard-code subtitles to H.264 video?
By Roger_Kun in forum SubtitleReplies: 2Last Post: 25th Sep 2007, 00:37