爱奇艺Widevine要注意的问题

Posted by

目前只知道《如果爱,重来》第24集使用了widevine加密。
dash接口得到的数据大概是这样:

{
	"payload": {
		"wm_a": {
			"audio_track1": {
				"clear_duration_seconds": "0",
				"codec": "mp4a.40.2",
				"codec_init": "AAAAIGZ0eXBpc29tAAAAAGlzbzhtcDQxZGFzaGNtZmMAAAX6bW9vdgAAAGxtdmhkAAAAANmQAqPZkAKjAACsRAAAAAAAAQAAAQAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgAAAI1tZXRhAAAAAAAAACBoZGxyAAAAAAAAAABJRDMyAAAAAAAAAAAAAAAAAAAAYUlEMzIAAAAAFcdJRDMEAAAAAABJUFJJVgAAAD8AAGh0dHBzOi8vZ2l0aHViLmNvbS9nb29nbGUvc2hha2EtcGFja2FnZXIAdjIuMi4xLTM1NDExNjYtcmVsZWFzZQAAAj10cmFrAAAAXHRraGQAAAAH2ZACo9mQAqMAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAEAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAHZbWRpYQAAACBtZGhkAAAAANmQAqPZkAKjAACsRAAAAABVxAAAAAAALWhkbHIAAAAAAAAAAHNvdW4AAAAAAAAAAAAAAABTb3VuZEhhbmRsZXIAAAABhG1pbmYAAAAkZGluZgAAABxkcmVmAAAAAAAAAAEAAAAMdXJsIAAAAAEAAAFIc3RibAAAAPxzdHNkAAAAAAAAAAIAAACeZW5jYQAAAAAAAAABAAAAAAAAAAAAAgAQAAAAAKxEAAAAAAAqZXNkcwAAAAADHAABAAQUQBUAAAAAAiFgAAHluAUFEhBW5QAGAQIAAABQc2luZgAAAAxmcm1hbXA0YQAAABRzY2htAAAAAGNlbmMAAQAAAAAAKHNjaGkAAAAgdGVuYwAAAAAAAAEIA9YgoJxv5xZHjA7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wOxke1yQASEAPWIKCcb+cWR4wOxke1yQJI49yVmwY=",
				"duration_second": "3421",
				"encryption_scheme": "cenc",
				"files": [{
					"duration_second": 3421.809,
					"file_name": "http://data.video.iqiyi.com/videos/v0/20190827/b4/6f/60a330ebc5727f33d6ec51f33870aa09.m4s?ve=0&qd_tvid=2321445000",
					"format": "m4s",
					"seekable": {
						"pos": [0, 125196, 254058, 382204, 511519, 639538, 769191, 898346, 1027034, 1154698, 1282693, 1410897, 1539354, 1667941, 1796625, 1922963, 2051588, 2181622, 2311425, 2441926, 2571015, 2700791, 2829466, 2959990, 3086782, 3216979, 3344416, 3473293, 3602881, 3733256, 3863737, 3993586, 4123237, 4252922, 4383153, 4512480, 4643067, 4771747, 4900555, 5030030, 5159358, 5287986, 5417372, 5545354, 5674137, 5803770, 5933944, 6063057, 6192484, 6321024, 6449414, 6577868, 6707500, 6837022, 6966486, 7095493, 7223484, 7352085, 7478940, 7605959, 7732848, 7860612, 7988151, 8115511, 8242106, 8372510, 8502586, 8631838, 8761969, 8890107, 9019630, 9147947, 9277855, 9406592, 9535629, 9665456, 9795363, 9925184, 10054654, 10182952, 10311885, 10441181, 10569209, 10697983, 10826582, 10954945, 11083238, 11212300, 11339407, 11468094, 11596393, 11724937, 11853167, 11982161, 12110610, 12238784, 12366636, 12494897, 12622849, 12750667, 12880965, 13010270, 13138937, 13266568, 13393530, 13525040, 13653636, 13781235, 13907823, 14035995, 14165563, 14293657, 14422074, 14549811, 14677811, 14806243, 14934933, 15063415, 15191372, 15321065, 15449670, 15578652, 15706488, 15834908, 15963535, 16092779, 16221684, 16351104, 16479459, 16608046, 16736513, 16866652, 16994412, 17122688, 17251144, 17379661, 17507956, 17636052, 17764879, 17893533, 18023276, 18151960, 18280779, 18409043, 18537727, 18666290, 18794549, 18923248, 19052225, 19180795, 19308150, 19437739, 19566535, 19695706, 19823850, 19951985, 20079878, 20208367, 20336514, 20465027, 20593839, 20722124, 20850242, 20978541, 21107132, 21235681, 21364257, 21492797, 21622057, 21750579, 21878888, 22006875, 22135776, 22263497, 22392632, 22521674, 22650161, 22778451, 22906305, 23035667, 23163123, 23292111, 23420054, 23549036, 23677475, 23806560, 23935415, 24064620, 24193762, 24323384, 24452699, 24581761, 24710016, 24839347, 24968604, 25097660, 25227060, 25355089, 25483958, 25613114, 25742602, 25870251, 25998142, 26126034, 26254659, 26383087, 26513501, 26642438, 26771277, 26900613, 27029498, 27158615, 27287320, 27416981, 27546586, 27676784, 27807161, 27938627, 28069083, 28198303, 28326763, 28455392, 28583955, 28712056, 28840292, 28968717, 29097125, 29225372, 29353683, 29481844, 29610526, 29739136, 29867638, 29995870, 30124792, 30252805, 30381834, 30509354, 30637824, 30766065, 30894392, 31022829, 31151017, 31279569, 31407817, 31538054, 31667318, 31796962, 31926496, 32055694, 32184479, 32313690, 32442051, 32571574, 32699701, 32828895, 32957092, 33086214, 33215596, 33344454, 33474294, 33604324, 33734112, 33864012, 33994219, 34123407, 34252788, 34383259, 34512866, 34641965, 34773375, 34901393, 35031230, 35159641, 35287965, 35415999, 35542519, 35671162, 35799905, 35927717, 36056792, 36187047, 36315756, 36444472, 36572889, 36701340, 36829339, 36957457, 37085542, 37214202, 37343327, 37471882, 37600495, 37728527, 37856862, 37984641, 38113092, 38241031, 38369502, 38497467, 38625586, 38753336, 38881714, 39009742, 39138019, 39266071, 39394361, 39523138, 39651061, 39779868, 39908506, 40037193, 40165130, 40293595, 40421596, 40549121, 40676138, 40804186, 40931970, 41060262, 41188595, 41317399, 41445857, 41573681, 41701771, 41829843, 41958346, 42086366, 42214856, 42342768, 42471093, 42598989, 42727398, 42855250, 42983352, 43111586, 43240581, 43368544, 43491581, 43628905, 43763392, 43896103, 44025224, 44153675, 44282405, 44411377, 44540653, 44670142, 44798425, 44927618, 45056269, 45185200, 45313529, 45442086, 45570055, 45697252, 45825012, 45953146, 46081659, 46210128, 46339341, 46469169, 46596998, 46723962, 46854350, 46983804, 47112647, 47241758, 47372073, 47503183, 47633762, 47764999, 47893757, 48021750, 48150644, 48280186, 48409909, 48539005, 48666579, 48795129, 48924266, 49053790, 49183516, 49312799, 49441203, 49570911, 49703738, 49835720, 49965020, 50093994, 50223688, 50353828, 50482541, 50610554, 50739844, 50867155, 50995752, 51124246, 51252807, 51381401, 51509862, 51638515, 51765060, 51892060, 52018648, 52145653, 52272007, 52399302, 52526596, 52653350, 52781055, 52908680, 53036069, 53163660, 53291127, 53418855, 53545153, 53673816, 53804357, 53933861, 54063791, 54192293, 54321035, 54449378, 54578047, 54706415, 54834951, 54963502],
						"time": [0.0, 8.011, 16.022, 24.01, 32.021, 40.009, 48.02, 56.008, 64.019, 72.007, 80.018, 88.006, 96.017, 104.005, 112.016, 120.004, 128.015, 136.026, 144.014, 152.025, 160.013, 168.024, 176.012, 184.023, 192.011, 200.022, 208.01, 216.021, 224.009, 232.02, 240.008, 248.019, 256.007, 264.018, 272.029, 280.017, 288.028, 296.016, 304.027, 312.015, 320.026, 328.014, 336.025, 344.013, 352.024, 360.012, 368.023, 376.011, 384.022, 392.033, 400.021, 408.032, 416.02, 424.031, 432.019, 440.03, 448.018, 456.029, 464.017, 472.028, 480.016, 488.027, 496.015, 504.026, 512.014, 520.025, 528.036, 536.024, 544.035, 552.023, 560.034, 568.022, 576.033, 584.021, 592.032, 600.02, 608.031, 616.019, 624.03, 632.018, 640.029, 648.04, 656.028, 664.039, 672.027, 680.038, 688.026, 696.037, 704.025, 712.036, 720.024, 728.035, 736.023, 744.034, 752.022, 760.033, 768.021, 776.032, 784.043, 792.031, 800.042, 808.03, 816.041, 824.029, 832.04, 840.028, 848.039, 856.027, 864.038, 872.026, 880.037, 888.025, 896.036, 904.047, 912.035, 920.046, 928.034, 936.045, 944.033, 952.044, 960.032, 968.043, 976.031, 984.042, 992.03, 1000.041, 1008.029, 1016.04, 1024.028, 1032.039, 1040.05, 1048.038, 1056.049, 1064.037, 1072.048, 1080.036, 1088.047, 1096.035, 1104.046, 1112.034, 1120.045, 1128.033, 1136.044, 1144.032, 1152.043, 1160.054, 1168.042, 1176.053, 1184.041, 1192.052, 1200.04, 1208.051, 1216.039, 1224.05, 1232.038, 1240.049, 1248.037, 1256.048, 1264.036, 1272.047, 1280.035, 1288.046, 1296.057, 1304.045, 1312.056, 1320.044, 1328.055, 1336.043, 1344.054, 1352.042, 1360.053, 1368.041, 1376.052, 1384.04, 1392.051, 1400.039, 1408.05, 1416.061, 1424.049, 1432.06, 1440.048, 1448.059, 1456.047, 1464.058, 1472.046, 1480.057, 1488.045, 1496.056, 1504.044, 1512.055, 1520.043, 1528.054, 1536.042, 1544.053, 1552.064, 1560.052, 1568.063, 1576.051, 1584.062, 1592.05, 1600.061, 1608.049, 1616.06, 1624.048, 1632.059, 1640.047, 1648.058, 1656.046, 1664.057, 1672.068, 1680.056, 1688.067, 1696.055, 1704.066, 1712.054, 1720.065, 1728.053, 1736.064, 1744.052, 1752.063, 1760.051, 1768.062, 1776.05, 1784.061, 1792.049, 1800.06, 1808.071, 1816.059, 1824.07, 1832.058, 1840.069, 1848.057, 1856.068, 1864.056, 1872.067, 1880.055, 1888.066, 1896.054, 1904.065, 1912.053, 1920.064, 1928.075, 1936.063, 1944.074, 1952.062, 1960.073, 1968.061, 1976.072, 1984.06, 1992.071, 2000.059, 2008.07, 2016.058, 2024.069, 2032.057, 2040.068, 2048.056, 2056.067, 2064.078, 2072.066, 2080.077, 2088.065, 2096.076, 2104.064, 2112.075, 2120.063, 2128.074, 2136.062, 2144.073, 2152.061, 2160.072, 2168.06, 2176.071, 2184.082, 2192.07, 2200.081, 2208.069, 2216.08, 2224.068, 2232.079, 2240.067, 2248.078, 2256.066, 2264.077, 2272.065, 2280.076, 2288.064, 2296.075, 2304.063, 2312.074, 2320.085, 2328.073, 2336.084, 2344.072, 2352.083, 2360.071, 2368.082, 2376.07, 2384.081, 2392.069, 2400.08, 2408.068, 2416.079, 2424.067, 2432.078, 2440.089, 2448.077, 2456.088, 2464.076, 2472.087, 2480.075, 2488.086, 2496.074, 2504.085, 2512.073, 2520.084, 2528.072, 2536.083, 2544.071, 2552.082, 2560.07, 2568.081, 2576.092, 2584.08, 2592.091, 2600.079, 2608.09, 2616.078, 2624.089, 2632.077, 2640.088, 2648.076, 2656.087, 2664.075, 2672.086, 2680.074, 2688.085, 2696.096, 2704.084, 2712.095, 2720.083, 2728.094, 2736.082, 2744.093, 2752.081, 2760.092, 2768.08, 2776.091, 2784.079, 2792.09, 2800.078, 2808.089, 2816.077, 2824.088, 2832.099, 2840.087, 2848.098, 2856.086, 2864.097, 2872.085, 2880.096, 2888.084, 2896.095, 2904.083, 2912.094, 2920.082, 2928.093, 2936.081, 2944.092, 2952.103, 2960.091, 2968.102, 2976.09, 2984.101, 2992.089, 3000.1, 3008.088, 3016.099, 3024.087, 3032.098, 3040.086, 3048.097, 3056.085, 3064.096, 3072.084, 3080.095, 3088.106, 3096.094, 3104.105, 3112.093, 3120.104, 3128.092, 3136.103, 3144.091, 3152.102, 3160.09, 3168.101, 3176.089, 3184.1, 3192.088, 3200.099, 3208.11, 3216.098, 3224.109, 3232.097, 3240.108, 3248.096, 3256.107, 3264.095, 3272.106, 3280.094, 3288.105, 3296.093, 3304.104, 3312.092, 3320.103, 3328.091, 3336.102, 3344.113, 3352.101, 3360.112, 3368.1, 3376.111, 3384.099, 3392.11, 3400.098, 3408.109, 3416.097]
					},
					"size": 55050251,
					"start_second": 0.0
				}],
				"key_id": "03d620a09c6fe716478c0ec647b5c900",
				"type": ["audio"]
			},
			"video_track1": {
				"clear_duration_seconds": "0",
				"codec": "avc1.640028",
				"codec_init": "AAAAJGZ0eXBpc29tAAAAAGlzbzhtcDQxZGFzaGF2YzFjbWZjAAAGmm1vb3YAAABsbXZoZAAAAADZkAKj2ZACowAAYagAAAAAAAEAAAEAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIAAACNbWV0YQAAAAAAAAAgaGRscgAAAAAA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AAAQAAAAAAAAAAAAAAJGVkdHMAAAAcZWxzdAAAAAAAAAABAAAAAAAAB9AAAQAAAAAAOG12ZXgAAAAQbWVoZAAAAAAFGUCIAAAAIHRyZXgAAAAAAAAAAQAAAAEAAAPoAAAAAAAAAAAAAAI6cHNzaAEAAACaBPB5mEBChquS5lvgiF+VAAAAAQPWIKCcb+cWR4wOxke1yQIAAAIGBgIAAAEAAQD8ATwAVwBSAE0ASABFAEEARABFAFIAIAB4AG0AbABuAHMAPQAiAGgAdAB0AHAAOgAvAC8AcwBjAGgAZQBtAGEAcwAuAG0AaQBjAHIAbwBzAG8AZgB0AC4AYwBvAG0ALwBEAFIATQAvADIAMAAwADcALwAwADMALwBQAGwAYQB5AFIAZQBhAGQAeQBIAGUAYQBkAGUAcgAiACAAdgBlAHIAcwBpAG8AbgA9ACIANAAuADAALgAwAC4AMAAiAD4APABEAEEAVABBAD4APABQAFIATwBUAEUAQwBUAEkATgBGAE8APgA8AEsARQBZAEwARQBOAD4AMQA2ADwALwBLAEUAWQBMAEUATgA+ADwAQQBMAEcASQBEAD4AQQBFAFMAQwBUAFIAPAAvAEEATABHAEkARAA+ADwALwBQAFIATwBUAEUAQwBUAEkATgBGAE8APgA8AEsASQBEAD4AbwBDAEQAVwBBADIAKwBjAEYAdQBkAEgAagBBADcARwBSADcAWABKAEEAZwA9AD0APAAvAEsASQBEAD4APABDAEgARQBDAEsAUwBVAE0APgBWADUAcwBxAHMAeAB2AFUAaQA5AFEAPQA8AC8AQwBIAEUAQwBLAFMAVQBNAD4APAAvAEQAQQBUAEEAPgA8AC8AVwBSAE0ASABFAEEARABFAFIAPgAAAABKcHNzaAAAAADt74upedZKzqPIJ9zVHSHtAAAAKhIQA9YgoJxv5xZHjA7GR7XJABIQA9YgoJxv5xZHjA7GR7XJAkjj3JWbBg==",
				"duration_second": "3421",
				"encryption_scheme": "cenc",
				"files": [{
					"duration_second": 8.0,
					"file_name": "http://data.video.iqiyi.com/videos/v0/20190827/b4/6f/841e24466978dc6b5549734af3eba7ab.m4s?ve=0&qd_tvid=2321445000",
					"format": "m4s",
					"seekable": {
						"pos_end": 1953646,
						"pos_start": 0,
						"time_end": 8.0,
						"time_start": 0.0
					},
					"size": 1953646,
					"start_second": 0.0
				}, {
					"duration_second": 8.0,
					"file_name": "http://data.video.iqiyi.com/videos/v0/20190827/b4/6f/841e24466978dc6b5549734af3eba7ab.m4s?ve=0&qd_tvid=2321445000",
					"format": "m4s",
					"seekable": {
						"pos_end": 4000996,
						"pos_start": 1953646,
						"time_end": 16.0,
						"time_start": 8.0
					},
					"size": 2047350,
					"start_second": 8.0
				}, {
					"duration_second": 8.0,
					"file_name": "http://data.video.iqiyi.com/videos/v0/20190827/b4/6f/841e24466978dc6b5549734af3eba7ab.m4s?ve=0&qd_tvid=2321445000",
					"format": "m4s",
					"seekable": {
						"pos_end": 5367630,
						"pos_start": 4000996,
						"time_end": 24.0,
						"time_start": 16.0
					},
					"size": 1366634,
					"start_second": 16.0
				}, {
					"duration_second": 8.0,
					"file_name": "http://data.video.iqiyi.com/videos/v0/20190827/b4/6f/841e24466978dc6b5549734af3eba7ab.m4s?ve=0&qd_tvid=2321445000",
					"format": "m4s",
					"seekable": {
						"pos_end": 6655380,
						"pos_start": 5367630,
						"time_end": 32.0,
						"time_start": 24.0
					},
					"size": 1287750,
					"start_second": 24.0
				}, {
					"duration_second": 8.0,
					"file_name": "http://data.video.iqiyi.com/videos/v0/20190827/b4/6f/841e24466978dc6b5549734af3eba7ab.m4s?ve=0&qd_tvid=2321445000",
					"format": "m4s",
					"seekable": {
						"pos_end": 8213578,
						"pos_start": 6655380,
						"time_end": 40.0,
						"time_start": 32.0
					},
					"size": 1558198,
					"start_second": 32.0
				}, 
 
.............................................................
 
				{
					"duration_second": 5.64,
					"file_name": "http://data.video.iqiyi.com/videos/v0/20190827/80/ac/b9a2dbedce89da74d1f1d7a1cf87bc62.m4s?ve=0&qd_tvid=2321445000",
					"format": "m4s",
					"seekable": {
						"pos_end": 30611544,
						"pos_start": 30253197,
						"time_end": 109.64,
						"time_start": 104.0
					},
					"size": 358347,
					"start_second": 3416.0
				}],
				"key_id": "03d620a09c6fe716478c0ec647b5c902",
				"type": ["video"]
			}
		}
	},
	"version": 1,
	"watermark_group": ["wm_a"]
}

可以发现其中并没有我们熟悉的mpd文件,也没有init.mp4文件。需要自己构建mp4文件,而内容就是codec_init的内容。
代码实现如下:

import base64
data = b"AAAAJGZ0eXBpc29tAAAAAGlzbzhtcDQxZGFzaGF2YzFjbWZjAAAGmm1vb3YAAABsbXZoZAAAAADZkAKj2ZACowAAYagAAAAAAAEAAAEAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIAAACNbWV0YQAAAAAAAAAgaGRscgAAAAAAAAAASUQzMgAAAAAAAAAAAAAAAAAAAGFJRDMyAAAAABXHSUQzBAAAAAAASVBSSVYAAAA/AABodHRwczovL2dpdGh1Yi5jb20vZ29vZ2xlL3NoYWthLXBhY2thZ2VyAHYyLjIuMS0zNTQxMTY2LXJlbGVhc2UAAALddHJhawAAAFx0a2hkAAAAB9mQAqPZkAKjAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAQAAAAAeAAAAEOAAAAAACVW1kaWEAAAAgbWRoZAAAAADZkAKj2ZACowAAYagAAAAAVcQAAAAAAC1oZGxyAAAAAAAAAAB2aWRlAAAAAAAAAAAAAAAAVmlkZW9IYW5kbGVyAAAAAgBtaW5mAAAAJGRpbmYAAAAcZHJlZgAAAAAAAAABAAAADHVybCAAAAABAAABwHN0YmwAAAF0c3RzZAAAAAAAAAACAAAA2mVuY3YAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAHgAQ4AEgAAABIAAAAAAAAAAEKQVZDIENvZGluZwAAAAAAAAAAAAAAAAAAAAAAAAAAA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AEEATABHAEkARAA+ADwALwBQAFIATwBUAEUAQwBUAEkATgBGAE8APgA8AEsASQBEAD4AbwBDAEQAVwBBADIAKwBjAEYAdQBkAEgAagBBADcARwBSADcAWABKAEEAZwA9AD0APAAvAEsASQBEAD4APABDAEgARQBDAEsAUwBVAE0APgBWADUAcwBxAHMAeAB2AFUAaQA5AFEAPQA8AC8AQwBIAEUAQwBLAFMAVQBNAD4APAAvAEQAQQBUAEEAPgA8AC8AVwBSAE0ASABFAEEARABFAFIAPgAAAABKcHNzaAAAAADt74upedZKzqPIJ9zVHSHtAAAAKhIQA9YgoJxv5xZHjA7GR7XJABIQA9YgoJxv5xZHjA7GR7XJAkjj3JWbBg=="
with open("init.mp4", "wb+") as file:
    file.write(base64.b64decode(data))

4.5更新,《不完美的她》用的也是widevine(还以为会是marlinbbts…….),17集key如下:

1c9de4f131494437cc9d63774df00400:105d76c2f64410c3f28b958dc2c7e127
1c9de4f131494437cc9d63774df00402:8e0a84607949c266066b4e1e9b9ea7b2

4 comments

  1. 您好,我刚刚在研究优酷用cenc加密的视频,反调了下播放器js注意到好像key是用windvine下发的,m3u8倒是有,能下到init.mp4看到kid,之后就没有思路了。请问用windvine下发的key是不是没办法拦截?谢谢

  2. 4.5更新,《不完美的她》用的也是widevine(还以为会是marlinbbts…….),17集key如下:

    1c9de4f131494437cc9d63774df00400:105d76c2f64410c3f28b958dc2c7e127
    1c9de4f131494437cc9d63774df00402:8e0a84607949c266066b4e1e9b9ea7b2

    请问这里的key是怎么算出来?

Leave a Reply

电子邮件地址不会被公开。 必填项已用*标注