The invention discloses a method for generating a video by extracting a multimedia material based on a template. The method comprises the following steps: acquiring multimedia materials, preprocessingthe multimedia materials, performing tagging processing, outputting tags of the multimedia materials, and clustering the multimedia materials and the corresponding tags according to a preset clustering rule to obtain a plurality of data sets; obtaining template configuration data input by a user, and establishing a video template according to the template configuration data and a preset initial template; and automatically performing a video generation task according to the template configuration data, extracting the multimedia material according to the template configuration data and the label, generating a video according to the template configuration data and the extracted multimedia material, and outputting the video. According to the invention, the user do not need to search, screen and confirm video materials, and video generation tasks can be automatically carried out according to user requirements, thereby reducing repeated operation processes of the users.