You would have to set up your Camera in a certain position in which it can see the DS system's Screen precisely. That is really the only way, but make sure you have good lighting in order to prevent blurriness. Something to know is that from Gen IV onwards there is a Vs. Recorder that can record a Battle Frontier/Subway or Wi-fi battle and keep it there, but you can only have one at a time. Then you film that battle without having to press button which might interfere with the Camera, it also speeds up reaction time.
