[FFmpeg-devel] [PATCH] Support for Dirac in ogg
Thu Nov 6 06:36:26 CET 2008
On Wed, 2008-11-05 at 22:27 -0500, David Conrad wrote:
> On Nov 5, 2008, at 10:09 PM, Anuradha Suraparaju wrote:
> > Hi,
> > On Wed, 2008-11-05 at 03:32 -0500, David Conrad wrote:
> >> Hi,
> >> Attached adds demuxing support for dirac in ogg files. It uses a
> >> couple functions for the soc dirac decoder to parse the header,
> >> updated to the latest specification.
> > In function dirac_header in oggparsedirac.c do you need to parse the
> > sequence header? The decoder will do that anyway won't it? If the
> > parsing of the sequence header is skipped, then oggparsedirac.c and
> > oggdec.c can be merged into the svn trunk straightaway, pending
> > approval
> > from the maintainers of course.
> The ogg demuxer needs to know the frame rate in order to calculate the
> duration of the stream, which happens before the decoder or parser get
> a chance to do anything.
Is this for seeking?
> At any rate I found some subtle issues with dirac's timestamps in ogg
> that prevent going merging. I'll try your improved parser to see if it
> helps. (there are two issues, one being that all ogg dirac sample
> files assume granulepos is the time when the associated packet starts
> rather than the time when it ends as according to the specs. It seems
> the mapping spec also assumes this. The second is that the stored pts
> seems to be plain wrong.)
Try using ffmpeg2dirac to transcode files to Dirac wrapped in Ogg. It is
basically a clone of ffmpeg2theora that replaces Theora with Dirac. The
files created by it seem to play back okay with VLC (Schroedinge support
enabled) and my local FFmpeg tree which was patched to support Dirac in
Ogg. Seeking doesn't appear to be a problem either. The source can be
found in the Git repository on diracvideo.org.
git clone git://diracvideo.org/git/ffmpeg2dirac.git
If you want a sample file generated by ffmpeg2dirac just let me know
where to upload it to.
> I'll split the sequence header parsing out since it'd be useful to
> have only one function that's used by your parser as well.
That will be very helpful.
More information about the ffmpeg-devel