mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2024-11-21 01:13:37 +08:00
ffmpeg命令支持相对路径
This commit is contained in:
parent
bcb2810c62
commit
26d0589bf5
@ -17,7 +17,7 @@ snapRoot=./www/snap/
|
||||
defaultSnap=./www/logo.png
|
||||
|
||||
[ffmpeg]
|
||||
#FFmpeg可执行程序绝对路径
|
||||
#FFmpeg可执行程序路径,支持相对路径/绝对路径
|
||||
bin=/usr/bin/ffmpeg
|
||||
#FFmpeg拉流再推流的命令模板,通过该模板可以设置再编码的一些参数
|
||||
cmd=%s -re -i %s -c:a aac -strict -2 -ar 44100 -ab 48k -c:v libx264 -f flv %s
|
||||
|
@ -90,7 +90,7 @@ void FFmpegSource::play(const string &ffmpeg_cmd_key, const string &src_url,cons
|
||||
}
|
||||
}
|
||||
|
||||
char cmd[1024] = {0};
|
||||
char cmd[2048] = {0};
|
||||
snprintf(cmd, sizeof(cmd), ffmpeg_cmd.data(), File::absolutePath("", ffmpeg_bin).data(), src_url.data(), dst_url.data());
|
||||
auto log_file = ffmpeg_log.empty() ? "" : File::absolutePath("", ffmpeg_log);
|
||||
_process.run(cmd, log_file);
|
||||
|
Loading…
Reference in New Issue
Block a user