OpenGL render active viewport is OK. But, how to export? If I render for saving video file, It's all black. This lesson have to guide the way to export video file.
Pressing the “animation” button will use the camera and lights and actually “render” the scene. But because neither of those exist, you will get a black screen.
You can change your render settings to be a movie file and then hit the opengl animation render, (the viewport render) and it will export the video.
I like to use Ffmpeg video output with the mp4 container (H264 codec)
Or you can export the image sequence and use the VSE to export the video in the same fashion.
The reasoning for this is explained in the next animation course (Animation Workflow and Body Mechanics), but you can export straight out w/o using the VSE for these exercises (because they are short).
Hope that helps.