I can take video using the lcd screen and I can take images when using the viewfinder.
However I cannot record video via the viewfinder.
Is there a way to shoot video using the viewfinder with a DSLR?
This isn't possible with DSLRs using optical viewfinders.
This image (source) shows the cross-section of a DSLR:
Normally light enters the lens, reflects off the mirror (#2) into the pentaprism (#8) and then to the optical viewfinder (#9). When the mirror is in this position, light does not reach the sensor. When recording a video, the sensor makes 60 photos a second (or 30 or 24 or whatever depending on your framerate). In this case, the mirror folds out of the way, as it is not possible for the shutter to physically open and close 60 times a second.
When the mirror folds out of the way to allow light to reach the sensor, light is no longer reflected up to the viewfinder. To use the viewfinder, you would need to use a continuous photo mode and then stitch your photos together in post production. This would also severely limit your framerate and length of the movie, as the buffer would fill quite quickly.
To shoot video with a viewfinder, you would need a mirrorless camera. These do not use an optical viewfinder, but an electronic viewfinder (EVF). An EVF is basically a tiny screen, which is why it can be used during movie recording.
TL;DR: You can't use the optical viewfinder while recording video on DSLRs.
To use the viewfinder, you would need to use a continuous photo mode and then stitch your photos together in post production.
And if you're lucky enough to have a D5 or similar, fast enough to shoot 12fps, you'll also need a strategy to evade the beating you'll provoke from bystanders listening to the clattering machine-gun shutter going non-stop (also, complicates live audio streams unless you're going for that vintage Geneva-drive sort of sound...)
\$\endgroup\$