Find Jobs
Hire Freelancers

FFMPEG is timing out and getting killed before completing process

$10-100 USD

Chiuso
Pubblicato più di 7 anni fa

$10-100 USD

Pagato al completamento
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(); }
Rif. progetto: 12150283

Info sul progetto

10 proposte
Progetto a distanza
Attivo 7 anni fa

Hai voglia di guadagnare un po'?

I vantaggi delle offerte su Freelancer

Imposta il tuo budget e le scadenze
Fatti pagare per il lavoro svolto
Delinea la tua proposta
La registrazione e le offerte sui lavori sono gratuite
10 freelance hanno fatto un'offerta media di $125 USD
Avatar dell'utente
Hello. More 20 years programming experience. I need more details to set real time and price. Regards. -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
$111 USD in 5 giorni
4,8 (31 valutazioni)
5,1
5,1
Avatar dell'utente
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 in 1 giorno
5,0 (21 valutazioni)
4,3
4,3
Avatar dell'utente
I am java developer, I can fix it in next 12 hours and deliver you task. Thanks Amit
$100 USD in 1 giorno
4,7 (8 valutazioni)
3,4
3,4
Avatar dell'utente
I can resolv your problem friend....................................................................................
$61 USD in 1 giorno
5,0 (2 valutazioni)
2,9
2,9
Avatar dell'utente
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 in 1 giorno
0,0 (0 valutazioni)
0,0
0,0

Info sul cliente

Bandiera: UNITED STATES
Thiensville, United States
4,9
136
Metodo di pagamento verificato
Membro dal ago 11, 2010

Verifica del cliente

Grazie! Ti abbiamo inviato tramite email il link per richiedere il tuo bonus gratuito.
Non è stato possibile inviarti l'email. Riprova per piacere.
di utenti registrati di lavori pubblicati
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Caricamento anteprima
Autorizzazione per la geolocalizzazione concessa.
La tua sessione è scaduta ed è stato effettuato il log out. Accedi nuovamente per piacere.