{"action":"opened","issue":{"url":"https://api.github.com/repos/antpersan/CutVideoAndroid/issues/1","labels_url":"https://api.github.com/repos/antpersan/CutVideoAndroid/issues/1/labels{/name}","comments_url":"https://api.github.com/repos/antpersan/CutVideoAndroid/issues/1/comments","events_url":"https://api.github.com/repos/antpersan/CutVideoAndroid/issues/1/events","html_url":"https://github.com/antpersan/CutVideoAndroid/issues/1","id":98668299,"number":1,"title":"Handling spaces in filenames of ffmpeg command ","user":{"login":"bhuvneshvarma","id":8223138,"avatar_url":"https://avatars.githubusercontent.com/u/8223138?v=3","gravatar_id":"","url":"https://api.github.com/users/bhuvneshvarma","html_url":"https://github.com/bhuvneshvarma","followers_url":"https://api.github.com/users/bhuvneshvarma/followers","following_url":"https://api.github.com/users/bhuvneshvarma/following{/other_user}","gists_url":"https://api.github.com/users/bhuvneshvarma/gists{/gist_id}","starred_url":"https://api.github.com/users/bhuvneshvarma/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bhuvneshvarma/subscriptions","organizations_url":"https://api.github.com/users/bhuvneshvarma/orgs","repos_url":"https://api.github.com/users/bhuvneshvarma/repos","events_url":"https://api.github.com/users/bhuvneshvarma/events{/privacy}","received_events_url":"https://api.github.com/users/bhuvneshvarma/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-08-03T04:15:54Z","updated_at":"2015-08-03T04:15:54Z","closed_at":null,"body":"I am using below ffmpeg command to cut videos.It works fine for video file names which doesn't have spaces but didn't worked for filenames having spaces..\r\n\r\n    execFFmpegBinary(\"-i \" + path + \" -ss \" + startMs / 1000 + \" -to \" + endMs / 1000 + \" -strict -2 -async 1 \" + dest.getAbsolutePath());\r\n\r\n\r\nwhere  `path` is the path of original video.\r\n\r\n`startMs` is the initial time of video form where you want to cut(start time of cropped video)\r\n\r\n`endMs` is the time of video upto which you want to cut(end time of cropped video)\r\n\r\n`dest` is the path where you want to save the cut/cropped video\r\n \r\n\r\n\r\nThe problem is with source path(path).I have seen [this][1] answer.But here i don't know the complete path since I am fetching paths of all the videos from storage. I need to handle spaces in filenames.\r\nFor resolving that i tried using string formatter as shown in below code .But with that it didn't worked in both cases.Where am i going wrong and how can i resolve the issue?\r\n\r\n    String command = String.format(\"-i \\\"%s\\\" -ss %d -to %d -strict -2 -async 1 \\\"%s\\\" \",path,startMs / 1000 , endMs / 1000, dest.getAbsolutePath());\r\n    execFFmpegBinary(command);\r\n\r\n\r\n  [1]: http://stackoverflow.com/questions/22766111/ffmpeg-not-working-with-filenames-that-have-whitespace?lq=1"}}