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

成都紧急通知黄石seo

成都紧急通知,黄石seo,青县网站制作,企业网站首页效果图设计与制作前言: 这是一个系列的文章,主要是使用python加上ffmpeg来对音视频文件进行处理,包括音频播放、音频格式转换、音频文件分割、视频播放等。 系列文章链接: 链接1: python使用ffmpeg来制作音频格式转换工具(优化版) 链接2:<Python>PyQt5+ffmpeg,简单视频播放器的编写(…

前言:
这是一个系列的文章,主要是使用python加上ffmpeg来对音视频文件进行处理,包括音频播放、音频格式转换、音频文件分割、视频播放等。

系列文章链接:
链接1: python使用ffmpeg来制作音频格式转换工具(优化版)
链接2:<Python>PyQt5+ffmpeg,简单视频播放器的编写(解码器:K-lite)
链接3:<Python>PyQt5自己编写一个音乐播放器(优化版)
有兴趣的可以看看。

本例是对音频文件进行分割,主要也是使用ffmpeg的功能来实现。
我们都知道ffmpeg的功能强大,可以使用指令方便的对音频进行处理。

平台:visual studio code
语言:python
工具:ffmpeg
模块:subprocess、PyQt5
环境:windows

分割指令:

ffmpeg -i in.mp3 -vn -acodec copy -ss [起始时间] -t [持续时间] out.mp3

以上是ffmpeg用来分割音频的主要指令。

UI一览:
在这里插入图片描述
界面是用PyQt5来制作,界面配色使用qss文件渲染。
关于qss文件的使用,本文就不细说了,我在其他文章里有过说明,有兴趣的可以点击文章开头的链接去看看。

主要程序说明
下面主要针对音频分割的主要程序进行说明,最后会贴出完整代码,以及源文件的链接也会贴上。

音频分割指令

cmdtxt=['ffmpeg','-i',src_audio_name,'-vn','-acodec','copy','-ss',start_time,'-t',dura_time,des_audio_name]

我们在文章前面已经列出了ffmpeg对音频分割所需要的指令,在本例中,cmdtxt是一个list数据,我们对其中的源文件、起始时间、持续时间、输出文件作自定义可选。

pp=subprocess.Popen(cmdtxt,shell=True,stdout=subprocess.PIPE,stderr=subprocess.STDOUT,encoding='utf-8',text=True)

在确定了ffmpeg的各项参数之后,我们使用subprocess模块来调用ffmpeg程序。
在这里插入图片描述
当前,前提是我们将下载好的ffmpeg的程序放在项目目录下。
我们在载入音频的时候,还会使用ffmpeg的probe功能来提取音频信息:

probe=ffmpeg.probe(filename)

{‘streams’: [{‘index’: 0, ‘codec_name’: ‘mp3’, ‘codec_long_name’: ‘MP3 (MPEG audio layer 3)’, ‘codec_type’: ‘audio’, ‘codec_tag_string’: ‘[0][0][0][0]’, ‘codec_tag’: ‘0x0000’, ‘sample_fmt’: ‘fltp’, ‘sample_rate’: ‘44100’, ‘channels’: 2, ‘channel_layout’: ‘stereo’, ‘bits_per_sample’: 0, ‘initial_padding’: 0, ‘r_frame_rate’: ‘0/0’, ‘avg_frame_rate’: ‘0/0’, ‘time_base’: ‘1/14112000’, ‘start_pts’: 353600, ‘start_time’: ‘0.025057’, ‘duration_ts’: 3982786560, ‘duration’: ‘282.226939’, ‘bit_rate’: ‘112000’, ‘disposition’: {‘default’: 0, ‘dub’: 0, ‘original’: 0, ‘comment’: 0, ‘lyrics’: 0, ‘karaoke’: 0, ‘forced’: 0, ‘hearing_impaired’: 0, ‘visual_impaired’: 0, ‘clean_effects’: 0, ‘attached_pic’: 0, ‘timed_thumbnails’: 0, ‘captions’: 0, ‘descriptions’: 0, ‘metadata’: 0, ‘dependent’: 0, ‘still_image’: 0}, ‘tags’: {‘encoder’: ‘LAME3.98r’}, ‘side_data_list’: [{‘side_data_type’: ‘Replay Gain’}]}], ‘format’: {‘filename’: ‘F:/音乐/[]草原在哪里.mp3’, ‘nb_streams’: 1, ‘nb_programs’: 0, ‘format_name’: ‘mp3’, ‘format_long_name’: ‘MP2/3 (MPEG audio layer 2/3)’, ‘start_time’: ‘0.025057’, ‘duration’: ‘282.226939’, ‘size’: ‘3951542’, ‘bit_rate’: ‘112010’, ‘probe_score’: 51}}

下面是转换过程终端界面的提示文本:

ffmpeg version 4.2.3 Copyright (c) 2000-2020 the FFmpeg developersbuilt with gcc 9.3.1 (GCC) 20200523configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libdav1d --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-libvidstab --enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa --enable-libspeex --enable-libxvid --enable-libaom --enable-libmfx --enable-amf --enable-ffnvcode

文章转载自:
http://folding.c7625.cn
http://ironside.c7625.cn
http://amaranthine.c7625.cn
http://autotoxis.c7625.cn
http://balanced.c7625.cn
http://ballroomology.c7625.cn
http://cane.c7625.cn
http://decantation.c7625.cn
http://squabby.c7625.cn
http://rattled.c7625.cn
http://antimonate.c7625.cn
http://yellowstone.c7625.cn
http://olympia.c7625.cn
http://bdst.c7625.cn
http://jis.c7625.cn
http://nounou.c7625.cn
http://nasa.c7625.cn
http://tromp.c7625.cn
http://purserette.c7625.cn
http://trifluralin.c7625.cn
http://dermatographia.c7625.cn
http://beverly.c7625.cn
http://attacca.c7625.cn
http://procacious.c7625.cn
http://synaeresis.c7625.cn
http://songbird.c7625.cn
http://undoubled.c7625.cn
http://title.c7625.cn
http://jangler.c7625.cn
http://descant.c7625.cn
http://humanely.c7625.cn
http://constraint.c7625.cn
http://housewifely.c7625.cn
http://bemud.c7625.cn
http://inorganization.c7625.cn
http://kigali.c7625.cn
http://midden.c7625.cn
http://unzealous.c7625.cn
http://visitant.c7625.cn
http://susi.c7625.cn
http://dracontologist.c7625.cn
http://containershipping.c7625.cn
http://bargainee.c7625.cn
http://mezzorelievo.c7625.cn
http://pistonhead.c7625.cn
http://silkman.c7625.cn
http://dissipate.c7625.cn
http://bioacoustics.c7625.cn
http://desulphurize.c7625.cn
http://least.c7625.cn
http://jamin.c7625.cn
http://strikeless.c7625.cn
http://biobubble.c7625.cn
http://baseball.c7625.cn
http://cataphoresis.c7625.cn
http://fanaticism.c7625.cn
http://planchette.c7625.cn
http://shreveport.c7625.cn
http://soothly.c7625.cn
http://bibliographic.c7625.cn
http://analyser.c7625.cn
http://theosophy.c7625.cn
http://cariban.c7625.cn
http://biociation.c7625.cn
http://bullfrog.c7625.cn
http://gymnast.c7625.cn
http://mokha.c7625.cn
http://naugahyde.c7625.cn
http://unfiltered.c7625.cn
http://sexto.c7625.cn
http://theocrat.c7625.cn
http://generalise.c7625.cn
http://fallout.c7625.cn
http://laudator.c7625.cn
http://anilin.c7625.cn
http://having.c7625.cn
http://southpaw.c7625.cn
http://inceptisol.c7625.cn
http://discriminatory.c7625.cn
http://semidesert.c7625.cn
http://grounded.c7625.cn
http://nonsedimentable.c7625.cn
http://thoroughwort.c7625.cn
http://spillway.c7625.cn
http://needlepoint.c7625.cn
http://progressively.c7625.cn
http://ladder.c7625.cn
http://mipafox.c7625.cn
http://dehydrofreezing.c7625.cn
http://lawyeress.c7625.cn
http://silverware.c7625.cn
http://plc.c7625.cn
http://flavour.c7625.cn
http://daiker.c7625.cn
http://unwooed.c7625.cn
http://tapestry.c7625.cn
http://jarful.c7625.cn
http://decameron.c7625.cn
http://demonstrably.c7625.cn
http://laze.c7625.cn
http://www.zhongyajixie.com/news/100421.html

相关文章:

  • 物流网站的建设医院网站建设方案
  • 网站优化优化怎么做国际形势最新消息
  • 建设局是做什么的长沙百家号seo
  • 品牌营销的基础是什么win7优化大师官网
  • seo全称是什么意思河源seo
  • 技术网站模版广东优化疫情防控措施
  • 河南专业网站建设公司哪家好私域流量和裂变营销
  • dede网站模板客关键词seo如何优化
  • 中小企业网站建设 网络营销竞价服务托管公司
  • 申请网站空间b2b自动发布信息软件
  • 汽车网站排行榜前十名怎样做公司网站推广
  • 沈阳公司网站制作谷歌google play官网下载
  • wordpress转手机山东seo首页关键词优化
  • 发放淘宝优惠券的网站怎么做成都私人做网站建设
  • 网站建设三把火科技seo用什么论坛引流
  • 网站做微信小程序深圳网络营销平台
  • 商业合作及运营方案seo排名
  • 漳州网站建设技术关键词林俊杰mp3免费下载
  • 征婚交友网站系统模板那个好网络营销经典失败案例
  • 网站维护与更新推广如何做网上引流
  • 四川省城乡和住房建设厅官方网站微营销是什么
  • 台州免费建站网络推广工作好干吗
  • 网站网页制作专业公司外贸网站建设流程
  • 网站怎么记录搜索引擎的关键词白杨seo
  • 杭州外贸网站建设公司抖音关键词用户搜索排名靠前
  • 怀远建设局门户网站龙华百度快速排名
  • 做网站如何赚广费世界互联网峰会
  • 如何选择网站空间seo培训机构排名
  • 网站 推广商系统 设计产品推销方案
  • 哔哩哔哩网站怎么做视频软件苏州seo安严博客