没有合适的资源?快使用搜索试试~ 我知道了~
资源推荐
资源详情
资源评论
package com.hust.hui.alarm.common.test.ffmpeg;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
/**
* @program: mayun-quick_Netty
* @description:
* @author: Mr.Liu
* @create: 2019-04-01 15:12
**/
public class ffmpeg_test extends Thread{
/**
* 运行ffmpeg指令(会弹窗)多线程就不会 但是要删掉指令里面的start指令
*/
public static void mainss(){
//调用电脑摄像头测试(不太好)
String testCam = "cmd /c ffmpeg -f dshow -i video=\"USB2.0 VGA UVC WebCam\" -f mpegts -codec:v mpeg1video -s 640x480 -b:v 1000k -bf 0 \"rtmp://localhost:1935/live/test\"";
//调用网络摄像头rtsp转为rtmp并推向Nginx服务器
//为了不弹出cmd窗口 就使用多线程执行当前方法 并且要删掉 下面 all 里面的前面的 start 指令
String all = "cmd /c start ffmpeg -re -rtsp_transport tcp -i \"rtsp://admin:6512xiaobinbin@162.158.0.64:554/h264/ch1/main/av_stream\" " +
"-f flv -vcodec libx264 -vprofile baseline -acodec aac -ar 44100 -strict -2 -ac 1 -f flv -s 640x480 -q 10 \"rtmp://localhost:1935/live/test\" ";
String line =null;
StringBuilder sb = new StringBuilder();
Runtime runtime = Runtime.getRuntime();
try {
System.out.println(all);
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
/**
* @program: mayun-quick_Netty
* @description:
* @author: Mr.Liu
* @create: 2019-04-01 15:12
**/
public class ffmpeg_test extends Thread{
/**
* 运行ffmpeg指令(会弹窗)多线程就不会 但是要删掉指令里面的start指令
*/
public static void mainss(){
//调用电脑摄像头测试(不太好)
String testCam = "cmd /c ffmpeg -f dshow -i video=\"USB2.0 VGA UVC WebCam\" -f mpegts -codec:v mpeg1video -s 640x480 -b:v 1000k -bf 0 \"rtmp://localhost:1935/live/test\"";
//调用网络摄像头rtsp转为rtmp并推向Nginx服务器
//为了不弹出cmd窗口 就使用多线程执行当前方法 并且要删掉 下面 all 里面的前面的 start 指令
String all = "cmd /c start ffmpeg -re -rtsp_transport tcp -i \"rtsp://admin:6512xiaobinbin@162.158.0.64:554/h264/ch1/main/av_stream\" " +
"-f flv -vcodec libx264 -vprofile baseline -acodec aac -ar 44100 -strict -2 -ac 1 -f flv -s 640x480 -q 10 \"rtmp://localhost:1935/live/test\" ";
String line =null;
StringBuilder sb = new StringBuilder();
Runtime runtime = Runtime.getRuntime();
try {
System.out.println(all);
资源评论
- 3160148432023-04-21都不能下载 #毫无价值
- nqyfeng2019-08-15不错错粗粗哦错错错
- fxz19822021-05-24骗分的垃圾~~~
- 爱好打劫2019-11-06很坑,就一个类。内容我已经贴出来了 https://www.wenyangchou.com/blog/article/34
1024-iot-SaltIce
- 粉丝: 3627
- 资源: 9
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功