Closed AnsOfficial closed 2 months ago
At the moment files stored in cache and auto deleted after sometime
But I'll push update to support manually delete files
@maitrungduc1410 In Android there is an issue with this. when I navigate to the next screen. the file gets deleted and I get the below error message.
Image source "/storage/emulated/0/Android/data/io.icare/cache/trimmedVideo_20240119_205159.mp4" doesn't exist
but it's working fine on iOS. is there any solution for this getting autodeleted?
@maitrungduc1410 In Android there is an issue with this. when I navigate to the next screen. the file gets deleted and I get the below error message.
Image source "/storage/emulated/0/Android/data/io.icare/cache/trimmedVideo_20240119_205159.mp4" doesn't exist
but it's working fine on iOS. is there any solution for this getting autodeleted?
I'm working on some major update which will resolve this issue
Hi @AnsOfficial @ibelgin , please upgrade to 1.0.12
, remember to re-run pod install
From now on for iOS + Android, file will be stored in app storage instead of cached dir, and it won't be deleted by system anymore.
Also you have control of listing+deleting any file you want using:
cleanFiles() // delete all files in app storage
deleteFile(someFilePath) // delete a file in app storage
listFiles() // list all files in app storage
You can also auto delete output file from app storage after it has been saved in Photo Library:
showEditor(url, {
removeAfterSavedToPhoto: true,
})
Checkout README for usage
@maitrungduc1410 Thank you. Let me check on it.
@maitrungduc1410 right now I'm getting this error.
Hi @ibelgin
rc
(return code) is 1, which is unsuccessful.
Can you try with another video? Also please try on real device instead
If possible can you provide me the input file which is having issue?
Sure.
@maitrungduc1410 It's working on Android but the issue is with ios now I gave the maxDuration as 5 but the video is getting trimmed to 6 seconds the first second is black.
@ibelgin this is known issue when trimming using FFMPEG: https://superuser.com/questions/1222801/black-frames-at-beginning-of-video-file-when-file-cut
basically it happens in some cases when the starting time does not correspond to an I-frame
I'm trying to resolve this, will update once done
@maitrungduc1410 Thank you.
@maitrungduc1410 can this issue be resolved ?
hi @ibelgin I fixed the issue, it's working now, please upgrade to 1.0.16
and try again.
this is what I figured out when using FFMPEG:
# before 1.0.16, has black frames
ffmpeg -i input.MOV -ss 00:00:00 -to 00:00:30 -c copy output1.mp4
# new in 1.0.16, works, no black frame
ffmpeg -ss 00:00:00 -to 00:00:30 -i input.MOV -c copy output2.mp4
Original can be found here
@maitrungduc1410 Hey Thank you! it's working perfectly.
How can we delete files created after trimming because I noticed increased App data @maitrungduc1410