Find Jobs
Hire Freelancers

FFMPEG is timing out and getting killed before completing process

$10-100 USD

已关闭
已发布超过 7 年前

$10-100 USD

货到付款
I have a script that takes an mp4 file and splits it into another mp4 file. It basically takes a section like 00:22:38 to 00:23:16 and creates a new video from that time segment. The problem is that for larger files the process stops and gets killed before finishing. ffmpeg -i "/uploads/files/[login to view URL]" -ss 00:22:38 -t 00:23:16 -async 1 "/uploads/files/[login to view URL]" problem is [login to view URL]() does not wait and the process is killed without any errors in the log file. the process actually starts but killed before completion. This is the script that is called. @RequestMapping(value = "/videotrim", method = [login to view URL]) public void trimVideo(@RequestParam Long id, @RequestParam("start-time") Integer startTime, @RequestParam("end-time") Integer endTime) { [login to view URL](getClass().getName()).log([login to view URL], "called"); Document one = [login to view URL](id); [login to view URL](getClass().getName()).log([login to view URL], "called" + [login to view URL]); String inputFile = [login to view URL]("%20"," "); final String movieFile = "/uploads" + inputFile; final String resultFile = "/uploads/files/" + id + "-" + startTime + "-" + endTime + ".mp4"; //ffmpeg -i [login to view URL] -ss 00:00:03 -t 00:00:08 -async 1 [login to view URL] Time start = new Time(startTime * 1000); Time end = new Time(endTime * 1000); final String startTimeSec = [login to view URL](); final String endTimeSec = [login to view URL](); Runnable runnable = new Runnable() { public void run() { try { File file = new File(resultFile); if (![login to view URL]()) { final String command = "ffmpeg -i \"" + movieFile + "\" -ss " + startTimeSec + " -t " + endTimeSec + " -async 1 \"" + resultFile + "\""; [login to view URL](getClass().getName()).log([login to view URL], "running: " + command); ProcessBuilder pb = new ProcessBuilder("ffmpeg", "-i", movieFile, "-ss", startTimeSec, "-t", endTimeSec, "-async", "1", resultFile); pb = [login to view URL](true); // equivalent of 2>&1 Process p = [login to view URL](); [login to view URL](); file = new File(resultFile); [login to view URL](true,false); } else { [login to view URL](true,false); } } catch (Throwable e) { [login to view URL](getClass().getName()).log([login to view URL], "error while trim video", e); [login to view URL](); } } }; new Thread(runnable).start(); }
项目 ID: 12150283

关于此项目

10提案
远程项目
活跃7 年前

想赚点钱吗?

在Freelancer上竞价的好处

设定您的预算和时间范围
为您的工作获得报酬
简要概述您的提案
免费注册和竞标工作
10威客以平均价$125 USD来参与此工作竞价
用户头像
Hello. More 20 years programming experience. I need more details to set real time and price. Regards. -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
$111 USD 在5天之内
4.8 (31条评论)
5.1
5.1
用户头像
Hello, I know how to solve the problem. I have great experience in performing tasks. I developed media-server, that handled both video and audio, uncluding convertation. I also developed a FFmpeg wrapper for Java.
$60 USD 在1天之内
5.0 (21条评论)
4.3
4.3
用户头像
I am java developer, I can fix it in next 12 hours and deliver you task. Thanks Amit
$100 USD 在1天之内
4.7 (8条评论)
3.4
3.4
用户头像
I can resolv your problem friend....................................................................................
$61 USD 在1天之内
5.0 (2条评论)
2.9
2.9
用户头像
You do not mention which OS you are running on, but may I assume you're on Windows 7? I might be wrong, but I think I know where the problem could be and how to fix it. Thanks! Luis
$90 USD 在1天之内
0.0 (0条评论)
0.0
0.0

关于客户

UNITED STATES的国旗
Thiensville, United States
4.9
136
付款方式已验证
会员自8月 11, 2010起

客户认证

谢谢!我们已通过电子邮件向您发送了索取免费积分的链接。
发送电子邮件时出现问题。请再试一次。
已注册用户 发布工作总数
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
加载预览
授予地理位置权限。
您的登录会话已过期而且您已经登出,请再次登录。