Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how to get the values ​​of the debug info video player parameters #8

Open
Bintangelfandri opened this issue Jun 19, 2023 · 0 comments

Comments

@Bintangelfandri
Copy link

Bintangelfandri commented Jun 19, 2023

import requests

url = "https://www.youtube.com/youtubei/v1/player?key=AIzaSyAO_FJ2SlqU8Q4STEHLGCilw_Y9_11qcW8"
headers = {
"Host": "www.youtube.com",
"Content-Type": "application/json",
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/105.0.0.0 Safari/537.36 Edg/105.0.1343.42",
"Accept": "/",
"Origin": "https://www.youtube.com",
"Referer": "https://www.youtube.com/",
"Accept-Encoding": "gzip, deflate",
"Accept-Language": "de,de-DE;q=0.9,en;q=0.8,en-GB;q=0.7,en-US;q=0.6"
}

data = {
"context": {
"client": {
"hl": "en",
"gl": "US",
"clientName": "WEB",
"clientVersion": "2.20220916.00.00",
"clientScreen": "WATCH",
"androidSdkVersion": 31
},
"thirdParty": {
"embedUrl": "https://www.youtube.com/"
}
},
"videoId": "yvyAQiiKIN8",
"playbackContext": {
"contentPlaybackContext": {
"signatureTimestamp": 19250
}
},
"racyCheckOk": True,
"contentCheckOk": True,

"videoDebugInfo": {
    "enableVideoStatsMonitor": True,
    "enableVideoPlayStatsMonitor": True
}

}

response = requests.post(url, json=data, headers=headers)
json_data = response.json()

I was looking for these values ​​in the response but couldn't find them, can you help me

{
"ns": "yt",
"el": "detailpage",
"cpn": "QYNyEzZ92lgFPcuY",
"ver": 2,
"cmt": "46849.276",
"fmt": "243",
"fs": "0",
"rt": "3544.515",
"euri": "",
"lact": 0,
"live": "dvr",
"cl": "540057686",
"mos": 1,
"state": "8",
"volume": 100,
"cbr": "Chrome",
"cbrver": "114.0.0.0",
"c": "WEB",
"cver": "2.20230615.02.01",
"cplayer": "UNIPLAYER",
"cos": "Windows",
"cosver": "10.0",
"cplatform": "DESKTOP",
"delay": 5,
"hl": "en_US",
"cr": "ID",
"fexp": "23983296,23986017,24004644,24007246,24080738,24135310,24208765,24362631,24363114,24364789,24366065,24366917,24369773,24371398,24373193,24379215,24380264,24383852,24385288,24415864,24433679,24439361,24470718,24486562,24532855,24550458,24550951,24559328,24699899,39323074",
"afmt": "140",
"lio": "1687141757.701",
"muted": "1",
"cc": ".en.eEY6OEpapPo",
"docid": "3Wmxa-lMpkI",
"ei": "Y3SQZPiZDvONvcAP5aW9wAQ",
"plid": "AAX-fTPvyP9nQNxA",
"of": "29JfWt3VWi3ZrjViFB0SRg",
"vm": "CAEQABgEOjJBQ00wQ1lnZnFkRVU1eVAxR2p1eFV1RTVLSWVkc0NmcmdaMW5Ed1E2QnlLdjByc05yd2JOQVBta0tESWxIckZpVzFuWmk3Q2tKM2g5cnp2RFV1VVJQSFVyRHRTSTYzTFBiT3oxbzZTaWwzclVGYmw4Z3ZxZUE1MzN3SHZYeUpJd3l3aAE",
"vct": "46849.276",
"vd": "50400.106",
"vpl": "46800.106-46849.276",
"vbu": "46800.006-46970.000",
"vpa": "0",
"vsk": "0",
"ven": "0",
"vpr": "1",
"vrs": "4",
"vns": "2",
"vec": "null",
"vemsg": "",
"vvol": "1",
"vdom": "1",
"vsrc": "1",
"vw": "731",
"vh": "548",
"lct": "46849.176",
"lsk": false,
"lmf": false,
"lbw": "437484.301",
"lhd": "0.216",
"lst": "0.000",
"laa": "itag_140_type_3_src_updateWithSegmentInfo_segsrc_updateWithSegmentInfo_seg_21124_time_46965.0-46970.0_off_0_len_82199_end_1",
"lva": "itag_243_type_3_src_updateWithSegmentInfo_segsrc_updateWithSegmentInfo_seg_21124_time_46965.0-46970.0_off_0_len_21930_end_1",
"lar": "itag_140_type_3_src_mlLiveCreateReqInfoForSeg_segsrc_updateWithSegmentInfo_seg_21124_time_46965.0-46970.0_off_0_len_90000_end_1",
"lvr": "itag_243_type_3_src_mlLiveCreateReqInfoForSeg_segsrc_updateWithSegmentInfo_seg_21124_time_46965.0-46970.0_off_0_len_148000_end_1",
"laq": "0",
"lvq": "0",
"lab": "46800.006-46970.022",
"lvb": "46800.000-46970.000",
"ismb": 2970000,
"latency_class": "NORMAL",
"segduration": 5,
"lat": 1687188608,
"relative_loudness": "NaN",
"optimal_format": "360p",
"user_qual": 0,
"release_version": "youtube.player.web_20230613_01_RC00",
"debug_videoId": "3Wmxa-lMpkI",
"0sz": "false",
"op": "",
"yof": "false",
"dis": "",
"debug_playbackQuality": "medium",
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant