Difference between revisions of "SoC 2010 ASF Demuxer"

From VideoLAN Wiki
Jump to navigation Jump to search
Line 47: Line 47:
  
 
The new code will first enter the ''libasf'' branch and when it's stable enough I will port it for the 1.2 version and push to ''master''. The main idea is to have only that kind of code that can be merged to upstream is in ''master'' and ''vlc-1.1'' branches. The ''vlc-1.1'' branch is mainly for patching possible small issues that come up in VLC 1.1 or backporting changes from ''master'' when appropriate.
 
The new code will first enter the ''libasf'' branch and when it's stable enough I will port it for the 1.2 version and push to ''master''. The main idea is to have only that kind of code that can be merged to upstream is in ''master'' and ''vlc-1.1'' branches. The ''vlc-1.1'' branch is mainly for patching possible small issues that come up in VLC 1.1 or backporting changes from ''master'' when appropriate.
 +
 +
== Weekly progress ==
 +
 +
'''Week 1'''
 +
 +
The ASF demuxer codebase is pretty clean and straightforward, except for the patches that add DVR-MS, they are not so clearly described but can be seen easily in commit [http://git.videolan.org/?p=vlc/vlc-1.1.git;a=commitdiff;h=308d7c4354df86074583e4635cde5cfbb705e00c;hp=9cd8ee7b4ee1f29fc1c0d584be813b4130492246 308d7c4354df86074583e4635cde5cfbb705e00c]. There's things like "64 bytes we don't know much about" that should be cleared out. The DEMUX_SET_TIME falls back to the SeekPercent which should be improved so that it would seek to video keyframes. Right now seeking in files without index often result in garbage on the screen for a while. There's comments like "/* FIXME I have to do that for some file, I don't known why */" where I have some kind of idea why it has to be done for some file, these should be commented and cleared up.
 +
 +
The ASF muxer has very limited capabilities of editing the metadata of generated ASF file. Only the basic metadata set "title, author, copyright, comment, rating" can be modified, plus two additional options "packet-size" and "bitrate-override". The header serialization is done by writing the headers statically byte by byte. It would make sense to use the ASF header structs already used in the ASF demuxer and serialize those to the output for more flexibility. The muxer also seems to create an index object in the end of the stream, but the index object doesn't seem to contain any index entries. If the index is really to be used, it should create a proper seeking index at least.

Revision as of 18:15, 31 May 2010

This project is part of Google Summer of Code 2010.
Student: Juho Vähä-Herttua
Mentor: Ilkka Ollakka

ASF and other demuxer support

Abstract

I was selected to do a project related to ASF and Matroska demuxers, but since there's some overlap related to Matroska, my main goal now is to improve both the ASF demuxer and muxer as much as I can and then find another similar project to work on the rest of the time. It's worth to note that the timeline on this website is just a suggestion, and it's no problem to work on small independent patches during the time as well. I like to do things well on the first try, that's why the schedule is not made too tight.

Information

I'm a student at Aalto University School of Science and Technology and I hope this is my final year here. I've been a student since 2003 and plan to graduate during summer 2010. Partly because of all this I might have some other things to take care of until the end of June. The plan is to work full time on this project from July to August however. I have a personal website that I made some years ago, it has most of the useful information about myself.

Timeline

Date Period Description
April 26 - May 24 Community bonding Getting more familiar with the VLC code base, some small fixes.
May 24 - May 30 Week 1 Review all the existing code, map out needed features.
May 31 - June 6 Week 2 Start cleaning up the demuxer code, go through existing related bugs.
June 7 - June 13 Week 3 Write a working VLC demuxer plugin with a clear API.
June 14 - June 20 Week 4 Work on an API to combine the demuxing and muxing code together.
June 21 - June 27 Week 5 Finish and review the muxing code, write some test cases.
June 28 - July 4 Week 6 Write a working VLC muxer plugin using the rewritten muxer.
July 5 - July 11 Week 7 Extra cleaning up period, because there's always something that slips the deadline.
July 12 - July 18 Week 8 (small extra project, to be discussed with mentors)
July 19 - July 25 Week 9 (small extra project, to be discussed with mentors)
July 26 - August 1 Week 10 Start finishing up (write test suites, run code with valgrind).
August 2 - August 8 Week 11 Continue finishing up.
August 9 - August 15 Week 12 Finish up and do any final testing.

Produced code

For convenience everything is hosted in my personal github repository. There are at least three branches available, plus possibly some extra branches depending on the need. The meaning of the branches is as follows:

master - Follows the VLC master in git://git.videolan.org/vlc.git plus patches
vlc-1.1 - Follows the VLC 1.1 in git://git.videolan.org/vlc/vlc-1.1.git plus patches
libasf - Branched from VLC 1.1 for now because it's more stable, will contain experimental ASF code

The new code will first enter the libasf branch and when it's stable enough I will port it for the 1.2 version and push to master. The main idea is to have only that kind of code that can be merged to upstream is in master and vlc-1.1 branches. The vlc-1.1 branch is mainly for patching possible small issues that come up in VLC 1.1 or backporting changes from master when appropriate.

Weekly progress

Week 1

The ASF demuxer codebase is pretty clean and straightforward, except for the patches that add DVR-MS, they are not so clearly described but can be seen easily in commit 308d7c4354df86074583e4635cde5cfbb705e00c. There's things like "64 bytes we don't know much about" that should be cleared out. The DEMUX_SET_TIME falls back to the SeekPercent which should be improved so that it would seek to video keyframes. Right now seeking in files without index often result in garbage on the screen for a while. There's comments like "/* FIXME I have to do that for some file, I don't known why */" where I have some kind of idea why it has to be done for some file, these should be commented and cleared up.

The ASF muxer has very limited capabilities of editing the metadata of generated ASF file. Only the basic metadata set "title, author, copyright, comment, rating" can be modified, plus two additional options "packet-size" and "bitrate-override". The header serialization is done by writing the headers statically byte by byte. It would make sense to use the ASF header structs already used in the ASF demuxer and serialize those to the output for more flexibility. The muxer also seems to create an index object in the end of the stream, but the index object doesn't seem to contain any index entries. If the index is really to be used, it should create a proper seeking index at least.