[FFmpeg-devel] [PATCH]Silence ffmpeg with some h264 camera recordings

Carl Eugen Hoyos cehoyos
Sun Feb 15 13:10:56 CET 2009


Michael Niedermayer <michaelni <at> gmx.at> writes:

> 
> On Sat, Feb 14, 2009 at 02:04:56PM +0100, Carl Eugen Hoyos wrote:
> > Hi!
> >
> > Some HD camera recordings make ffmpeg output many lines like the following:
> > [h264 @ 0xee41d0]AVC: Consumed only 6509 bytes instead of 6516
> >
> > I'm currently uploading a sample to incoming/vdpau, but there was also a 
> > sample containing men in a boat showing the same issue.
> >
> > Is attached patch ok?
> 
> could you post the hex values of the end of the bitstream?
> i mean a litte bit surrounding the true end and where the decoder expected it

I hope the patch used is correct:
[h264 @ 0xeeb1d0]AVC: Consumed only 66333 bytes instead of 66340
c4 c6 04 4a c9 ef b6 5d b6 2d ab 6a dc  00 00 00 00 00 00 00 00
[h264 @ 0xeeb1d0]AVC: Consumed only 36997 bytes instead of 37004
54 56 e2 b7 4a 38 28 54 9d 59 d7 37 c0  00 00 00 00 00 00 00 00
[h264 @ 0xeeb1d0]AVC: Consumed only 65521 bytes instead of 65524
1f e4 81 a8 26 13 bd b1 07 9b 9c 1f be  00 00 00 00
[h264 @ 0xeeb1d0]AVC: Consumed only 34726 bytes instead of 34732
79 79 79 7e 9b f8 28 14 fe ff aa 7e c0  00 00 00 00 00 00 00
[h264 @ 0xeeb1d0]AVC: Consumed only 7976 bytes instead of 7980
a6 42 8c aa ab 94 75 75 7c 5a b5 f7 80  00 00 00 00 00
[h264 @ 0xeeb1d0]AVC: Consumed only 40262 bytes instead of 40268
18 81 e2 b9 ef f8 28 09 7e 6f 37 5b 60  00 00 00 00 00 00 00
[h264 @ 0xeeb1d0]AVC: Consumed only 11887 bytes instead of 11892
b6 b5 ae 65 ef ca ab 8b be 08 c5 ef 6c  00 00 00 00 00 00
[h264 @ 0xeeb1d0]AVC: Consumed only 49841 bytes instead of 49844
df 05 82 f1 5c be 5e 76 0b 76 28 c9 f0  00 00 00 00
[h264 @ 0xeeb1d0]AVC: Consumed only 14621 bytes instead of 14628
2b 7f 16 25 bd 6b a4 c2 6f 5d f9 05 bf  00 00 00 00 00 00 00 00
[h264 @ 0xeeb1d0]AVC: Consumed only 55359 bytes instead of 55364
a1 58 42 30 20 43 fa d7 6e 7e a9 ca 70  00 00 00 00 00 00
[h264 @ 0xeeb1d0]AVC: Consumed only 15117 bytes instead of 15124
2e ba d5 55 57 04 43 eb 7e 08 d5 55 f6  00 00 00 00 00 00 00 00
[h264 @ 0xeeb1d0]AVC: Consumed only 70638 bytes instead of 70644
84 48 01 e5 80 01 08 c5 0b 35 14 2c e0  00 00 00 00 00 00 00
[h264 @ 0xeeb1d0]AVC: Consumed only 37751 bytes instead of 37756
14 0e 77 af 3e 9b 0b c5 0c 53 aa 6b 16  00 00 00 00 00 00
[h264 @ 0xeeb1d0]AVC: Consumed only 71752 bytes instead of 71756
28 21 33 93 a6 d5 56 a2 7d 33 fe 38 cc  00 00 00 00 00
[h264 @ 0xeeb1d0]AVC: Consumed only 38488 bytes instead of 38492
97 36 ee eb 5e 0b 14 fd 6b 27 93 c5 80  00 00 00 00 00
[h264 @ 0xeeb1d0]AVC: Consumed only 14670 bytes instead of 14676
ac 57 82 80 91 41 9f 8a 03 3d ef 2d eb  00 00 00 00 00 00 00
[h264 @ 0xeeb1d0]AVC: Consumed only 54029 bytes instead of 54036
15 84 52 a9 bc 89 f2 f1 75 27 ca 8e a0  00 00 00 00 00 00 00 00
[h264 @ 0xeeb1d0]AVC: Consumed only 14087 bytes instead of 14092
04 68 a3 14 c5 18 a7 dc 13 07 ef e9 f6  00 00 00 00 00 00
[h264 @ 0xeeb1d0]AVC: Consumed only 69630 bytes instead of 69636
02 ea fb 9e f2 c3 6c 53 27 98 e3 05 13  00 00 00 00 00 00 00
[h264 @ 0xeeb1d0]AVC: Consumed only 37533 bytes instead of 37540
bf 54 cd f2 7e 6e 0a de 92 ee 2e ab c3  00 00 00 00 00 00 00 00
[h264 @ 0xeeb1d0]AVC: Consumed only 403990 bytes instead of 403996
00 01 4e 7d 92 d9 5f 42 d8 c4 01 20 e0  00 00 00 00 00 00 00
[h264 @ 0xeeb1d0]AVC: Consumed only 32904 bytes instead of 32908
f7 db 82 45 ef ee 0a 16 ed ad bb 7d 80  00 00 00 00 00
[h264 @ 0xeeb1d0]AVC: Consumed only 71048 bytes instead of 71052
29 20 a0 9b 4f 4d 6a 2b 51 5a 6e 9b cb  00 00 00 00 00
[h264 @ 0xeeb1d0]AVC: Consumed only 28295 bytes instead of 28300
91 97 a2 95 47 28 95 ae 08 d7 7c c2 c0  00 00 00 00 00 00
[h264 @ 0xeeb1d0]AVC: Consumed only 18997 bytes instead of 19004
c1 42 7f 3f bb bb bf 16 33 6a da d6 b0  00 00 00 00 00 00 00 00
[h264 @ 0xeeb1d0]AVC: Consumed only 60005 bytes instead of 60012
dc ca e1 d0 f0 51 d5 6f a7 4f 7b e6 c0  00 00 00 00 00 00 00 00
[h264 @ 0xeeb1d0]AVC: Consumed only 15885 bytes instead of 15892
6b 5c cd 6b 82 45 5d 5e b8 97 5a aa ac  00 00 00 00 00 00 00 00
[h264 @ 0xeeb1d0]AVC: Consumed only 13000 bytes instead of 13004
df 84 04 ae aa ab 7b d0 24 60 8d ad 6b  00 00 00 00 00
[h264 @ 0xeeb1d0]AVC: Consumed only 64921 bytes instead of 64924
1d b0 52 ec 8b ae 2b e5 e5 b6 f2 db e0  00 00 00 00
[h264 @ 0xeeb1d0]AVC: Consumed only 29345 bytes instead of 29348
ef fb de f6 ed e3 06 e9 3f 8a e2 b7 be  00 00 00 00
[h264 @ 0xeeb1d0]AVC: Consumed only 66997 bytes instead of 67004
ee 58 06 71 e2 80 67 1e ed db 65 45 50  00 00 00 00 00 00 00 00
[h264 @ 0xeeb1d0]AVC: Consumed only 34509 bytes instead of 34516
f2 27 e6 b5 b9 a0 5e 34 24 11 dd 6b 80  00 00 00 00 00 00 00 00
[h264 @ 0xeeb1d0]AVC: Consumed only 58889 bytes instead of 58892
0a 08 f9 b1 7c dc b3 77 2c d3 a7 3b b0  00 00 00 00
[h264 @ 0xeeb1d0]AVC: Consumed only 14229 bytes instead of 14236
7b db 82 41 56 b1 fb 82 31 3b b7 2b ae  00 00 00 00 00 00 00 00
[h264 @ 0xeeb1d0]AVC: Consumed only 63877 bytes instead of 63884
03 c5 67 0f 2d 89 f3 83 cf f3 83 c9 60  00 00 00 00 00 00 00 00
[h264 @ 0xeeb1d0]AVC: Consumed only 33909 bytes instead of 33916
cb 5b 6b 05 6e aa 2e 2e 2e 2e af 77 30  00 00 00 00 00 00 00 00
[h264 @ 0xeeb1d0]AVC: Consumed only 12277 bytes instead of 12284
50 d6 b5 ad 71 62 ae fd 70 4c bf eb 2c  00 00 00 00 00 00 00 00
[h264 @ 0xeeb1d0]AVC: Consumed only 28341 bytes instead of 28348
20 7d 6a fc 5a 29 88 3c 53 2c d5 35 4e  00 00 00 00 00 00 00 00
[h264 @ 0xeeb1d0]AVC: Consumed only 76105 bytes instead of 76108
bc 5c e1 fc 15 88 e9 6a 9a a6 f2 ff 8c  00 00 00 00
[h264 @ 0xeeb1d0]AVC: Consumed only 32478 bytes instead of 32484
1f 71 63 4f e7 ea ba e2 d5 27 59 bd e0  00 00 00 00 00 00 00
[h264 @ 0xeeb1d0]AVC: Consumed only 378966 bytes instead of 378972
2c 1c 00 0f 38 05 81 01 68 0a 0f a7 e0  00 00 00 00 00 00 00
[h264 @ 0xeeb1d0]AVC: Consumed only 15029 bytes instead of 15036
dd 38 28 5e f7 bc ca e0 a1 7b eb 56 c0  00 00 00 00 00 00 00 00
[h264 @ 0xeeb1d0]AVC: Consumed only 59464 bytes instead of 59468
77 d4 14 08 5e 28 d4 d0 b1 8a 38 a3 b6  00 00 00 00 00
[h264 @ 0xeeb1d0]AVC: Consumed only 58221 bytes instead of 58228
e1 01 23 02 34 89 eb 37 8b c5 e6 f1 3f  00 00 00 00 00 00 00 00
[h264 @ 0xeeb1d0]AVC: Consumed only 56521 bytes instead of 56524
4e 14 11 a4 e9 d6 ae 2b b1 5b bb bd 60  00 00 00 00
[h264 @ 0xeeb1d0]AVC: Consumed only 66270 bytes instead of 66276
4b c2 50 54 23 b4 5b d4 56 db b6 ed ff  00 00 00 00 00 00 00

Index: libavcodec/h264.c
===================================================================
--- libavcodec/h264.c   (revision 17319)
+++ libavcodec/h264.c   (working copy)
@@ -7419,6 +7419,10 @@

         if (h->is_avc && (nalsize != consumed)){
             av_log(h->s.avctx, AV_LOG_ERROR, "AVC: Consumed only %d bytes
instead of %d\n", consumed, nalsize);
+#undef printf
+printf("%02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x 
",buf[buf_index+consumed-13],buf[buf_index+consumed-12],buf[buf_index+consumed
-11],buf[buf_index+consumed-10],buf[buf_index+consumed-9],buf[buf_index
+consumed-8],buf[buf_index+consumed-7],buf[buf_index+consumed-
6],buf[buf_index+consumed-5],buf[buf_index+consumed-4],buf[buf_index+consumed
-3],buf[buf_index+consumed-2],buf[buf_index+consumed-1]);
+for(int i=consumed;i<=nalsize;i++)printf("%02x ", buf[buf_index+i]);
+printf("\n");
             consumed= nalsize;
         }






More information about the ffmpeg-devel mailing list