using FFMPEG to setup HLS server on Ubuntu
来源:互联网 发布:中国什么发生战争 知乎 编辑:程序博客网 时间:2024/06/09 14:38
1). install libx264 to support h264 encoder
sudo apt-get install libx264-dev
2). install FFMPEG with libx264 library
sudo apt-get install ffmpeg
3). install VLC into the OS
sudo apt-get install VLC
2. setup TS server using VLC
using the vlc transcode commond as before
vlc -vvv udp://@239.192.58.3:1234 --network-caching=10 --sout
'#transcode{vcodec=h264,venc=x264{keyint=25,idrinit=25,bframes=0,
ref=1,hrd=cbr,crf=28,vb=4500,preset=ultrafast,tune=zerolatency,vbv-maxrate=1200},
fps=25.00,threads=48,deinterlace,audio-sync}:udp{caching=10,mux=ts,dst=192.168.0.1:5050,name="testTS1"}'
3. using ffmpeg to receive the TS & slice it into small TS file indexed by m3u8 file(we can also use other parameters, such as size -s)
ffmpeg -re -i udp://@ip:port -vcodec libx264 -acodec aac -strict -2 -segment_time 10 -threads 24 -f hls webURL
比如:m3u8-segmenter -i udp://@:1234 -t 8 -d 5 -n 100 -p test -m test.m3u8 -u /test/
-i --input file path or URL
-vcodec --video codec
-acodec --audio codec
-segment_time --ts duration time
-threads --number of threads
-f --hls
webURL --the address which clients can access.such as http://192.168.0.8/videos/test.m3u8
搭建X264环境
1. x264
1). download the newest code:
git clone git://git.videolan.org/x264.git
2). configure the x264:
./configure --enable-shared
3). make && sudo make install
2. ffmpeg
1).download the newest code:
git clone git://source.ffmpeg.org/ffmpeg.git ffmpeg
2). configure the ffmpeg(if we don't needs AAC, we don't need "--enable-libfaac --enable-libfaad --enable-libmp3lame")
./configure --enable-gpl --enable-libfaac --enable-libfaad --enable-libmp3lame --enable-libx264
3).make && sudo make install
- using FFMPEG to setup HLS server on Ubuntu
- Using pulseaudio to setup sound server on Ubuntu
- use ffmpeg to setup streaming server on android
- use ffmpeg to setup streaming server on android
- setup telnet server on Ubuntu
- setup tftp server on ubuntu
- Setup FTP Server on Ubuntu
- Setup GIT server on ubuntu 9.04
- Setup Syslog with LogAnalyzer on Ubuntu Server
- Setup SVN server on Ubuntu 14.04
- how to setup SSH on ubuntu
- How to setup VPN server (PPTP on CentOS, RedHat and Ubuntu)
- using pyodbc on ubuntu to insert a image field on SQL Server
- How to setup do1q packets using wireshark on windows.
- How to setup FTP server in ubuntu
- How to setup a Ubuntu Server?
- Quick Subversion (SVN) Server Setup on Ubuntu Server 12.04
- How to Setup DNS ( Bind ) Server on CentOS, RHEL 6
- 面向对象程序设计思想&继承与关键字(5.22)
- 集团信息化之路 在线销售系统及在线收款系统成功签约
- STC89C52单片机——串口发送程序2
- 第12周上机实践项目1——教师兼干部类
- lua中的table.getn()的一些注意事项
- using FFMPEG to setup HLS server on Ubuntu
- 2、类和对象-实例变量可见度
- 功能复杂且包含及时通讯功能的app后台系统架构
- C++线索二叉树求最矮公共父亲节点
- Java压缩技术(一) ZLib
- 源码过滤器
- POJ 2262
- Java压缩技术(二) ZIP压缩——Java原生实现
- jstl