-
-
Notifications
You must be signed in to change notification settings - Fork 281
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
outputPath in onSave is null #202
Comments
It's most likely a directory permissions issue, I have the same problem when using FFMPEG to create a file in both the app cache dir & temp |
Hello, I had the same issue, and after adding a debug line here: FFmpegKit.executeAsync(command, (session) async {
final state =
FFmpegKitConfig.sessionStateToString(await session.getState());
final returnCode = await session.getReturnCode();
debugPrint("FFmpeg process exited with state $state and rc $returnCode");
+ debugPrint("FFmpeg process output: ${await session.getOutput()}");
if (ReturnCode.isSuccess(returnCode)) {
debugPrint("FFmpeg processing completed successfully.");
debugPrint('Video successfully saved');
onSave(outputPath);
} else {
debugPrint("FFmpeg processing failed.");
debugPrint('Couldn\'t save the video');
onSave(null);
}
}); (ref: https://github.com/sbis04/video_trimmer/blob/main/lib/src/trimmer.dart#L250-L266) I found out it was coming from ffmpeg itself, in my case.
Which after a quick search lead me to this issue: So all I had to do to fix it was providing the parameter _trimmer.saveTrimmedVideo(
startValue: _startValue,
endValue: _endValue,
+ ffmpegCommand: '-c:a aac -c:v copy',
+ customVideoFormat: '.mp4',
onSave: (outputPath) {
setState(() {
_progressVisibility = false;
});
debugPrint('OUTPUT PATH: $outputPath');
Navigator.of(context).pushReplacement(
MaterialPageRoute(
builder: (context) => Preview(outputPath),
),
);
},
); Note that then I also need to add the |
still happening in my case :( |
anybody resolved this..im also facing the issue...when i click save 1st time it shows nothing..after 2 second click it show file |
Hi,
The
outputPath
inonSave
is nullWhat is the wrong?
video_trimmer: 2.0.0
Android Studio + emulator Pixel Pro 6
The text was updated successfully, but these errors were encountered: