Closed VirajEbiz closed 4 months ago
I have the same problem
This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days.
This issue was closed because it has been stalled for 7 days with no activity.
I want to merge audio with my image but After executing below code output file not playing properly like audio not playing properly this is my code please check :- final FlutterFFmpeg _flutterFFmpeg = FlutterFFmpeg();
Future mergeImageAndAudio(
String imagePath, String audioPath, String outputPath) async {
// Define the FFmpeg command
String command =
"-y -i $imagePath -i $audioPath -map 0:v -map 1:a -c:v copy "
"-shortest $outputPath";
// Execute the command
int rc = await _flutterFFmpeg.execute(command);
if (rc == 0) {
print("FFmpeg process completed successfully.");
} else {
print("FFmpeg process failed with return code $rc.");
}
}
Future createVideo(
{String? imagePathSelected, String? audioPathSelected}) async {
// Get the temporary directory of the device to save the output video
final Directory tempDir = await getTemporaryDirectory();
final String outputPath =
path.join(tempDir.path, '${DateTime.now().second}output.mp4');
}
in android devices I just able to here audio but it's also not proper and image not visible, for the iPhone i am able to see image but audio not playing properly