Mailing List archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[linux-dvb] Re: vbv delay/buffer overflows on VBR statmux



At 19:41 20/05/2003, you wrote:
Gregor Lawatscheck writes:
> At 18:20 20/05/2003, you wrote:
> >In my recording, bytes 8-10 of the sequence header are encoded as
> >0f d2 23, which is bitrate '0000 1111 1101 0010 00'b = 16200!
> >Same bitrate as Gregor encountered.
>
> Nice one, looks like we've pin-pointed it. What happens if you run the file
> through analyze of mpegtools (
> http://www.metzlerbros.org/dvb/dvb-mpegtools-0.2.5.tar.gz )? It could hang
> or segfault (as stremtype does with these files) after patching vbv_delay
> with PVAstrumento it should calculate the correct bitrates GOPs in the
> stream. Are these RTL recordings VBR? So there's a bug in mpegtools as
> well which might have been reproduced by employing the same routines in the
> firmware which could also need fixing.


Where would that be?
The ES is not touched in mpegtools or in the firmware.
Don't "analyze" and "streamtype" look at the sequence header of the MPEG stream to output the bitrate? Doesn't analyze also look at the size of the P(E)S packets to calculate and output the bitrate per GOP?

http://www.mpex.net/riovolt/ptsprob-bbc2-pes.mpg (5,8 MB) for example segfaults streamtype and hangs anaylze on the first frame. After setting a different bitrate in the first sequence header or setting the vbv_delay to 0xffff throughout the file analyze suddenly works and streamtype outputs the right data.


Again, there is no kind of ES level processing in the firmware. This is all
done by the video DSP microcode which did not change for quite a while
(since the last RTSL release I got sometime back in 2001).
Uh oh, I hope the bug is not in there. The last firmware which worked fine was from 15 Apr 2001? Are you sure the firmware doesn't look at the bitrate in the seqeuence header -- well I guess why would it? Maybe it's a bug in the driver after all as I suspected way back in time - but then why would the driver tell the firmware something about the bitrate?

I know this might be a bit too much of a favour to ask from you, but could you please build a firmware with the RTSL that was used in 0.9.4 just so we can either eliminate or pin-point this as the cause?

The real fix is to throw out OSD memory and give it back to the video
decoder which seems to need it for some streams.
The good thing is, I've yet to encounter a stream that doesn't play once we manipulate the bitrate in the sequence header. That's how odd it is.

I have files which play fine when I increase the video buffer back to
its old size.
What was the old size and what's the new size? I think playing around with vbv_delay did the same thing as increasing the size of the video buffer in the firmware. IMHO I don't actually think a bigger buffer size is needed in the firmware. Leave the video buffer as it is and try changing the bitrate in the sequenece header instead and then play those streams which previously only played when you increased the video buffer. I wouldn't be surprised if they played then. If this is a bug that sits in the RTSL then omg :).

- Gregor



--
Info:
To unsubscribe send a mail to ecartis@linuxtv.org with "unsubscribe linux-dvb" as subject.



Home | Main Index | Thread Index