package com.tzld.piaoquan.tencentad.controller; import com.tzld.piaoquan.tencentad.common.base.CommonResponse; import com.tzld.piaoquan.tencentad.model.po.FetchKeyFramesParam; import com.tzld.piaoquan.tencentad.model.vo.AdVideoVo; import com.tzld.piaoquan.tencentad.service.FfmpegUtilService; import com.tzld.piaoquan.tencentad.utils.FfmpegUtil; import com.tzld.piaoquan.tencentad.utils.page.Page; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Value; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; import java.io.File; import java.util.UUID; @RestController @RequestMapping("/ffmpeg") public class FfmpegUtilController { @Value("${image_path}") private String imagePath; @Autowired private FfmpegUtilService ffmpegUtilService; @PostMapping("/fetchKeyFrames") public CommonResponse fetchKeyFrames(@RequestBody FetchKeyFramesParam fetchKeyFramesParam) { return ffmpegUtilService.fetchKeyFrames(fetchKeyFramesParam); } }