arthenica / ffmpeg-kit

FFmpeg Kit for applications. Supports Android, Flutter, iOS, Linux, macOS, React Native and tvOS. Supersedes MobileFFmpeg, flutter_ffmpeg and react-native-ffmpeg.
https://arthenica.github.io/ffmpeg-kit
GNU Lesser General Public License v3.0
4.53k stars 603 forks source link

Black screen in the video after converting image to video for 5 sec only for high resolution images - android kotlin native #880

Closed geek-atif closed 10 months ago

geek-atif commented 1 year ago

I am using the below Kotlin code in Android native for converting images to video for 5 sec but for some images, I am getting a black screen in the video which cannot play on an Android device. Some output videos have a 3 MB file size .

Android Kotlin code :

val ffmpegCommand = "-loop 1 -i $imageFilePath -t 5 $outputVideoPath"
        try {
            FFmpegKit.executeAsync(ffmpegCommand) { session ->
                if (ReturnCode.isSuccess(session.returnCode)) {
                    shareToWhatsapp(outputVideoPath , context)
                    Log.d(TAG, "isSuccess")
                } else {
                   // Toast.makeText(context, "Failed", Toast.LENGTH_LONG).show()
                    Log.d(TAG, "isFailed")
                }
            }
        }catch (e : Exception){
            e.printStackTrace()
        }
github-actions[bot] commented 10 months ago

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.

github-actions[bot] commented 10 months ago

This issue was closed because it has been stalled for 7 days with no activity.