動画配信サーバー設定
をテンプレートにして作成
[
トップ
] [
新規
|
一覧
|
検索
|
最終更新
|
ヘルプ
|
ログイン
]
開始行:
[[CentOS7]]
*動画配信サーバー設定 [#n84e66a2]
**動画をHLS形式に変換 [#zc646bcf]
変換元動画をWinSCPで動画格納先へ格納する。
|BGCOLOR(black):COLOR(white):|c
|[root@centos ~]# cd /usr/local/nginx/html/vod &color(li...
|[root@centos ~]# sh /root/convert_to_hls.sh &color(lime)...
|convert completed. => xxxxxxxx.m3u8 &color(lime){ ← 動...
|[root@centos ~]# cd &color(lime){← 動画格納先ディレク...
**動画視聴用ページ作成 [#xea584ee]
|BGCOLOR(black):COLOR(white):|c
|[root@centos ~]# vi /usr/local/nginx/html/vod.html &col...
<!DOCTYPE html>
<html lang="en" class="">
<head>
<title>ONDEMAND</title>
<link href="//vjs.zencdn.net/5.11/video-js.min.css" r...
<script src="//cdn.jsdelivr.net/hls.js/latest/hls.min...
</head>
<body>
<video id="video" class="video-js vjs-default-skin" widt...
<script type="text/javascript">
var source = '/vod/動画ファイル名.m3u8';
var ua = navigator.userAgent;
if (ua.indexOf('iPhone') > 0 || ua.indexOf('iPad') > ...
// iOS
document.write('<source src=' + source + ' type="...
document.write('</video>');
}else{
// OTHER
document.write('</video>');
if(Hls.isSupported()) {
var video = document.getElementById('video');
var hls = new Hls();
hls.loadSource(source);
hls.attachMedia(video);
hls.on(Hls.Events.MANIFEST_PARSED,function() {
video.play();
});
}
}
</script>
</body>
</html>
**認証用ユーザー名/パスワード登録 [#s50418bb]
|BGCOLOR(black):COLOR(white):|c
|[root@centos ~]# mkdir /usr/local/nginx/passwd/ &color(...
|[root@centos ~]# yum -y install httpd-tools &color(lime...
|[root@centos ~]# htpasswd -b -c -m /usr/local/nginx/pass...
|Adding password for user xxxxxxxx|
終了行:
[[CentOS7]]
*動画配信サーバー設定 [#n84e66a2]
**動画をHLS形式に変換 [#zc646bcf]
変換元動画をWinSCPで動画格納先へ格納する。
|BGCOLOR(black):COLOR(white):|c
|[root@centos ~]# cd /usr/local/nginx/html/vod &color(li...
|[root@centos ~]# sh /root/convert_to_hls.sh &color(lime)...
|convert completed. => xxxxxxxx.m3u8 &color(lime){ ← 動...
|[root@centos ~]# cd &color(lime){← 動画格納先ディレク...
**動画視聴用ページ作成 [#xea584ee]
|BGCOLOR(black):COLOR(white):|c
|[root@centos ~]# vi /usr/local/nginx/html/vod.html &col...
<!DOCTYPE html>
<html lang="en" class="">
<head>
<title>ONDEMAND</title>
<link href="//vjs.zencdn.net/5.11/video-js.min.css" r...
<script src="//cdn.jsdelivr.net/hls.js/latest/hls.min...
</head>
<body>
<video id="video" class="video-js vjs-default-skin" widt...
<script type="text/javascript">
var source = '/vod/動画ファイル名.m3u8';
var ua = navigator.userAgent;
if (ua.indexOf('iPhone') > 0 || ua.indexOf('iPad') > ...
// iOS
document.write('<source src=' + source + ' type="...
document.write('</video>');
}else{
// OTHER
document.write('</video>');
if(Hls.isSupported()) {
var video = document.getElementById('video');
var hls = new Hls();
hls.loadSource(source);
hls.attachMedia(video);
hls.on(Hls.Events.MANIFEST_PARSED,function() {
video.play();
});
}
}
</script>
</body>
</html>
**認証用ユーザー名/パスワード登録 [#s50418bb]
|BGCOLOR(black):COLOR(white):|c
|[root@centos ~]# mkdir /usr/local/nginx/passwd/ &color(...
|[root@centos ~]# yum -y install httpd-tools &color(lime...
|[root@centos ~]# htpasswd -b -c -m /usr/local/nginx/pass...
|Adding password for user xxxxxxxx|
ページ名: