天天看點

java修改conf檔案内容

需求修改conf配置内容,節點内容如下

listen 1935;

max_connections 1000;

#daemon off;

#srs_log_tank console;

vhost defaultVhost {

ingest livestream {

enabled on;

input {

type file;

url rtsp://guest:[email protected]:554/stream0/low;

}

ffmpeg ./objs/ffmpeg/bin/ffmpeg;

engine {

enabled off;

output rtmp://192.168.0.45/live/10002-002-L;

ingest livestest {

url rtsp://guest:[email protected]:554/stream0/high;

output rtmp://192.168.0.45/live/10001-001-L;

建立實體對象

public class IngestModleVo {

public class IngestVo {

private String keyName; //鍵的名稱

private String isEnabled; //是否啟用,即有效

private String type;

private String urlAdd;

private String ffmpeg;

private String enginEnabled;

private String enginOutput;

public class GeneralFileTest {