Reputation: 18
I am using writingminds:FFmpegAndroid:0.3.2 library.and facing this permission denied issue.
D/Video merging :: progress: /storage/emulated/0/DCIM/Camera/VID_20171109_070248.mp4: Permission denied
11-10 17:35:09.905 10592-10592/com.example.hasib.vjoiner D/Video merging:: failure: ffmpeg version n3.0.1 Copyright (c) 2000-2016 the FFmpeg developers built with gcc 4.8 (GCC)
libavutil 55. 17.103 / 55. 17.103
libavcodec 57. 24.102 / 57. 24.102
libavformat 57. 25.100 / 57. 25.100
libavdevice 57. 0.101 / 57. 0.101
libavfilter 6. 31.100 / 6. 31.100
libswscale 4. 0.100 / 4. 0.100
libswresample 2. 0.101 / 2. 0.101
libpostproc 54. 0.100 / 54. 0.100
/storage/emulated/0/DCIM/Camera/VID_20171109_070248.mp4: Permission denied
11-10 17:35:09.905 10592-10592/com.example.hasib.vjoiner D/Video merging:: finished
and this is the command i was going to execute.
String[] command = new String[]{"-y", "-i", videoPaths.get(0), "-i", videoPaths.get(1).toString(), "-strict", "experimental", "-filter_complex",
"[0:v]scale=iw*min(1920/iw\\,1080/ih):ih*min(1920/iw\\,1080/ih), pad=1920:1080:(1920-iw*min(1920/iw\\,1080/ih))/2:(1080-ih*min(1920/iw\\,1080/ih))/2,setsar=1:1[v0];[1:v] scale=iw*min(1920/iw\\,1080/ih):ih*min(1920/iw\\,1080/ih), pad=1920:1080:(1920-iw*min(1920/iw\\,1080/ih))/2:(1080-ih*min(1920/iw\\,1080/ih))/2,setsar=1:1[v1];[v0][0:a][v1][1:a] concat=n=2:v=1:a=1",
"-ab", "48000", "-ac", "2", "-ar", "22050", "-s", "1920x1080", "-vcodec", "libx264", "-crf", "27", "-q", "4", "-preset", "ultrafast", outputPath + "/output.mp4"};
Upvotes: 0
Views: 1151
Reputation: 88
Check For Read and Write External Sd Permission in manifest file and also give dynamic permission for the same.
Upvotes: 2