To replace 8 AA's with Li-ion's you will need to make it three, not two.
I suppose it depends on how sensitive the equipment it, but I myself use 3X 14500 batteries in my radio control remotes instead of 8X NIMH or alkaline AA's. I use dummy batteries to fill in the spaces. Capacity will be down, but in my case I don't mind as the batteries in the remote will outlast any of the batteries in the actual vehicle you are controlling with the remote.