[vdr] Frame detector glitch

Eike EikeSauer at t-online.de
Mon Jan 13 21:38:44 CET 2014


Hello!

I'm experiencing what I'd call a glitch of VDR's frame detector class.

There's a define #define MIN_TS_PACKETS_FOR_FRAME_DETECTOR 5.
According to my experiences, this number of TS packages in not always 
enough to detect frames as early as possible. Thus it is a matter of chance 
if detection will be fed with enough data to detect the first frame or if it
will glitch through to another one. I think we should avoid such situations.

I attached demo code (needs some includes and to be compiled and linked 
with VDR) which shows the behaviour and I stored a short TS sample at
http://ein-eike.de/wordpress/wp-content/uploads/2014/01/vdr-sample.ts
The code checks when an I frame is found, at first with full data available,
and then with data dripping in with a frame size of 5, 6 ... until the 
dripping data yields the same result as the flooding data.

I get the following output from the given example:

Checking file at offset 0 
Without frame limit... Found I frame after 190256 bytes
With frame limit 5... Found I frame after 398560 bytes
With frame limit 6... Found I frame after 190256 bytes
TS package frame size needed for this video block: 6 
Maximum TS package frame size needed for this video recording: 6 

Unfortunately, I cannot tell if 6 is the definite number to avoid such glitches
or if other circumstances would need a higher number. I wrote the code such
as people might try it out on their video files so we could experiment. 
(I could provide a Linux executable as well.)

Ciao,
		Eike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: AnalyzerTest.c
Type: text/x-csrc
Size: 2606 bytes
Desc: not available
URL: <http://www.linuxtv.org/pipermail/vdr/attachments/20140113/b5522eda/attachment.c>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: <http://www.linuxtv.org/pipermail/vdr/attachments/20140113/b5522eda/attachment.pgp>


More information about the vdr mailing list