[Theora-dev] Directshow filters 0.64.7923 (was: Re: [Theora-dev] Directshow filters 0.64.7878)

Robert Huitl theora-dev at huitl.de
Sat Oct 9 10:09:27 PDT 2004

On Thursday 07 October 2004 09:53, illiminable wrote:
> OK... i had a look at some of this stuff... now i remember why the data
> isn't filled in.
> It was actually because i was lazy when creating the encoder and just
> duplicated the decode format blocks... the encode format blocks weren't
> intended to carry most of this information. They really only should be
> provding the info the mux needs, like timing info. It's likely in future
> versions, the codecs will all output the same encoder format block with
> only timing info, so you'd be best not to rely on that as your information
> source.
> I will fill in the ones that can be known be known prior to encoding for
> the moment... like the versions and frame sizes etc... but there's no
> gaurantee they will always be correct (though they should be)...

I tried the new 7923 build, the format blocks now read (without bitrates and 
---> sizeof = 48
---> theoraVersion = 3131961357
---> width = 160
---> height = 128
---> frameWidth = 160
---> frameHeight = 120
---> frameRateNumerator = 5
---> frameRateDenominator = 1
---> aspectNumerator = 0
---> aspectDenominator = 0
---> maxKeyframeInterval = 3
---> xOffset = 0
---> yOffset = 4
---> colourSpace = 0

---> sizeof = 24
---> speexVersion = 3131961357
---> samplesPerSec = 8000
---> numChannels = 1

The version is still missing. Maybe this isn't a problem, since it works :)

The yOffset is wrong, though. With this theora block for decoding, the result 
is as seen on http://www.huitl.de/theora/wrong-yoffset.jpg. I get correct 
results using this formula:
xOffset = width % 16
yOffset = height % 16
For the example shown above, yOffset will then be 8. With resolution 320 x 
240, yOffset will be 0 and this seems to be correct, too.

I'm not sure about maxKeyframeInterval, since I configured the video encoder 
to a keyframe freq of 15.

> You should really get the information you need from the headers to make
> sure that they are correct (and to save yourself grief when i start
> reviewing all the api's) As these settings are created prior to the encoder
> seeing any data, the only info that is really known is the information
> provided by the raw data source.
> If you need to see how to do that... look in TheoraStream, SpeexStream,
> VorbisStream etc class in the demuxer, for the method createFormatBlock
> which parses the headers. Or look in the spec docs for the appropriate
> codec.

Ok, I will have a look at this. Please upload the 7923 source code :)

While we're at it, maybe you can answer another DirectShow-related question:
              /------> Theora Decoder ---------> VMR Video Renderer
NCDShowFilter |
              \------> Speex Decoder ----------> Some audio device

With this decoder graph (or two separate NCDShowFilters for video and audio), 
I get no audio playback, unless there are video packets fed to the graph. It 
would be nice though to be able to only send audio to the peer. 
Synchronization is turned off for this graph. I guess the video renderer is 
waiting for its buffer to fill up, and blocks the graph until this happens. I 
could not yet find a solution to do audio/video playback independently. Sure, 
I could use two filter graphs, but I'd lose the possibility to synchronize 
A/V (which I need to do soon), won't I?

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.xiph.org/pipermail/theora-dev/attachments/20041009/24593812/attachment.pgp

More information about the Theora-dev mailing list