Ffmpeg File Not Found Exception, No Such File Or Directory
I am getting the No such file or directory exception on video trimming. video path : /storage/emulated/0/Pictures/Instagram/Fast & Furious 7 - Get Low Extended Version Video.mp
Solution 1:
Try to replace
execFFmpegBinary("-i " + path + " -ss " + startMs / 1000 +
" -to " + endMs / 1000 + " -c copy " + destPath);
with
execFFmpegBinary(newString[] {"-i", path, "-ss", "" + startMs / 1000,
"-to", "" + endMs / 1000, "-c", "copy", destPath});
The fix to ffmpeg-android-java dates back to 2015.
Solution 2:
Try to escape the spaces with \
execFFmpegBinary("-i '/storage/emulated/0/Pictures/Instagram/Fast\ &\ Furious\ 7\ -\ Get\ Low\ Extended\ Version\ Video.mp4'" + "-ss " + startMs / 1000 +
" -to " + endMs / 1000 + " -c copy " + destPath);
Solution 3:
Replying late to this question, but I thought I would add it anyway.. This is how I execute commands:
String[] s = {"-i" ,sourcePath,"-crf","18","-c:v","libx264","-preset","ultrafast",directoryToStore+"/"+outputName};
s.execFFmpegBinary();
I've tested using files with name spaces and it works fine.
Solution 4:
Just surround your path with single quotations. The command is confused with the spaces in the file name.
Post a Comment for "Ffmpeg File Not Found Exception, No Such File Or Directory"