BACKGROUND: The widespread adoption of online education in medical teaching has brought new challenges. Technical issues, such as poor video quality, can intensify student anxiety and diminish learning motivation. METHODS: A randomized controlled trial was conducted with 93 medical students. The participants watched videos of varying quality (no interference, moderate interference, or severe interference) to evaluate the impact of video quality on their state anxiety (STAI-S) and learning motivation (MSLQ). Gender and trait anxiety (STAI-T) were included as control variables. RESULTS: Lower video quality was associated with higher levels of state anxiety, and gender had no significant moderating effect. Students with greater trait anxiety demonstrated better short-term adaptability under stress. No significant correlation was found between learning motivation and state anxiety. CONCLUSION: Video quality significantly affects students' immediate psychological states. Optimizing video quality in online education is essential to reduce students' psychological burden and enhance their learning experience.