Difference between revisions of "SoC 2010 Ogg Demuxer"

From VideoLAN Wiki
Jump to navigation Jump to search
(Created page with 'Week 1: 26th May 2010 I started by porting and adapting the existing code from the LiVES ogg/theora decoder. I made some updates to ogg.c and added the new files oggseek.c and…')
 
Line 1: Line 1:
Week 1:
+
'''Week 1:'''
  
26th May 2010
+
'''26th May 2010'''
  
 
I started by porting and adapting the existing code from the LiVES ogg/theora decoder.
 
I started by porting and adapting the existing code from the LiVES ogg/theora decoder.
Line 21: Line 21:
  
  
TODO:
+
'''TODO:'''
  
This week:
+
'''This week:'''
 
- seek to the exact frame required (i.e skip frames until we hit the target frame)
 
- seek to the exact frame required (i.e skip frames until we hit the target frame)
 
- work out how to tell if we are dealing with a remote stream (which has no seek capbilities)
 
- work out how to tell if we are dealing with a remote stream (which has no seek capbilities)
Line 32: Line 32:
  
  
Week 2:
+
'''Week 2:'''
 
I plan to backport the updated code back in to LiVES, since I made a few corrections and improvements to the code.
 
I plan to backport the updated code back in to LiVES, since I made a few corrections and improvements to the code.
 
Split the LiVES code into demuxer/decoder - this will be necessary for the next part.
 
Split the LiVES code into demuxer/decoder - this will be necessary for the next part.
  
  
Week 3:
+
'''Week 3:'''
 
Investigate how seeking works with dirac video streams (it is slightly different to theora in that there is a lower bound, but no upper bound). Test implementation of this in LiVES first.
 
Investigate how seeking works with dirac video streams (it is slightly different to theora in that there is a lower bound, but no upper bound). Test implementation of this in LiVES first.
  
  
Week 4:
+
'''Week 4:'''
 
Continue work from week 3, and begin porting dirac code from LiVES to vlc.
 
Continue work from week 3, and begin porting dirac code from LiVES to vlc.
  
  
  
Week 5+:
+
'''Week 5+:'''
  
 
TBD. (Maybe look at x and y offsets, maybe look at multiple clips within one ogg container, possibly add ogg skeleton support).
 
TBD. (Maybe look at x and y offsets, maybe look at multiple clips within one ogg container, possibly add ogg skeleton support).

Revision as of 22:07, 26 May 2010

Week 1:

26th May 2010

I started by porting and adapting the existing code from the LiVES ogg/theora decoder.

I made some updates to ogg.c and added the new files oggseek.c and oggseek.h. Some definitions from ogg.c were moved into the new file ogg.h since they are now common to both ogg.c and oggseek.c

As a first test, I was able to correctly determine the total number of frames in various ogg/theora files:

- seek to the last ogg page for a given stream (i.e. the theora stream)
- get the granulepos
- convert the granulepos to a frame number
- set the total number of frames

As a result the demuxer can now return the file length in microseconds. This can be seen in the interface at the bottom. Previously this figure was an estimate, but now it is accurate.


As a second test, I was able to seek roughly to any given frame or time in a clip. Right now it is not frame accurate, so there are still some minor artifacts after seeking. I plan to fix this properly in the next couple of days.

One thing which was slightly unexpected - vlc may (?) start playback before all of the stream header data is read. This means that when getting the frame count, for very small files we may read back into the header data. I need to investigate if this is a problem or not - so far it has not caused any issues.


TODO:

This week: - seek to the exact frame required (i.e skip frames until we hit the target frame) - work out how to tell if we are dealing with a remote stream (which has no seek capbilities) - check audio and subtitle sync after a seek - test with more ogg/theora clips (including very small clips, see above) - clean up the code (mostly done) - see if we can pull/use more meta data from the stream (e.g. comments, codec version, aspect ratio, frame and picture size, x and y offsets)


Week 2: I plan to backport the updated code back in to LiVES, since I made a few corrections and improvements to the code. Split the LiVES code into demuxer/decoder - this will be necessary for the next part.


Week 3: Investigate how seeking works with dirac video streams (it is slightly different to theora in that there is a lower bound, but no upper bound). Test implementation of this in LiVES first.


Week 4: Continue work from week 3, and begin porting dirac code from LiVES to vlc.


Week 5+:

TBD. (Maybe look at x and y offsets, maybe look at multiple clips within one ogg container, possibly add ogg skeleton support).

Frei0r effects ?

Port other demuxers/decoders to LiVES ?