日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程语言 > php >内容正文

php

流媒体服务器 php,nginx 流媒体服务器 FFmpeg 截图

發(fā)布時間:2023/12/2 php 35 豆豆
生活随笔 收集整理的這篇文章主要介紹了 流媒体服务器 php,nginx 流媒体服务器 FFmpeg 截图 小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.

預備:

yum install -y automake autoconf libtool gcc gcc-c++

1.安裝php

yum -y install php-gd php-xml php-mbstring php-ldap php-pear php-xmlrpc php-devel php-fpm

2.安裝 nginx

yum –y install nginx nginx-devel

3.安裝FFmpeg

安裝 Install ffmpeg 等模塊

yum -y install ffmpeg ffmpeg-devel

4.安裝 php ffmpeg 擴展

tar jxvf ffmpeg-php-0.6.0.tbz2

cd ffmpeg-php-0.6.0

phpize

./configure

make

make install

切換到 php.d

生成 ffmpeg.ini文件 內(nèi)容:extension=ffmpeg.so

5.安裝yamdi

yadmi的作用是為flv文件添加關鍵幀,才能實現(xiàn)拖動播放

#下載yadmi

#安裝yadmi

tar xzvf yamdi-1.4.tar.gz

cd yamdi-1.4

make && make install

使用方法:yamdi -i input.flv -o out.flv

6.配置nginx

http {

include?????? mime.types;

default_type? application/octet-stream;

log_format main? ‘$remote_addr – $remote_user [$time_local] ‘

‘"$request" $status $bytes_sent ‘

‘"$http_referer" "$http_user_agent" ‘

‘"$gzip_ratio"’;

keepalive_timeout? 60;

server_names_hash_bucket_size? 128;

client_header_buffer_size??? 32k;

large_client_header_buffers? 4 32k;

access_log off;

gzip on;

gzip_min_length? 1100;

gzip_buffers???? 4 8k;

gzip_types?????? text/plain;

output_buffers?? 1 32k;

postpone_output? 1460;

client_header_timeout? 3m;

client_body_timeout??? 3m;

send_timeout?????????? 3m;

sendfile??????????????? on;

tcp_nopush????????????? on;

tcp_nodelay???????????? on;

######################################################################

server {

listen?????? 80;

server_name? 192.168.1.145;

root??? /var/www/html/flv/;

limit_rate_after 5m;??? ####在flv視頻文件下載了5M以后開始限速

limit_rate 512k;???????? ####速度限制為512K

index?? index.html;

charset utf-8;

location ~ \.flv {

flv;

}

error_page?? 500 502 503 504? /50x.html;

location = /50x.html {

root?? html;

}

}

}

7.重啟php-fpm? nginx 測試

下載開源的JW Player,上傳 測試 12.flv視頻

8.生成時間截圖:

ffmpeg -i 12.flv -y -f mjpeg -ss 3 -vframes 1 -t 0.2 -s 320×240 test.jpg

9.瀏覽器訪問測試

type:協(xié)議類型

file:視頻源文件

image:視頻截圖文件

最后編輯:2015-01-04作者:sunny5156

喜歡技術....

總結

以上是生活随笔為你收集整理的流媒体服务器 php,nginx 流媒体服务器 FFmpeg 截图的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網(wǎng)站內(nèi)容還不錯,歡迎將生活随笔推薦給好友。