java中rtsp转m3u8_记录:通过ffmpeg rtsp转 http m3u8
环境 Windows 10
大华rtsp直播 转 http请求m3u8
ffmpeg -rtsp_transport tcp -i "rtsp://账号:密码@IP:端口/cam/realmonitor?channel=1&subtype=0" -fflags flush_packets -max_delay 1 -an -flags -global_header -hls_time 1 -hls_list_size 3 -hls_wrap 3 -vcodec copy -s 216x384 -b 1024k -y C:/Users/lenovo/Downloads/live/nginx-1.12.2/nginx-1.12.2/html/channel101.m3u8
nginx.conf 中内容如下:
#user nobody;
worker_processes 1;
#error_log logs/error.log;
#error_log logs/error.log notice;
#error_log logs/error.log info;
#pid logs/nginx.pid;
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
#log_format main '$remote_addr - $remote_user [$time_local] "$request" '
# '$status $body_bytes_sent "$http_referer" '
# '"$http_user_agent" "$http_x_forwarded_for"';
#access_log logs/access.log main;
sendfile on;
#tcp_nopush on;
#keepalive_timeout 0;
keepalive_timeout 65;
#gzip on;
server {
listen 20000;
server_name localhost;
#charset koi8-r;
#access_log logs/host.access.log main;
location / {
root html;
index index.html index.htm;
}
location /hls {
types{
application/vnd.apple.mpegurl m3u8;
video/mp2t ts;
}
root html;
add_header Cache-Control no-cache;
add_header Access-Control-Allow-Origin *;
}
#error_page 404 /404.html;
# redirect server error pages to the static page /50x.html
#
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}
# proxy the PHP scripts to Apache listening on 127.0.0.1:80
#
#location ~ \.php$ {
# proxy_pass http://127.0.0.1;
#}
# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
#
#location ~ \.php$ {
# root html;
# fastcgi_pass 127.0.0.1:9000;
# fastcgi_index index.php;
# fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name;
# include fastcgi_params;
#}
# deny access to .htaccess files, if Apache's document root
# concurs with nginx's one
#
#location ~ /\.ht {
# deny all;
#}
}
# another virtual host using mix of IP-, name-, and port-based configuration
#
#server {
# listen 8000;
# listen somename:8080;
# server_name somename alias another.alias;
# location / {
# root html;
# index index.html index.htm;
# }
#}
# HTTPS server
#
#server {
# listen 443 ssl;
# server_name localhost;
# ssl_certificate cert.pem;
# ssl_certificate_key cert.key;
# ssl_session_cache shared:SSL:1m;
# ssl_session_timeout 5m;
# ssl_ciphers HIGH:!aNULL:!MD5;
# ssl_prefer_server_ciphers on;
# location / {
# root html;
# index index.html index.htm;
# }
#}
}
启动nginx 用vlc播放器播放 http://localhost:20000/channel101.m3u8
标签:index,http,log,m3u8,server,html,location,error,ffmpeg
来源: https://www.cnblogs.com/zmwf/p/12862659.html
java中rtsp转m3u8_记录:通过ffmpeg rtsp转 http m3u8相关推荐
- java中 fff_Java:要实现记录当前时间为yyyymmddhhmissfff的时间戳该怎么简单实现呢=。=...
import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.Date; public cl ...
- java记录访问次数_使用java中的session来记录访问次数
Created by IntelliJ IDEA. User: DELL Date: 2018/4/19 Time: 17:06 To change this template use File | ...
- slf4j+log4j在Java中实现日志记录
小Alan今天来跟大家聊聊开发中既简单又常用但必不可少的一样东西,那是什么呢?那就是日志记录,日志输出,日志保存. 后面就统一用日志记录四个字来形容啦. 日志记录是项目的开发中必不可少的一个环节,特别 ...
- java中rtsp转m3u8_NGINX+ffmpeg 实现 大华摄像头视屏转流RTSP转RTMP或M3U8
一.准备 1.环境: windows 2.开发工具: ffmpeg.nginx(代理服务器)nginx-rmtp-module(nginx服务器的流媒体插件).vlc(兼容性播放器) 3.原理: ng ...
- 获取mysql可行方法_Mysql学习Java实现获得MySQL数据库中所有表的记录总数可行方法...
<Mysql学习Java实现获得MySQL数据库中所有表的记录总数可行方法>要点: 本文介绍了Mysql学习Java实现获得MySQL数据库中所有表的记录总数可行方法,希望对您有用.如果有 ...
- Java中的数组,列表,集合,映射,元组,记录文字
有时,当我对JavaScript的强大功能和表现力感到兴奋时,我发现自己错过了Java世界中的一两个功能. 除了lambda表达式/闭包或任何您想称为"匿名函数"的东西之外,它还对 ...
- java类无法调用值,Kotlin无法调用到Java中定义的interface类的问题记录
问题产生原因概述 一个kotlin类,调用一个Java类中的一个方法.引发了下面这个错误. 因为我在kotlin中调用了了java代码中定义的一个接口,然后就报错一个IllegalAccessErro ...
- HBase中此类异常解决记录org.apache.hadoop.ipc.RemoteException(java.io.IOException):
HBase中此类异常解决记录org.apache.hadoop.ipc.RemoteException(java.io.IOException): 参考文章: (1)HBase中此类异常解决记录org ...
- 在java中使用FFmpeg将图片和音频合成视频
下面分享一个我之前在java中使用FFmpeg将图片和音频合成视频的demo. package com.xxx.console.videoProcess;import java.awt.image.B ...
最新文章
- 《深入理解Java虚拟机》(第二版)学习2:垃圾收集算法
- ormlite android studio,OrmLite-android入门体验
- java servlet 请求_Java中前台JSP请求Servlet实例(http+Servlet)
- imagecomposition工程分析
- 6.边缘检测:梯度——回顾、简化的图像、边缘概念_1
- Spring for Apache Hadoop 1.0 GA
- 出现身份验证错误 要求的函数不受支持_学习使用Kotlin创建Android应用程序第3部分:身份验证登录...
- 根据dpr设置html fontsize,如何为不同移动设备设置html不同的font-size?
- 实用主义学python 云盘_麻瓜编程实用主义学Python2018,资源教程下载
- H3C|HUAWEI 交换机Comware系统的基本使用(以HUAWEI S5720为例)
- HTML iframe设置背景透明
- 鹏业云计价i20清单与定额录入
- VSCode HTML文件 英文感叹号 ! + Tab 没有出现模板 解决方法
- WIN10桌面文件夹图标变黑解决方法~
- jieba分词原理 ‖ 关键词抽取
- LeetCode 39 组合总和
- memcmp用法实现
- 切尔西对阵巴塞罗那的欧冠半决赛
- matplotlib基础知识(图形绘制坐标轴、标签、刻度字体设置图例脊柱移动风格样式多图布局双轴显示)(1)
- vivox21支持html,【vivoX21评测】看完vivo X21这20个重点,我忍不住剁手_vivo X21_手机评测-中关村在线...