How to identify my transistor's pins or leads?
There are many ways (sorted starting with easiest):


If you know the part number - Google it
You do not know the part number, but the package is standard (TO-220 for example) - you can find legs specifications in package's spec (or just find a datasheet of any other similar transistor in this kind of package). Some standard packages are symmetric though :(
Diode mode measurement (as seen in the video)
Resistance mode measurement (instead of measuring diodes' forward voltage, you measure the resistance between pins)
If none of the above worked (or you just don't have a multimeter) - you're dead in the waters


EDIT: while it is nice as a theoretical example, in practice you will never work with an unknown component (unless you're really desperate), therefore you'll always have datasheet.