In my D4 I used a power source from within the housing behind the rear view mirror. I'm sorry but I can't remember which wires I connected it to, but I discovered them with an online search if that helps.
The housing is released by unscrewing a bolt located inside the sunglass holder.
I dismantled the dash cam's fag lighter plug and wrapped the workings with insulating tape. It fitted it easily inside the housing. Plenty of room in there.
Good luck
Nick