<!-- wp:paragraph -->
<p>首先安装mac安装神器brew安装方法:</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>命令行输入</p>
<!-- /wp:paragraph -->

<!-- wp:code -->

/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"  
<!-- /wp:code --> <!-- wp:paragraph --> <p>回车(这里有提示目录不存在,要创建需要按return键,如果用的windows键盘,就是回车键)</p> <!-- /wp:paragraph --> <!-- wp:paragraph --> <p>它的用法brew update 更新brew;</p> <!-- /wp:paragraph --> <!-- wp:paragraph --> <p>brew install {应用名,如git} 安装软件</p> <!-- /wp:paragraph --> <!-- wp:paragraph --> <p>brew cask install {应用名,如git} 也是下载安装。</p> <!-- /wp:paragraph --> <!-- wp:paragraph --> <p>brew help 神器好不好,用了才知道,自己去试吧</p> <!-- /wp:paragraph --> <!-- wp:paragraph --> <p>brew install ffmpeg Updating Homebrew... 卡死解决的话</p> <!-- /wp:paragraph --> <!-- wp:paragraph --> <p>export HOMEBREW_NO_AUTO_UPDATE=true </p> <!-- /wp:paragraph --> <!-- wp:paragraph --> <p>先运行这个再</p> <!-- /wp:paragraph --> <!-- wp:paragraph --> <p>brew install ffmpeg</p> <!-- /wp:paragraph --> <!-- wp:paragraph --> <p>之后出现xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun</p> <!-- /wp:paragraph --> <!-- wp:paragraph --> <p>解决方法:</p> <!-- /wp:paragraph --> <!-- wp:paragraph --> <p>打开终端输入 xcode-select --install 回车后,系统弹出下载xcode,点击确认,下载完成后即可。(</p> <!-- /wp:paragraph --> <!-- wp:paragraph --> <p>实际上不是下载xcode,可能下载xcode有关插件,下载时长约1分钟),好之后直接ffmpeg查看安装情况。找到腾讯视频缓存的地方</p> <!-- /wp:paragraph --> <!-- wp:code -->
cd /Users/zhengniu/Library/Containers/com.tencent.tenvideo/Data/Library/Application Support/Download/video/*.hls/
<!-- /wp:code --> <!-- wp:paragraph --> <p>下面查看</p> <!-- /wp:paragraph --> <!-- wp:paragraph --> <p>ls</p> <!-- /wp:paragraph --> <!-- wp:paragraph --> <p>视频缓存的拆分文件</p> <!-- /wp:paragraph --> <!-- wp:paragraph --> <p>合并 *.ts</p> <!-- /wp:paragraph --> <!-- wp:paragraph --> <p>cat *.ts > x.ts</p> <!-- /wp:paragraph --> <!-- wp:paragraph --> <p>转化x.ts 为 x.mp4</p> <!-- /wp:paragraph --> <!-- wp:paragraph --> <p>ffmpeg -y-i x.ts -c:v libx264 -c:a copy -bsf:a aac_adtstoasc x.mp4</p> <!-- /wp:paragraph --> <!-- wp:paragraph --> <p>mv x.mp4 ~/Desktop/</p> <!-- /wp:paragraph --> <!-- wp:paragraph --> <p>另:windows 教程比较简单,下次介绍!</p> <!-- /wp:paragraph -->

关注友儿不迷路

Last modification:October 9th, 2019 at 10:02 am
如果觉得我的文章对你有用,请随意赞赏