Remember that MMJoy firmware for (some) Arduino boards is for joystick controller, encoder should be connected in this way, using diodes (1N4148...) - to avoid "ghost" press:

http://simhq.com/forum/files/usergals/2014/08/full-37484-85623-pins_common.png

In the linked videos I dont know the purpose of encoder, maybe are for use in audio volume control, or steep motor control...

So, depends of intended use maybe MMjoy firmware is not suitable for your purposes.