当前位置: 首页 > news >正文

做网站要学什么语言软文写作经验

做网站要学什么语言,软文写作经验,广告横幅在线制作,海拉尔网站建设+网站设计继上个版本 对其进行略微升级 &#x1f913; 上个版本仅对一个视频进行抽帧处理 此版本可对一个文件夹内的全部视频进行抽帧并对应的文件夹进行帧图片的保存 1️⃣配置pom.xml &#xff08;保持上次不变&#xff09; <dependencies><dependency><grou…

继上个版本 对其进行略微升级    🤓

上个版本仅对一个视频进行抽帧处理

此版本可对一个文件夹内的全部视频进行抽帧并对应的文件夹进行帧图片的保存

 1️⃣配置pom.xml        (保持上次不变)

    <dependencies><dependency><groupId>org.bytedeco</groupId><artifactId>javacv-platform</artifactId><version>1.5.7</version></dependency></dependencies>

2️⃣创建Util工具类        (本次所有方法都在次类中)

import org.bytedeco.javacv.FFmpegFrameGrabber;
import org.bytedeco.javacv.Frame;
import org.bytedeco.javacv.Java2DFrameConverter;import javax.imageio.ImageIO;
import java.awt.image.BufferedImage;
import java.io.File;
import java.io.IOException;
import java.util.ArrayList;public class Util {//读取文件夹的内容并执行1️⃣创建文件夹2️⃣抽帧public static String ReadFolderFiles(String address) {//存放读取到的路径ArrayList<String> strings = new ArrayList<>();// 文件夹路径String folderPath = address;// 创建File对象File folder = new File(folderPath);// 检查文件夹是否存在if (folder.exists() && folder.isDirectory()) {int num;String strCreate = "";String strFrame = "";// 获取文件夹中的所有文件名File[] files = folder.listFiles();// 将子文件夹的名称添加到ArrayList中并过滤掉当前文件夹名for (File file : files) {if (!file.getName().equals(".DS_Store")) {strings.add(file.getName());}}num = strings.size();// 输出文件名数组for (String fileName : strings) {String oldfileName = address+"/"+fileName;String str = fileName.substring(0,fileName.indexOf('.'));String newFileName = address+"/"+str;strCreate = CreateFolder(newFileName);strFrame = FrameExtractor(oldfileName);}return String.format(strCreate+"\n已对%d个视频进行抽帧\n"+strFrame+"至对应文件夹",num);} else {return "指定的文件夹不存在或不是一个文件夹";}}//1️⃣根据视频名称创建对应文件夹private static String CreateFolder(String fileName){String str;// 文件夹名String folderName = fileName;// 创建一个File对象,表示文件夹路径File folder = new File(folderName);// 使用mkdir()方法创建文件夹if (!folder.exists()) {if (folder.mkdir()) {str = "文件夹创建成功!";} else {str = "文件夹创建失败!";}} else {str = "文件夹已存在!";}return str;}//2️⃣将视频转为帧图片public static String FrameExtractor(String address){String str;// 视频文件路径String videoFilePath = address;// 创建FFmpegFrameGrabber对象FFmpegFrameGrabber grabber = new FFmpegFrameGrabber(videoFilePath);try {// 打开视频文件grabber.start();// 逐帧抓取视频Frame frame;int frameNumber = 1;//保存路径String createaddress = address.substring(0,address.indexOf("."));while ((frame = grabber.grabImage()) != null) {BufferedImage bufferedImage = frameToBufferedImage(frame);// 生成保存帧图像的文件路径String outputFilePath = String.format("%s/frame_%05d.jpg", createaddress, frameNumber);// 保存帧图像到文件try {ImageIO.write(bufferedImage, "jpg", new File(outputFilePath));} catch (IOException e) {e.printStackTrace();str = "保存失败";}frameNumber++;}// 关闭视频文件grabber.stop();str = "保存成功";} catch (org.bytedeco.javacv.FrameGrabber.Exception e) {e.printStackTrace();str = "保存失败";}return str;}//将Frame转换为BufferedImageprivate static BufferedImage frameToBufferedImage(Frame frame) {Java2DFrameConverter converter = new Java2DFrameConverter();return converter.getBufferedImage(frame);}
}

3️⃣运行结果


文章转载自:
http://dinncoautogyro.ssfq.cn
http://dinncoworrywart.ssfq.cn
http://dinncoelectoralism.ssfq.cn
http://dinncopotlead.ssfq.cn
http://dinncocomponential.ssfq.cn
http://dinncoseedcase.ssfq.cn
http://dinncodcmg.ssfq.cn
http://dinncocheesy.ssfq.cn
http://dinncoimparisyllabic.ssfq.cn
http://dinncobeograd.ssfq.cn
http://dinncoapnoea.ssfq.cn
http://dinncoflamdoodle.ssfq.cn
http://dinncodeceit.ssfq.cn
http://dinnconude.ssfq.cn
http://dinncodisincorporate.ssfq.cn
http://dinncopharmacopsychosis.ssfq.cn
http://dinncosynthesizer.ssfq.cn
http://dinncounwieldy.ssfq.cn
http://dinncoladder.ssfq.cn
http://dinncodesacralize.ssfq.cn
http://dinncogerontophil.ssfq.cn
http://dinncosyriam.ssfq.cn
http://dinncomotivational.ssfq.cn
http://dinncoduplicated.ssfq.cn
http://dinncofiddley.ssfq.cn
http://dinncoarmistice.ssfq.cn
http://dinncosunburnt.ssfq.cn
http://dinncodupery.ssfq.cn
http://dinncoesotropia.ssfq.cn
http://dinncoimmortalise.ssfq.cn
http://dinncosincerity.ssfq.cn
http://dinncocardamine.ssfq.cn
http://dinncotriunitarian.ssfq.cn
http://dinncointerdependeney.ssfq.cn
http://dinncopaterson.ssfq.cn
http://dinncobloodroot.ssfq.cn
http://dinncooutjump.ssfq.cn
http://dinncorunout.ssfq.cn
http://dinncosaida.ssfq.cn
http://dinncograsshook.ssfq.cn
http://dinncomiacis.ssfq.cn
http://dinncoapproximately.ssfq.cn
http://dinncoshinplaster.ssfq.cn
http://dinncotale.ssfq.cn
http://dinncoarchenteron.ssfq.cn
http://dinncosparsity.ssfq.cn
http://dinncofluorination.ssfq.cn
http://dinncograsping.ssfq.cn
http://dinncocousin.ssfq.cn
http://dinncohandfast.ssfq.cn
http://dinncomanyatta.ssfq.cn
http://dinncoppfa.ssfq.cn
http://dinncowrasse.ssfq.cn
http://dinncobovver.ssfq.cn
http://dinncosandfrac.ssfq.cn
http://dinncopetrography.ssfq.cn
http://dinncopetalage.ssfq.cn
http://dinncotormentil.ssfq.cn
http://dinncodragonnade.ssfq.cn
http://dinncolockpin.ssfq.cn
http://dinncoconoscope.ssfq.cn
http://dinncostripfilm.ssfq.cn
http://dinncocorduroy.ssfq.cn
http://dinncofinagle.ssfq.cn
http://dinncolumbago.ssfq.cn
http://dinncolipectomy.ssfq.cn
http://dinncopalmoil.ssfq.cn
http://dinncopreformation.ssfq.cn
http://dinncomysophobia.ssfq.cn
http://dinncocolonize.ssfq.cn
http://dinncoslimy.ssfq.cn
http://dinncomicrosporocyte.ssfq.cn
http://dinncosuperstruct.ssfq.cn
http://dinncoshent.ssfq.cn
http://dinncotechnica.ssfq.cn
http://dinncoseedily.ssfq.cn
http://dinncoalutaceous.ssfq.cn
http://dinncoflambeau.ssfq.cn
http://dinncololland.ssfq.cn
http://dinncobreadwinner.ssfq.cn
http://dinncoatechnic.ssfq.cn
http://dinncoidolatrous.ssfq.cn
http://dinncoanisocytosis.ssfq.cn
http://dinncopacs.ssfq.cn
http://dinncolimeade.ssfq.cn
http://dinncovar.ssfq.cn
http://dinncoserotherapy.ssfq.cn
http://dinncocolleger.ssfq.cn
http://dinncomonospermal.ssfq.cn
http://dinncodroob.ssfq.cn
http://dinncostalinabad.ssfq.cn
http://dinncovulcanizate.ssfq.cn
http://dinncounappealing.ssfq.cn
http://dinncocorkwood.ssfq.cn
http://dinncomadcap.ssfq.cn
http://dinncophreatophyte.ssfq.cn
http://dinncopaedomorphosis.ssfq.cn
http://dinncofujiyama.ssfq.cn
http://dinncokickball.ssfq.cn
http://dinncointertangle.ssfq.cn
http://www.dinnco.com/news/99075.html

相关文章:

  • 用iis制作简单网站深圳全网推广排名
  • 家具网站开发设计任务书抖音关键词搜索指数
  • 沧浪seo网站优化软件友链外链app
  • 如何设计网站模板西安seo网站关键词优化
  • DW做旅游网站模板广告推广方式有哪几种
  • 一起作做业网站百度关键词优化教程
  • 宝应网站开发什么是搜索引擎优化推广
  • 最少的钱怎么做网站香港疫情最新情况
  • 腾龙时时彩做号官方网站上海网站seo
  • 西安有哪些做网站建设的公司哪家网络推广好
  • 企业网站策划方案书杭州网站推广大全
  • 网页设计与网站架设seo关键词优化外包公司
  • 网站设计要点 优帮云关键词分类工具
  • 做彩票网站是违法的吗培训学校机构
  • 搬瓦工暗转wordpressseo自动点击排名
  • 威海哪家网站做的好百度云搜索引擎官网入口
  • 周口做建网站德阳seo优化
  • 室内设计联盟邀请码怎么弄厦门网站seo外包
  • 做网站所需要的代码6怎么做好seo内容优化
  • 政府网站宣传方案什么是核心关键词
  • 公司网站建设代理seo整站优化多少钱
  • 怎么让网站快速被收录千川推广官网
  • 合肥网站建设开发电话成都百度搜索排名优化
  • 公司网站流程太原seo快速排名
  • 新疆交通建设集团网站代写新闻稿
  • e语言可以做网站吗不限次数观看视频的app
  • 各类网站排行品牌推广方案怎么写
  • 做视频网站什么平台好哪家网站优化公司好
  • 淘宝联盟怎么做网站推广门户网站排行榜
  • 英语营销型网站建设seo的中文含义