tanersener / flutter-ffmpeg

FFmpeg plugin for Flutter. Not maintained anymore. Superseded by FFmpegKit.
GNU Lesser General Public License v3.0
645 stars 132 forks source link

iOS crashes on _flutterFFmpeg.execute(_command) #220

Closed frankyvij closed 4 years ago

frankyvij commented 4 years ago

Description Application crashes both on the simulator and physical device as soon as the execute function is called.

I am running the following command: ffmpeg command: -i "/Users/shauryanvij/Library/Developer/CoreSimulator/Devices/27F7D20F-A571-4F80-9BE1-61B4A0B3096B/data/Containers/Data/Application/0DA9559D-13F1-4178-AFA8-DFCF20928B92/tmp/trim.9AFA2179-C6CC-4E26-9CC7-91F81A23A4FC.MOV" -ss 0:00:00.000000 -t 0:00:15.000000 -c:v libx264 -crf 19 -level 3.1 -preset slow -tune film -filter:v scale=trunc(oh*a/2)2:480 -sws_flags lanczos -c:a copy "/Users/shauryanvij/Library/Developer/CoreSimulator/Devices/27F7D20F-A571-4F80-9BE1-61B4A0B3096B/data/Containers/Data/Application/0DA9559D-13F1-4178-AFA8-DFCF20928B92/Documents/Trimmer/trim_trimmed:Oct27,2020-15:57:18.mp4"

I have tried to simplify the command above, but it still crashes. ffmpeg command: -i "/Users/shauryanvij/Library/Developer/CoreSimulator/Devices/27F7D20F-A571-4F80-9BE1-61B4A0B3096B/data/Containers/Data/Application/0DA9559D-13F1-4178-AFA8-DFCF20928B92/tmp/trim.9AFA2179-C6CC-4E26-9CC7-91F81A23A4FC.MOV" -ss 0:00:00.000000 -t 0:00:15.000000 -c:v copy -c:a copy "/Users/shauryanvij/Library/Developer/CoreSimulator/Devices/27F7D20F-A571-4F80-9BE1-61B4A0B3096B/data/Containers/Data/Application/0DA9559D-13F1-4178-AFA8-DFCF20928B92/Documents/Trimmer/trim_trimmed:Oct27,2020-15:57:18.mp4"

Expected behavior Application should not crash, and FFMpeg should encode the video properly.

Current behavior Application is crashing.

Screenshots If applicable, add screenshots to help explain your problem.

Logs This is what I have been able to capture from XCode. https://ghostbin.co/paste/mhr77

Environment [✓] Flutter (Channel stable, 1.22.2, on Mac OS X 10.15.4 19E287, locale en-SG) [✓] Android toolchain - develop for Android devices (Android SDK version 29.0.2) [✓] Xcode - develop for iOS and macOS (Xcode 11.6) [✓] Android Studio (version 3.6) [✓] IntelliJ IDEA Community Edition (version 2020.2.3) [✓] Connected device (2 available)

• No issues found!

Other I can provide more details if required.

frankyvij commented 4 years ago

Also, please note that the code implemented works perfectly fine in Android.

Following is my pods file if it may help: https://ghostbin.co/paste/33vdb

tanersener commented 4 years ago

Can you please run your app in Xcode and show us where it crashes exactly.

2020-10-27 14:09:43.529172+0800 Runner[5647:1133375] -[NSNull length]: unrecognized selector sent to instance 0x1c9cf97f0
2020-10-27 14:09:43.553348+0800 Runner[5647:1133375] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[NSNull length]: unrecognized selector sent to instance 0x1c9cf97f0'
frankyvij commented 4 years ago

I am so sorry! The issue was caused by another package that would generate the thumbnail. I have fixed the problem. I will now close the issue! Thank you.