FFMPEG is timing out and getting killed before completing process

Cerrado

Descripción

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/[url removed, login to view]" -ss 00:22:38 -t 00:23:16 -async 1 "/uploads/files/[url removed, login to view]"

problem is [url removed, login to view]() 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 = [url removed, login to view])

public void trimVideo(@RequestParam Long id, @RequestParam("start-time") Integer startTime, @RequestParam("end-time") Integer endTime) {

[url removed, login to view](getClass().getName()).log([url removed, login to view], "called");

Document one = [url removed, login to view](id);

[url removed, login to view](getClass().getName()).log([url removed, login to view], "called" + [url removed, login to view]);

String inputFile = [url removed, login to view]("%20"," ");

final String movieFile = "/uploads" + inputFile;

final String resultFile = "/uploads/files/" + id + "-" + startTime + "-" + endTime + ".mp4";

//ffmpeg -i [url removed, login to view] -ss 00:00:03 -t 00:00:08 -async 1 [url removed, login to view]

Time start = new Time(startTime * 1000);

Time end = new Time(endTime * 1000);

final String startTimeSec = [url removed, login to view]();

final String endTimeSec = [url removed, login to view]();

Runnable runnable = new Runnable() {

public void run() {

try {

File file = new File(resultFile);

if (![url removed, login to view]()) {

final String command = "ffmpeg -i \"" + movieFile + "\" -ss " + startTimeSec + " -t " + endTimeSec + " -async 1 \"" + resultFile + "\"";

[url removed, login to view](getClass().getName()).log([url removed, login to view], "running: " + command);

ProcessBuilder pb = new ProcessBuilder("ffmpeg", "-i", movieFile, "-ss", startTimeSec, "-t", endTimeSec, "-async", "1", resultFile);

pb = [url removed, login to view](true); // equivalent of 2>&1

Process p = [url removed, login to view]();

[url removed, login to view]();

file = new File(resultFile);

[url removed, login to view](true,false);

} else {

[url removed, login to view](true,false);

}

} catch (Throwable e) {

[url removed, login to view](getClass().getName()).log([url removed, login to view], "error while trim video", e);

[url removed, login to view]();

}

}

};

new Thread(runnable).start();

}

Habilidades: Java, Linux, Arquitectura de software, Administración de sistemas

Ver más: mysqld_safe mysqld process hanging pid killed, ffmpeg unable parse option value brdo dct8x8 bpyramid, ffmpeg unable parse option value brdo, process ffmpeg read, php ffmpeg process bar, ffmpeg process, bash process video ffmpeg, ajax convert ffmpeg process, chances getting job completion simply accounting, protect process killed, redhat monitoring scp completion process, refresh system tray killed process, killed process icon tray, getting current process autoit, process getting preferred vendor list, start process completing setup project, vbnet getting process information task manager, getting current url firefox process, process getting gift voucher

ID de proyecto: #12150283

11 los freelancers están ofertando un promedio de $123 para este trabajo.

$55 USD en 1 día
(36 comentarios)
5.1
neosaransh

Hello, Greetings. Hope you are doing well. I am expertise in cloud solution of AWS, Openstack, Rackspace, Google Cloud, Azure etc. I work as cloud solution architect. I am experienced in server migration with Linux ser Más

$61 USD en 0 días
(43 comentarios)
4.5
zkutch

Hello. More 20 years programming experience. I need more details to set real time and price. Regards. -------------------------------------------------------------------------------------------------------------- Más

$111 USD en 5 días
(22 comentarios)
4.7
$15 USD en 1 día
(53 comentarios)
4.5
Shchipunov

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 en 1 día
(21 comentarios)
4.3
$100 USD en 1 día
(4 comentarios)
3.7
ams53

I am java developer, I can fix it in next 12 hours and deliver you task. Thanks Amit

$100 USD en 1 día
(5 comentarios)
2.8
andranik1990

I can resolv your problem friend....................................................................................

$61 USD en 1 día
(1 comentario)
2.5
lopezml

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 en 1 día
(0 comentarios)
0.0
$616 USD en 10 días
(0 comentarios)
0.0
FCEngineers

Hello, Before you select a part time developer from here, visit us for 5 minutes (Fugacode.com) And if you like what you see, contact us. That's all! "Why hire part time college students? when you can hire profe Más

$61 USD en 1 día
(0 comentarios)
0.0
$83 USD en 1 día
(0 comentarios)
0.0