操作系统:Ubuntu16.04.4 amd64

安装http://m3u8-segmenter.inodes.org/方式安装m3u8-segmenter报错,于是有了这篇文章

apt install aptitude
apt-add-repository ppa:johnf-inodes/m3u8-segmenter
aptitude update
apt-get install m3u8-segmenter

其中在更新下载源的过程中报错:

root@ubuntu:/home/tomcat# aptitude update
Hit http://mirrors.aliyun.com/ubuntu xenial InRelease
Hit http://mirrors.aliyun.com/ubuntu xenial-updates InRelease
Hit http://mirrors.aliyun.com/ubuntu xenial-backports InRelease
Hit http://mirrors.aliyun.com/ubuntu xenial-security InRelease
Hit http://archive.ubuntu.com/ubuntu xenial InRelease
Ign http://ppa.launchpad.net/johnf-inodes/m3u8-segmenter/ubuntu xenial InRelease
Hit http://archive.canonical.com/ubuntu xenial InRelease
Hit http://ppa.launchpad.net/linuxuprising/java/ubuntu xenial InRelease
Ign http://ppa.launchpad.net/johnf-inodes/m3u8-segmenter/ubuntu xenial Release
Err http://ppa.launchpad.net/johnf-inodes/m3u8-segmenter/ubuntu xenial/main amd64 Packages
Not Found [IP: 91.189.95.83 ]
Ign http://ppa.launchpad.net/johnf-inodes/m3u8-segmenter/ubuntu xenial/main i386 Packages
Ign http://ppa.launchpad.net/johnf-inodes/m3u8-segmenter/ubuntu xenial/main all Packages
Ign http://ppa.launchpad.net/johnf-inodes/m3u8-segmenter/ubuntu xenial/main Translation-en_US
Ign http://ppa.launchpad.net/johnf-inodes/m3u8-segmenter/ubuntu xenial/main Translation-en
W: The repository 'http://ppa.launchpad.net/johnf-inodes/m3u8-segmenter/ubuntu xenial Release' does not have a Release file.
W: Failed to fetch http://ppa.launchpad.net/johnf-inodes/m3u8-segmenter/ubuntu/dists/xenial/main/binary-amd64/Packages: 404 Not Found [IP: 91.189.95.83 80]
E: Some index files failed to download. They have been ignored, or old ones used instead. root@ubuntu:/home/tomcat# aptitude update
Hit http://mirrors.aliyun.com/ubuntu xenial InRelease
Hit http://mirrors.aliyun.com/ubuntu xenial-updates InRelease
Hit http://mirrors.aliyun.com/ubuntu xenial-backports InRelease
Hit http://mirrors.aliyun.com/ubuntu xenial-security InRelease
Hit http://archive.ubuntu.com/ubuntu xenial InRelease
Hit http://archive.canonical.com/ubuntu xenial InRelease
Ign http://ppa.launchpad.net/johnf-inodes/m3u8-segmenter/ubuntu xenial InRelease
Hit http://ppa.launchpad.net/linuxuprising/java/ubuntu xenial InRelease
Ign http://ppa.launchpad.net/johnf-inodes/m3u8-segmenter/ubuntu xenial Release
Err http://ppa.launchpad.net/johnf-inodes/m3u8-segmenter/ubuntu xenial/main amd64 Packages
Not Found [IP: 91.189.95.83 ]
Ign http://ppa.launchpad.net/johnf-inodes/m3u8-segmenter/ubuntu xenial/main i386 Packages
Ign http://ppa.launchpad.net/johnf-inodes/m3u8-segmenter/ubuntu xenial/main all Packages
Ign http://ppa.launchpad.net/johnf-inodes/m3u8-segmenter/ubuntu xenial/main Translation-en_US
Ign http://ppa.launchpad.net/johnf-inodes/m3u8-segmenter/ubuntu xenial/main Translation-en
W: The repository 'http://ppa.launchpad.net/johnf-inodes/m3u8-segmenter/ubuntu xenial Release' does not have a Release file.
W: Failed to fetch http://ppa.launchpad.net/johnf-inodes/m3u8-segmenter/ubuntu/dists/xenial/main/binary-amd64/Packages: 404 Not Found [IP: 91.189.95.83 80]
E: Some index files failed to download. They have been ignored, or old ones used instead. root@ubuntu:/home/tomcat# apt-get install m3u8-segmenter
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package m3u8-segmenter

笔者的安装方法:

apt install curl build-essential automake automake1. libavformat-dev pkg-config ffmpeg
cd /usr/src
curl https://codeload.github.com/m3u8-segmenter/m3u8-segmenter/tar.gz/v1.0.2 -o m3u8-segmenter.v1.0.2.tar.gz
tar -zxvf m3u8-segmenter.v1.0.2.tar.gz
#安装m3u8-segmenter
aclocal
autoreconf
automake -ac
./configure
make
sudo make install

安装截图

centos7安装命令:

yum install  gcc make nasm pkgconfig wget curl curl-devel zlib-devel openssl-devel perl cpio expat-devel gettext-devel libtool mhash.x86_64 perl-Digest-SHA1.x86_64  pcre.i386 pcre.x86_64 pcre-devel.i386 pcre-devel.x86_64
curl https://codeload.github.com/m3u8-segmenter/m3u8-segmenter/tar.gz/v1.0.2 -o m3u8-segmenter.v1.0.2.tar.gz tar -zxvf m3u8-segmenter.v1.0.2.tar.gz #安装m3u8-segmenter
aclocal
automake -ac
./configure
make
sudo make install

windows版本

https://github.com/godka/m3u8-segmenter-for-Windows

可供测试下载视频:http://media.speech.zone/video/Speech_Processing_synthesis-TDPSOLA-21m37s.mp4

使用方法:

# -ar采样率 audio sampling rate
# -ab 比特率
# -vn disable video #、视频分片 ffmpeg -i Spring_Insight-Milestone_3-Screencast.mp4 -vcodec copy -acodec copy -vbsf h264_mp4toannexb | m3u8-segmenter -i - -n -p screencast -m playlist.m3u8 --u http://example.org/video/ ffmpeg -i Spring_Insight-Milestone_3-Screencast.mp4 -vbsf mpegts | m3u8-segmenter -i - -n -p /tmp/big_buck_bunny -m /tmp/big_buck.m3u8 -u http://inodes.org/bigbuck/ ffmpeg -loglevel quiet -i Spring_Insight-Milestone_3-Screencast.mp4 -f mpegts - | \
m3u8-segmenter -i - -d -p /tmp/big_buck_bunny -m /tmp/big_buck.m3u8 -u http://inodes.org/bigbuck/ ffmpeg -er -i input.mp3 -f mpegts -acodec libmp3lame -ar -ab 32k -vn - | \
m3u8-segmenter -i - -d -p outputdir/prefix -m outputdir/output.m3u8 -u http://domain.com/ #、音频分片 ffmpeg -er -i output.wav -f mpegts -acodec pcm_s16le -ar -ab 256k -vn - | \
m3u8-segmenter -i - -d -p /tmp/outputdir/prefix -m /tmp/outputdir/output_wav.m3u8 -u http://domain.com/ ffmpeg -er -i output.wav -f mpegts -acodec pcm_s16le -ar -ab 256k -vn - | \
m3u8-segmenter -i - -d -p outputdir/prefix -m outputdir/output_wav.m3u8 -u http://domain.com/ ffmpeg -er -i output.wav -f mpegts -acodec pcm_s16le -ar -ab 256k -vn - | m3u8-segmenter -i - -d -p outputdir/prefix -m outputdir/output_wav.m3u8 -u http://domain.com/ ffmpeg -i output.wav -f mpegts -acodec pcm_s16le -ar -ab 256k -vn - | \
m3u8-segmenter -i - -d -p outputdir/prefix -m outputdir/output.m3u8 -u http://domain.com/

以上代码来自网络,由于过去时间太久,记不起来源。版权归原作者所有

最新文章

  1. SQLite数据库的基本操作
  2. 将war包部署到服务器的详细步骤
  3. shell 常用命令
  4. linux shell 流程控制(条件if,循环【for,while】,选择【case】语句实例 --转载
  5. collectionView初始化
  6. unity, 由5.2.1f1升级到5.3.5f1,2d物理不正常解法
  7. DWZ (JUI) 教程 DWZ中dialog层的刷新
  8. jsonp实现跨域请求
  9. FileUtils
  10. android 工程里缺少 R.java 文件原因和解决方法
  11. 定宽块状元素居中 1记(text-align/margin:0 auto)
  12. Sublime Text3使用指南
  13. table左边固定-底部横向滚动条
  14. 微信小程序入门(六)
  15. flask 电子邮件Flask-Mail
  16. C# 切分图片
  17. hdu3605 Escape 二分图多重匹配/最大流
  18. Neo4j 2.0 生产环境集群搭建
  19. Nginx配置基于多域名、端口、IP的虚拟主机
  20. Python操作SQLAlchemy之连表操作

热门文章

  1. terminal mvn 打包
  2. PostgreSQL的 pg_hba.conf 配置参数详解
  3. S1_搭建分布式OpenStack集群_02 虚拟机环境配置
  4. 23、CacheManager原理剖析与源码分析
  5. 13、SparkContext详解
  6. [WARNING] 找不到编译器:wepy-compiler-less。 [Error] 未发现相关 less 编译器配置,请检查wepy.config.js文件。
  7. Python3文件
  8. python3.x中lambda表达式的处理与python2不一样
  9. BufferedReader和BufferedWriter简介
  10. 【Python 代码】3D TIF 拆成若干张tif (ISBI细胞数据集)