Conversation

Youtube video ids are just 64 bit numbers that have been base64 encoded with a slightly modified character set. Here is an example of a Python script that converts the Youtube id back to a 64 bit int representation:
1
22
import base64 import struct yt_id = '_ZPpU7774DQ' + '=' # Add padding yt_id = yt_id.replace('-','+').replace('_','/') yt_id = struct.unpack('L', base64.b64decode(yt_id))[0] print(yt_id)
2
7