1、srs下面的ffmpeg,编译后无法运行
./ffmpeg -h
./ffmpeg: error while loading shared libraries: libXv.so.1: cannot open shared object file: No such file or directory
ffmpeg version 2.1.1 Copyright (c) 2000-2013 the FFmpeg developers
built on Mar 27 2016 11:26:41 with gcc 4.4.3 (Ubuntu 4.4.3-4ubuntu5.1)
configuration: --enable-gpl --enable-nonfree --yasmexe=/home/newdisk/ossrs/srs-2.0release/trunk/objs/ffmpeg.src/_release/bin/yasm --
prefix=/home/newdisk/ossrs/srs-2.0release/trunk/objs/ffmpeg.src/_release --cc= --enable-static --disable-shared --disable-debug --extra-
cflags='-I${ffmpeg_exported_release_dir}/include' --extra-ldflags='-L${ffmpeg_exported_release_dir}/lib -lm -ldl' --disable-ffplay --disable-
ffprobe --disable-ffserver --disable-doc --enable-postproc --enable-bzlib --enable-zlib --enable-parsers --enable-libx264 --enable-libmp3lame
--enable-libfdk-aac --enable-libspeex --enable-pthreads --extra-libs=-lpthread --enable-encoders --enable-decoders --enable-avfilter --
enable-muxers --enable-demuxers
这个问题后来解决来,重启centos6.7。
rtmp://192.168.2.80:1935/live/demo
http://192.168.2.80:10080/live/demo.m3u8 //这个可以播放。必须得用jwplayer6。srs-player不支持
http://www.ossrs.net/players/jwplayer6.html?vhost=192.168.1.170&stream=livestream.flv&server=192.168.1.170&port=1935&hls_autostart=true
我在ubuntu 12.04上面测,nginx.conf中不需要添加:
location ~ \.mp4$ {
mp4;
}
但是,rtmp or HLS都不能拖动播放。这在回放中恐怕难以接受。
不过,如果我添加了mp4 location的话,就不用事先做hint操作了。但还是不支持拖动!!
在chrome下面,直接拖动播放(seek),点播如此简单啊。不过,这是只有chrome才支持!其它player要支持,还得用yamdi注入I帧才可以seek。
http://192.168.2.90:10080/44d1.mp4
//----------------------------------------------------
vod播放的url:
./ffmpeg -i 44d1.mp4 -f flv 44d1.flv
./yamdi -i 44d1.flv -o 44d1_I.flv
rtmp://192.168.2.90/vod/44d1_I.flv //注入过I-frame的,用jwplayer6来播放,可以随意随动。
http://192.168.2.90/44d1.mp4 //srsplay/VLC均不可以播放,必须得转成flv才行。
http://192.168.2.90/44d1_I.flv //可以播放。用VLC来播放,可以随意拖动。
http://192.168.2.90/hls/vod.m3u8 //这个是srs切出来的m3u8,可以播放。
http://192.168.2.90/hls/playlist.m3u8 //这个是我用cutm3u8.sh切出来的,不能播放。这说明,这个切片脚本有问题?
但不论是ngnix,还是在IIS,仅仅将上面这些文件拷到磁盘目录,是不行的,还要做MIME的映射:
即将 .m3u8和 .ts 指定好类型
application/x-mpegURL m3u8;
video/MP2T ts;
-d 10:每个切片为10秒,-p movie1:切片的名字的前缀
-u URL地址:m3u8中播放列表的地址前缀,自己cat一下生成的movie1.m3u8就知道什么用 了
测试一下,用iPhone的Safari访问一下http://121.199.47.208/hls/movie1/movie1.m3u8
./m3u8-segmenter -i ipc720p.ts -d 10 -p movie1 -m movie1.m3u8 -u http://192.168.2.90/hls/movie1/
[mpegts @ 0x8e98080] Could not find codec parameters for stream 0 (Video: mpeg2video ([2][0][0][0] / 0x0002), none): unspecified size
Consider increasing the value for the 'analyzeduration' and 'probesize' options
Could not read stream information
>>原因:ffmpeg转ts命令不对!应该是用:
./ffmpeg -i ipc720p.mp4 -vcodec copy -acodec copy -bsf h264_mp4toannexb ipc720p.ts
但这始终是播放不了!就srs切出来的m3m8才可以播放,但也无法做seek动作。
m3u8-segmenter只支持TS来切,对于注入I帧后再转为.ts的文件,也一样无法切m3u8片,看来HLS根本不适合做回放的格式。srs也不适合做回放,不支持seek.
http://192.168.2.90/44d1.flv
rtmp://192.168.2.90/vod/44d1.flv
./bin/nginx -p /home/newdisk/nginx/release/www/
在ubuntu 12.04下面nginx的rtmp服务很好用,移到centos平台就不行了!很多事情,不能想当然!
./ffmpeg -h
./ffmpeg: error while loading shared libraries: libXv.so.1: cannot open shared object file: No such file or directory
ffmpeg version 2.1.1 Copyright (c) 2000-2013 the FFmpeg developers
built on Mar 27 2016 11:26:41 with gcc 4.4.3 (Ubuntu 4.4.3-4ubuntu5.1)
configuration: --enable-gpl --enable-nonfree --yasmexe=/home/newdisk/ossrs/srs-2.0release/trunk/objs/ffmpeg.src/_release/bin/yasm --
prefix=/home/newdisk/ossrs/srs-2.0release/trunk/objs/ffmpeg.src/_release --cc= --enable-static --disable-shared --disable-debug --extra-
cflags='-I${ffmpeg_exported_release_dir}/include' --extra-ldflags='-L${ffmpeg_exported_release_dir}/lib -lm -ldl' --disable-ffplay --disable-
ffprobe --disable-ffserver --disable-doc --enable-postproc --enable-bzlib --enable-zlib --enable-parsers --enable-libx264 --enable-libmp3lame
--enable-libfdk-aac --enable-libspeex --enable-pthreads --extra-libs=-lpthread --enable-encoders --enable-decoders --enable-avfilter --
enable-muxers --enable-demuxers
这个问题后来解决来,重启centos6.7。
rtmp://192.168.2.80:1935/live/demo
http://192.168.2.80:10080/live/demo.m3u8 //这个可以播放。必须得用jwplayer6。srs-player不支持
http://www.ossrs.net/players/jwplayer6.html?vhost=192.168.1.170&stream=livestream.flv&server=192.168.1.170&port=1935&hls_autostart=true
我在ubuntu 12.04上面测,nginx.conf中不需要添加:
location ~ \.mp4$ {
mp4;
}
但是,rtmp or HLS都不能拖动播放。这在回放中恐怕难以接受。
不过,如果我添加了mp4 location的话,就不用事先做hint操作了。但还是不支持拖动!!
在chrome下面,直接拖动播放(seek),点播如此简单啊。不过,这是只有chrome才支持!其它player要支持,还得用yamdi注入I帧才可以seek。
http://192.168.2.90:10080/44d1.mp4
//----------------------------------------------------
vod播放的url:
./ffmpeg -i 44d1.mp4 -f flv 44d1.flv
./yamdi -i 44d1.flv -o 44d1_I.flv
rtmp://192.168.2.90/vod/44d1_I.flv //注入过I-frame的,用jwplayer6来播放,可以随意随动。
http://192.168.2.90/44d1.mp4 //srsplay/VLC均不可以播放,必须得转成flv才行。
http://192.168.2.90/44d1_I.flv //可以播放。用VLC来播放,可以随意拖动。
http://192.168.2.90/hls/vod.m3u8 //这个是srs切出来的m3u8,可以播放。
http://192.168.2.90/hls/playlist.m3u8 //这个是我用cutm3u8.sh切出来的,不能播放。这说明,这个切片脚本有问题?
但不论是ngnix,还是在IIS,仅仅将上面这些文件拷到磁盘目录,是不行的,还要做MIME的映射:
即将 .m3u8和 .ts 指定好类型
application/x-mpegURL m3u8;
video/MP2T ts;
-d 10:每个切片为10秒,-p movie1:切片的名字的前缀
-u URL地址:m3u8中播放列表的地址前缀,自己cat一下生成的movie1.m3u8就知道什么用 了
测试一下,用iPhone的Safari访问一下http://121.199.47.208/hls/movie1/movie1.m3u8
./m3u8-segmenter -i ipc720p.ts -d 10 -p movie1 -m movie1.m3u8 -u http://192.168.2.90/hls/movie1/
[mpegts @ 0x8e98080] Could not find codec parameters for stream 0 (Video: mpeg2video ([2][0][0][0] / 0x0002), none): unspecified size
Consider increasing the value for the 'analyzeduration' and 'probesize' options
Could not read stream information
>>原因:ffmpeg转ts命令不对!应该是用:
./ffmpeg -i ipc720p.mp4 -vcodec copy -acodec copy -bsf h264_mp4toannexb ipc720p.ts
但这始终是播放不了!就srs切出来的m3m8才可以播放,但也无法做seek动作。
m3u8-segmenter只支持TS来切,对于注入I帧后再转为.ts的文件,也一样无法切m3u8片,看来HLS根本不适合做回放的格式。srs也不适合做回放,不支持seek.
http://192.168.2.90/44d1.flv
rtmp://192.168.2.90/vod/44d1.flv
./bin/nginx -p /home/newdisk/nginx/release/www/
在ubuntu 12.04下面nginx的rtmp服务很好用,移到centos平台就不行了!很多事情,不能想当然!