Hi,
I read the ISO / IEC 13818-2: 1995 for trying to better understand how is the detection of I-frames. In Chapter 6.2 the header image will begin by picture_start_code in remux.c
if (scan == 0x00000100) (/ / Picture Start Code
If I understand the detection of the i-frame is in the picture_coding_type according to Table 6-12
picture_coding_type / coding method 000 / forbidden 001 / intra-coded (I) 010 / predictive-coded (P) 011 / bidirectionally-predictive-coded (B) 100 / Shall Not Be Used (dc intra-coded (D) in ISO/IEC11172- 2) 101 / reserved 110 / reserved 111 / reserved
I do not understand this line of code:
independentFrame = ((Data [i +2]>> 3) & 0x07) == 1 / / I-Frame
thank you for your answers
Regards
Senufo
On 05/19/10 22:20, Senufo wrote:
Hi,
Thanks Klaus Klaus I agree, but the video looks good because I can see this live stream and when I use the patch records are correct. I did a test with vdr 1.6.0 with the same channels.conf and there I can see the live stream and recordings works.
Why ?
I have no idea.
Of course, the whole frame detection is different in VDR 1.7. You might want to debug that area to see why it doesn't work any more. Simply changing that bit from '1' to '0' can't be the solution.
Klaus
On 05.05.2010 22:11, Senufo wrote:
Hi,
I found the problem. VDR does not detect the frame independent
in this
stream because in the function :
cFrameDetector:: Analyze (const uchar * Data, int Length) in the file remux.c. ((Data [i +2]>> 3) & 0x07) is equal to 0 instead of 1 for stream
that work.
I applied this patch : --- remux.c 2010-05-04 14:55:50.000000000 +0200
+++ remux.c.orig 2010-05-04 21:57:38.000000000 +0200 @@ -960,6 +960,7 @@ return Processed; // flush everything before this new frame newFrame = true; independentFrame = ((Data[i + 2] >> 3) & 0x07) == 1; //
I-Frame
if (((Data[i + 2] >> 3) & 0x07) == 0) { independentFrame = 1;} if (synced) { if (framesPerPayloadUnit <= 1) scanning = false;
and record is working again.
I do not know what has changed in the stream.
I tested this patch since yesterday and so far I have not had any
problems.
What do you think?
If this stream marks independent frames with '0' instead if '1', I would say it is broken.
Klaus
Hi,
Am 30.06.2010 16:47, schrieb Senufo:
I read the ISO / IEC 13818-2: 1995 for trying to better understand how is the detection of I-frames. In Chapter 6.2 the header image will begin by picture_start_code in remux.c
if (scan == 0x00000100) (/ / Picture Start Code
If I understand the detection of the i-frame is in the picture_coding_type according to Table 6-12
picture_coding_type / coding method 000 / forbidden 001 / intra-coded (I) 010 / predictive-coded (P) 011 / bidirectionally-predictive-coded (B) 100 / Shall Not Be Used (dc intra-coded (D) in ISO/IEC11172- 2) 101 / reserved 110 / reserved 111 / reserved
I do not understand this line of code:
independentFrame = ((Data [i +2]>> 3) & 0x07) == 1 / / I-Frame
thank you for your answers
Chapter 6.2.3 explains the picture header:
picture_header() No. of bits Mnemonic
picture_start_code 32 bslbf temporal_reference 10 uimsbf picture_coding_type 3 uimsbf vbv_delay 16 uimsbf
Data[i + 2] contains 2 LSB of temporal_reference (t), picture_coding_type (P) and 3 MSB of vbv_delay (v).
So the bits of byte Data[i + 2] look like that:
ttPPPvvv
And the above code does:
3 000ttPPP
& 0x07 00000PPP == 1 00000001
If you put 001 for an I frame from the above table for PPP you see the equation matches.
Bye.