Whenever I issue the following command no "intermediate.ts
" output file is created:
getRuntime.exec("ffmpeg -i input1.mp4 -c copy -bsf:v h264_mp4toannexb -f mpegts intermediate1.ts")
Even when using a String[]
like this:
String[] cmd = {
"sh",
"-c",
"./ffmpeg -i input1.mp4 -c copy -bsf:v h264_mp4toannexb -f mpegts intermediate1.ts"
}
But when I open terminal emulator and write the same thing I get the correct output I'm looking for. Through Java I can get output from:
ffmpeg -help
But cannot create files using FFMpeg and Java's getRuntime.exec()
. What am I doing wrong?