Based on the video, and the fact that your iPhone charges fine off of the same cable, it looks like there could be debris in the iPad's Lightning port that's preventing the cable from seating fully.
When the cable is plugged into the iPad, see if you can wiggle it slightly from left to right (and if doing so causes it to charge – or not charge – continually, instead of flipping back and forth). If the port is clear, the cable should fit snugly and not wiggle.
I've had this happen with both the Lightning port and the headphone jack on various devices. You can use something like a toothpick or a paperclip to try to clean the debris out of the port and that will probably do the trick (just be careful to not damage anything). If you don't want to try this yourself, you can also take it to the Apple Store and they'll do it for you, using (presumably) more specialized tools.