请参考这个大佬做的文章,亲测可用 ~ YOLOv5训练自己的数据集实现视频的识别_yolov5检测视频文件格式-CSDN博客https://blog.csdn.net/weixin_53665577/article/details/129648364?ops_request_misc=%257B%2522request%255Fid%2522%253A%2522170840037116777224439438%2522%252C%2522scm%2522%253A%252220140713.130102334.pc%255Fblog.%2522%257D&request_id=170840037116777224439438&biz_id=0&utm_medium=distribute.pc_search_result.none-task-blog-2~blog~first_rank_ecpm_v1~times_rank-30-129648364-null-null.nonecase&utm_term=%E7%9B%AE%E6%A0%87%E8%AF%86%E5%88%AB&spm=1018.2226.3001.4450