-2

I would like to call on ffmpeg to split a video into frames, I used

Process p=Runtime.getRuntime().exec("ffmpeg -i /home/video.mp4 -t 100 -filter:v \"fps=fps=60\" /home/%d.jpeg");
p.waitFor();

But I don't get the desired result. Nothing happens to the video. How do invoke ffmpeg from java correctly

EDIT

Additionally when I invoke ffmpeg without any arguments that have quotes in them it works fine.

Why is this getting voted down??

Srini
  • 1,619
  • 1
  • 19
  • 34
  • 1. Have you tried giving the full path to ffmpeg ? 2. What is the error output of this command (which can be retrieved by reading the p.getErrorStream()) ? – Parasu Mar 10 '15 at 11:01
  • yes. I did try /usr/bin/ffmpeg. I log the command to stdout. When I copy and paste it in my terminal it works like a charm. The error stream is blank – Srini Mar 10 '15 at 11:04

1 Answers1

0

Well it turns out it was an issue with how runtime exec processes arguments which have quotes in them

Srini
  • 1,619
  • 1
  • 19
  • 34