Hi am currently trying to retrieve 3 second clips of an audio file whilst it is recording in flutter. I am using the recording module flutter sound and flutter ffmpeg.
I record the audio file with default codec (.aac). The file is saved to the cache getTemporaryDirectory()
I then copy the file using this flutter ffmpeg code
List<String> arguments = ["-ss", start.toString(), "-i", inPath, "-to", end.toString(), "-c", "copy", outPath];
await flutterFFmpeg.executeWithArguments(arguments);
Start: start time (e.g. 0) and End: end time (e.g. 3)
It then returns this error
FFmpeg exited with rc: 1 [mov,mp4,m4a,3gp,3g2,mj2 @ 0x748964ea00] moov
atom not found
Helpful information:
- A moov atom is data about the file (e.g timescale,duration)
- I know the inPath exists because I check that before executing ffmpeg command
- The outPath is also format .aac
- This ffmpeg function is being ran whilst the recording is still occurring
- Example inPath uri looks like this /data/user/0/com.my.app/cache/output.aac
- I have no problems when running on iOS, only on android
I would be grateful for help, I have spent many days trying to fix this problem. If you need anymore info please leave a comment. Thanks
question from:
https://stackoverflow.com/questions/65927131/flutter-ffmpeg-moov-atom-not-found-whilst-running-ffmpeg-command-during-recordin 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…