如何分析这些h.264分组的二进制数据并组织一个h.264流来使用ffmpeg对它们进行解码



非常感谢您对以下问题的帮助:下面所附的h.264数据包是从解码器接收的,但我不确定细节,例如传输协议。我搜索了一些类似的主题,并阅读了作者Cipi等人关于该主题的分析文章。非常感谢。但是我仍然无法解析这些数据包的数据。所以我提出了这个问题,希望能得到一些帮助。我能够进行ffmpeg,我所做的第一次尝试是将这些数据包转储到tmp文件中,并使用av_open_inputfile打开它,但有时问题是找不到编解码器参数。所以我希望组织h264流并使用ffmpeg对其进行解码。那么如何呢?

Attached:2012-03-21 09:22:37.171 MScope[3006:18f03] received data: <000001ba 66dbf7a3 840100a3 dbfeffff 04354f8b 000001e0 00128c80 0729b6fd e8e1fffc 00000001 09300000 000001e0 00aa8c00 03fffffc 00000001 419a1840 c20837cb ecc1177e e7ead1fc db167e27 a150bf97 dc4736f8 ce12d81f 42fc65ff 607a1f62 89e4f431 5ddfae4f 40fc2bec 5d096c7f 89e6bf0a f27b1077 93d03087 11ebacfc 39e86b1c 27ff2756 97bec73f 37a02370 d7b14b40 7d163f89 d0bd39f9 eb8b1fde 188cefa1 425c97ef 936b5cf5 b1fe7eb1 45f0e638 17382919 1f0c932f f0deab3a ed7ffcbd 3f929f09 735f939f 2e8be16e 7ad01ce3 3e1dbcb0>
2012-03-21 09:22:37.171 MScope[3006:18f03] 220
2012-03-21 09:22:37.202 MScope[3006:18f03] received data: <000001c0 005a8c80 0729b6fd ebcdfffc 1c416a02 d447004f ff16c1bc 2a0eb902 4c185085 04e660cb 3595856a 3eccb10a 761db750 3fb0171e 1c382a62 cf9ff10a ff37e750 55c16fad 22c1933f 03f00878 73521346 4c748898 9d9859a0 a573ada3>
2012-03-21 09:22:37.202 MScope[3006:18f03] 96
2012-03-21 09:22:37.211 MScope[3006:18f03] received data: <000001ba 66dbfc14 040100a3 dbfeffff 04354f8c 000001e0 00128c80 0729b6ff 0501fffc 00000001 09300000 000001e0 00e28c00 03fffffc 00000001 419a1880 c40833d5 a2f9bdfc bde3fac5 08f7ee33 ab447119 07fec5e5 d9fe5b17 0a704b8d 177de307 d7c64c4a cfb5a158 687c2bc4 ec5f327e e85c1872 502e4eef cdcb60df 1363a6e5 df2f27b9 386f746f 2c644bd2 a2c4f7b0 7ae6df7c bd8a4eec ff977df0 e6c0b58f 0b8ff0a7 2f7ae08f b3f4672d ecbe4f75 c37d8ebe 83e6e6bf f7ecc673 76055c57 998beb9b 6079797b c670e740 f87a2ff1 bec150b4 bb04df59 44a718ff 86265adf a12e07da 7ffe5e87 f268058a eac44f27 bf9281f3 f2f6389e b57cda2f d5a4e1cb fd6457f8 fe4d9e7e 6d82cbde f9e00000>
2012-03-21 09:22:37.212 MScope[3006:18f03] 276
2012-03-21 09:22:37.242 MScope[3006:17f03] received data: <000001c0 005a8c80 0729b6ff 07edfffc a83864c2 4e7d4e20 8ae819c6 03724270 7e5730d9 6648f9c8 b2e966d7 bc814c21 06306342 3c05ffe3 5840fcc2 2d2ae65b 1f231694 c8c8b7a2 0ad5080a 4fc3452d 332e9a30 1a3af1e0 b970ad62 a76927c4>
2012-03-21 09:22:37.242 MScope[3006:17f03] 96
2012-03-21 09:22:37.251 MScope[3006:18f03] received data: <000001ba 66dbfc84 840100a3 dbfeffff 04354f8d 000001e0 00128c80 0729b6ff 2121fffc 00000001 09300000 000001e0 00fa8c00 03fffffc 00000001 419a18c0 c608d7ff ffffffff e5f27fd5 5a2aa5f7 3556292a 6e945f5e 967c4757 89efd097 5e847847 d88545e8 7f97b053 75e8ee3b d02a03ec 5f825ec1 a07d80ab e5d0b0a7 7a02fdd8 b88e4d0b 35e2b928 7dc6785b 5c57a176 2158a9b9 ba17c9d0 a5ef61e2 7bdf1379 fac52f0b 7760f4eb 28dffe17 f761f5d8 be2388d1 ecf89eef c9c2f616 80ba12fd 963fbd1d 35797872 c541a025 c547f11d ec1e7e1b a7d7d9d9 cfc27b17 d88dcb7e 23bbf5c1 2632507c abaf572f 7ae4bf24 9579facb e18bd2c6 c2c3ced9 df10fff0 dfa3604b b1fd70d6 c0f5b2fc 56feaf11 d5af86f7 d765f372 76296f17 cf59c4e4 19f0b736 81632000>
2012-03-21 09:22:37.251 MScope[3006:18f03] 300
2012-03-21 09:22:37.282 MScope[3006:17f03] received data: <000001c0 005a8c80 0729b6ff 240dfffc 2e403ec4 2c07bc91 dea5816a fd1335b9 807cd133 4d0a12ac 876514ce 3883236b c0c17c9f 2b93ff26 d83827cc d30bf10a ca0262f5 09cad6ff 81fc2949 90de1ba6 11d98d2a 8dd5e80a e952f45e a4a0e711>
2012-03-21 09:22:37.282 MScope[3006:17f03] 96
2012-03-21 09:22:37.293 MScope[3006:17f03] received data: <000001ba 66dbfcf5 040100a3 dbfeffff 04354f8e 000001bc 0052f5ff 0024400e 484b0001 0c3aa503 2000ffff ffff4112 484b0000 00000000 00000000 00000000 00000024 1be00010 420e0000 60000160 0120111f ff001c20 92c0000c 430a0050 ff00fa03 00fa03ff 7c67884a 000001e0 00128c80 0729b6ff 3d41fffc 00000001 09100000 000001e0 001e8c00 03fffffc 00000001 6742800d 888b40b0 4b420000 0e100002 bf200800 000001e0 000e8c00 03fffffc 00000001 68ce3880 000001e0 253e8c00 03fffffc 00000001 65888008 0002e1f0 87e3e160 001021a1 e0002079 f5eaabd1 80def5ad ec1bc438 f10f7bbc 40904989 1c78adee f726e7dd a4dcfbbc 9b93bcf9 fff870a4 43cb65ed e5f97aff 08c7f510 3ce7c6de 3c3f72b2 f76f9cd1 fe3c3ff5 7103e5e7 3ebd7aae fdffffd4 5d6aafb7 d576f1f0 ffb8ac43 e99cf6f6 fd755d42 d84e2239 fff2c357 bd6b08e0 016317b0 91a8eb7a 18bec15f be000e13 b8cd2ed1 88a11360 250fd11b aa269986 2dffe034 9de244ca 1f4a2bf6 a03404c2 8aebc2cd bb012c7b 08cf5936 cd290fff 01a6ed52 fce1b482 ff6a58f7 3019ed40 4fabc400 0080b59a 5045138e 2394b709 5cfb905d 17771f4c ed199f0e 400021c6 6a934a0d edfbe012 5cb14bf0 06288cd2 dff7fe01 c3800877 0249cb92 6ca17482 1ffb02b8 bf314562 1e93d5e9 0226b833 bbeef4b9 c0e0409d c66977d8 8a1136f7 087e88dd 43e99852 4dfff684 ef122650 fa4105fe d8078128 a2a01b3a 229f9738 089c4a96 c49b5305 822612c5 b2529a5f f61144e3 88e52587 87f9f7a0 5d1f05d2 6cc4327f 7c3c30ff 0ef6b1ee 272da862 4f578092 c2eff5d9 67901b5a 3d40370a d561de23 7d7fd7fb e3168a50 5ebbca21 092c7800 1b046172 c0070995 3a84bd87 512fdfbc 62f18a0b b79742b1 86f863d1 0ae997ed 8bffff0d 0940abf5 30ea6ade 6f18b652 82f4de63 95e4ecb8 6c0001bb 419926c6 b00fb1f9 89849d59 bffaffd1 f1e11806 0170158f 6119ab7d b34a41bf fed0ddaa 5f9436b8 b7fed6b1 ee6023da 81e64f57 88001000 40213204 09d46693 7d88a3ac 5ee10fd3 0ba87d2b 0a49bffe b1a80854 dea31059 bb56201f a2351d89 c59ffeff 6c01711a a4d282e3 beff7de1 778a5f80 2484fa95 4e4d83cb 8f1034cb 96340f64 7f64d8a8 b7ad9651 712ec6b1 67ffbfd0 4ba7f00f 0fdcb540 05717065 7b5465b4 25e60c01 c7e2b86d a8ca7269 e00a1eaa ca98c1ef 60c6f885 ab1113ff d3afe21e aac1b2b2 dc9d7ffc 534cf3e6 3f15c36d 5653938f 000f0361 2ab4deb7 5b097f7e 7a000240 6b40cf05 de43d558 3655e5b9 3af19674 020bd93a 4dbba3b7 ef8d8895 5b87c403 805f913a 8cb26fb1 147589dc 21fa6175 0fa56149 2fffda13 bc49b285 d20827f6 c0783510 4402e744 51f2ed09 de24d942 eb887fec 0ae2f4ce 7310549e af481328 c3b79eff 0b9c0dd8 4e2618ee 5258785f 9f7a0ba2 e1f5f657 3277c648 23245c04 c83a92c4 9b530782 641d4962 4da9bf5b f807e10d c04ccc9c 62307fac 29a60001 8046932c 09820010 51505e80 01d0f556 54c60b7b 4513e216 a8446fff 4fefada2 412adcc3 956f1951 e7000081 c300014d 9121bf46 9d67e440 007022cf 9d8c0008 1452e998 1a47867e c2d45b16 f3626bf8 43e01b87 58003509 94764dbf 3e907092 79ae081d 31c4bb46 69e737dd 8b1ea663 9f9045bc d5e02801 616c9ba6 714f53f1 bfffa004 d05e5a18 d35d4600 01b0451b 2c0ac2f8 ec731444 9eaf61c0 3c21df00 041bba2e 4d9c2cd5 8d647806 001c191a f217aac8 bf6ebf26 0661e728 b3ad2c70 d6b801d0 8ab2d607 7567a0dc 18545ea1 3a9c24d3 ef3480d0 859e766e d89b7002 87ea32be cbc01e38 3b8904b6 85c20ab7 ea331800 20068064 9801f63f 3131a396 37dd84c0 e83aa118 6505d9e6 b2607710 7562f167 abd80098 e2ae6dc9 63acb7ff bcb00043 d2949eb4 2d059ff7 c806010f 0c2fa6c1 a946df28 843a4f7f fc068119 f17063a7 f9e96bac 960c44ce 2350b376 bc896424 4f57a775 00617aac 1f6eb2dc 8c683dac 8c82e729 887376b8 b436405c 9add43ae 1ede44b2 1227efd3 abf8059b 0474de09 7774ad25 8131c45d 5b16ba99 7ffbc1ab cc000300 8d2e5bf0 f8618760 c002c4ca 9c33af62 d2fadf80 0110fd46 55d97ec8 bea68d21 b7565455 e9c31aa0 65af0015 2d3ce021 456810b2 51944db3 fddeee9b 8b54196e 65fb65dc 07e38601 c001f1e8 632947b5 69082fff d81bb54f 9425b896 bfed6b1e a6066ad0 34a9eaf1 80008004 90527a04 09d44593 3d88a32c 4ee10fd3 1d482d2b 08497ffe f45f288b dbbe3dc9 154f31e8 8ea9afda 2a8200b8 8b47d287 c77bfefb 82ef15fe 0107f295 461ff1ad 4b09b3ee 64c26788 e3918de0 bbc57f80 41bca551 87fc3186 3d4b77f2 e977ff80 601c3db8 5e1d8e62 8893d5e0 521e8773 9ca729ea f000593b c49b28f6 e737f605 717a6739 88729eaf 48132883 b79deecb 9c49a8e0 263b1c86 3a0ea702 613d686a d07510d3 221e6870 1320a84a bcda983c 4120aa4b 126d4ccb 35da8dfc badfff00 c02e02b1 e8632945 b569082f ffde63d1 1d5375da 2fc1a811 ca4001f5 183f6d77 087e98ea 41695842 4bfff07b 70bc3b1c c5339eaf 0290f42b 9ce517cf 57acc838 37e1b78e dbec6594 e851312a 4cbffde3 0cd065f4 b38098ec 7208b41d 4e04c27a 50b6a0ea c4d03ff4 b7f0e002 1d4002c9 de24d947 b739bfb0 2b8bf239 ccc2f9ea f4813288 3b79deec b9c2d600 813a88b7 cf6228cb 3f7087e9 8ea41695 8424bfff 684ef34d 942eb9cf fdb01e09 441101f1 a7ffc5ce 02641509 579b5305 82641d89 54fa6972 f246c273 20677212 a342fcfb d0be5c3e b6c8e64e eb9f8e9a 5ba3b0c3 ffc39469 702e5d36 7d68ec13 e9537ffd 6a12c196 85fd7eb5 f7ffff7d f5f76d55 bffffeeb aad5557a ac2d80d7 6472c7ff 65eaf7ad 65e4ce44 4e6fd87c 03feb6a4 b07ee538 03678a66 d3c2adda 560ef825 919bd03f 6150cc6c a8b3f229 3d8e032c 6aa5fcc3 182ce001 00e18006 a7ec5187 6a65f6d2 7cf0fd38 4c3c81b9 a203cd47 dc5ef2cf b76badc4 e1b70631 5427809e 70add3da 573a5f08 b596b08e ae9ad931 6165c21f 99813f89 af0b609c 2990c1be 21ffaaac 1afd1715 34f05304 e13c0377 53d3ff8b e373bacf 1763b1b8 4f01d3f2 e2d47c6d f4338259 f6bb7615 71508fa3 b1560108 61fea0b7 c32c87f7 b8754cc9 5ae6b0ed 3322ac3c 21ff55fc 9c0ebf07 cd31ba9d 73778a3a 641b29d1 aa27c103 1a51fa81 4cd09e53 b47dbed9 f7fc6334 27b097d2 aeb4886b fc14c3b2 84f1e69d 2319adfa e32e33fe 3540c8a1 3c8ce75b fe0cd2de 7e67c0e9 77387d78 7ffea2c2 255307be cf9d5791 8ae3e1ff 797d34cb cbe6b6e5 545f01ff fd78a6f5 8baaa88f 52fc5582 e921ffff bd5755cd d7955c21 f080807e bd570ed1 a9c00080 de46a1a8 3c952d1c bf5dbffe 018075d5 753662b5 16773057 1f20ef34 2e9a7b65 dffe01f0 415860ce 9ea028b4 5e696823 9b3ffef2 c3e001f0 8781f698 5d0ca532 ca4669f6 45b68cac 8c879acf 58047991 d83bf4d3 eb460597 0dd82063 4ad7f00f ffeba517 7aaae76a 8b9daad4 b4135aa5 33972b8c ff77f01a 2196a9f7 a13c0084 c4b72067 ee45d6dd 84ece8ab 20896587 7a29684d 34fdcfb5 b45572c3 a3596756 3fffea01 d6ee1470 73f23c40 414c7976 28f9af2f 8b8310df d9096e32 d0c25dfc 7ffb9061 3a4119f9 66583fd4 a57b5ad0 2faad4b4 388db69e e6231fff f5870306 d68bc10d 7884883a 3774d25f f4c1dc83 d96881aa 6bdff0ff acd5e94f a3ac1c70 4f731594 e4419a7e 4a9d019b ffff960e b7a656aa f4c52994 d67e3047 8963414c 2a1b4234 fab9bb44 6bdfc3ff 8631dbc6 90439720 b987ffff eb2bfac7 9eb16412 3ffffcd5 5d5557a7 37ffff75 55d5757a a7ac38a7 ab091476 c0210843 0f99901d 8ed04273 fd6ee0a6 10d35a20 abaf126b 63df37b3 36ce3462 7379aad9 6efbf4ff fe001f8e 8657d1df 8d8eadf8 7951d85a a8dcb6d7 b9203b51 9ddea6e1 6296ba69 b9d8937a 2e4b15c5 d9f957a7 1f100fff d70e7890 0677c46a 2315fa73 41f538a8 7fb251ef e0e4c3d1 563c5a98 eb328853 30607ef4 3f81fd72 1e6ae3bf fff85ebd 00cd260e ea58a46f 9320d59a 4cc60a32 2e5e27f5 63080d95 9e843194 1fffebff>

这是标准的h.264流,没有碎片NAL单元。NAL单元以三个字节0x00000001开始,并且检测到NAL单元类型:0000000 1 09:访问单元分隔符,解码不需要以下数据0000000 1 41:跟在IDR帧之后的编码切片.P或B帧;0000000 1 67和0000000 1 68:SPS和PPS,h.264的配置信息。0000000 1 65:IDR帧

由于这些数据包的标头未定义,首先我对处理溪流。使用ffmpeg,我从IDR帧开始提取这些NAL单元,接着是切片帧数据,并成功地将它们解码为AVFrame数据。

相关内容

  • 没有找到相关文章

最新更新