In this paper, we developed a virtual reality-based contents that can gait analysis and gait training on a treadmill using a depth camera of Kinect. This content was used in the user's step length, step velocity, step count, flexion angle extracted by the Kinect skeleton tracking. Nine male subjects (24.9 years, 173.2cm) performed gait training using avatars to reflect their movements on the treadmill and confirmed result of gait analysis using real-time graphs to display their gait variables. Implemented contents can lead to a cognition reaction that is to avoid collisions with obstacles, as well as to determine the gait movements in a virtual reality. Based on these results, we will be able to make real time gait analysis and gait training, in consider the characteristics and safety of a rehabilitation patient by developing content that we have fun with additional tests for gait analysis.