Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

视频切片失败 #70

Open
wh19990906 opened this issue May 28, 2024 · 3 comments
Open

视频切片失败 #70

wh19990906 opened this issue May 28, 2024 · 3 comments

Comments

@wh19990906
Copy link

环境:mac m1
java11
mac版: ffmpeg

in:./config/LiveRecord/online/douyu/开开丶0510_2024-05-28 13_55_33.flv 视频分割失败。

image
@Geniusay
Copy link
Owner

mac系统没研究,之后研究

@wh19990906
Copy link
Author

wh19990906 commented May 31, 2024

String ffmpegCmd = FFMPEG_PATH + " -i " + """+inputFilePath+""" + " -ss " + start + " -to " + end + " -c copy " + """+outputFilePath+""" +" -y";
System.out.println(ffmpegCmd);
// 执行FFmpeg命令
String[] cmds = {"/bin/sh", "-c", ffmpegCmd};
Process process = Runtime.getRuntime().exec(cmds);

mac下执行步骤:
1、添加 mac 版 ffmpeg
2、修改 FFMPEG_PATH
3、修改代码执行命令

@Geniusay
Copy link
Owner

Geniusay commented Jun 1, 2024

会做个策略 适配不同的操作系统

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants