From 9f3cb9a91aed5a34e830f5046aafbcefe98e30c9 Mon Sep 17 00:00:00 2001 From: "Sue N. Cooper" Date: Sun, 20 Aug 2023 14:51:30 +0300 Subject: [PATCH] upgrade applications to v6.0 --- README.md | 9 ++ android/build.gradle | 2 +- .../gradle/wrapper/gradle-wrapper.properties | 2 +- .../test-app-local-dependency/build.gradle | 14 +-- .../ffmpegkit/test/PipeTabFragment.java | 2 +- .../ffmpegkit/test/SafTabFragment.java | 2 +- .../ffmpegkit/test/SubtitleTabFragment.java | 2 +- .../com/arthenica/ffmpegkit/test/Video.java | 6 +- .../ffmpegkit/test/VideoTabFragment.java | 12 ++- .../src/main/res/values/video_codec.xml | 2 + android/test-app-maven-central/build.gradle | 16 ++-- .../ffmpegkit/test/PipeTabFragment.java | 2 +- .../ffmpegkit/test/SafTabFragment.java | 2 +- .../ffmpegkit/test/SubtitleTabFragment.java | 2 +- .../com/arthenica/ffmpegkit/test/Video.java | 6 +- .../ffmpegkit/test/VideoTabFragment.java | 12 ++- .../src/main/res/values/video_codec.xml | 2 + .../FFmpegKitIOS/FFmpegKitTest.m | 12 +-- .../FFmpegKitIOS/PipeViewController.m | 2 +- .../FFmpegKitIOS/SubtitleViewController.m | 2 +- ios/test-app-cocoapods/FFmpegKitIOS/Video.m | 6 +- .../FFmpegKitIOS/VideoViewController.m | 2 +- ios/test-app-cocoapods/Podfile | 2 +- ios/test-app-cocoapods/Podfile.lock | 10 +- .../FFmpegKitIOS/FFmpegKitTest.m | 12 +-- .../FFmpegKitIOS/PipeViewController.m | 2 +- .../FFmpegKitIOS/SubtitleViewController.m | 2 +- .../FFmpegKitIOS/Video.m | 6 +- .../FFmpegKitIOS/VideoViewController.m | 2 +- .../test-app-local-dependency/CMakeLists.txt | 4 +- .../src/FFmpegKitTest.cpp | 10 +- .../test-app-local-dependency/src/PipeTab.cpp | 2 +- .../src/SubtitleTab.cpp | 2 +- linux/test-app-local-dependency/src/Video.cpp | 6 +- .../src/VideoTab.cpp | 2 +- linux/test-app-local-dependency/src/main.cpp | 4 + .../UserInterfaceState.xcuserstate | Bin 0 -> 7889 bytes .../FFmpegKitMACOS/FFmpegKitTest.m | 12 +-- .../FFmpegKitMACOS/PipeViewController.m | 2 +- .../FFmpegKitMACOS/SubtitleViewController.m | 2 +- .../test-app-cocoapods/FFmpegKitMACOS/Video.m | 6 +- .../FFmpegKitMACOS/VideoViewController.m | 2 +- macos/test-app-cocoapods/Podfile | 2 +- macos/test-app-cocoapods/Podfile.lock | 10 +- .../FFmpegKitMACOS/FFmpegKitTest.m | 12 +-- .../FFmpegKitMACOS/PipeViewController.m | 2 +- .../FFmpegKitMACOS/SubtitleViewController.m | 2 +- .../FFmpegKitMACOS/Video.m | 6 +- .../FFmpegKitMACOS/VideoViewController.m | 2 +- .../FFmpegKitTVOS/FFmpegKitTest.m | 12 +-- .../FFmpegKitTVOS/PipeViewController.m | 2 +- .../FFmpegKitTVOS/SubtitleViewController.m | 2 +- tvos/test-app-cocoapods/FFmpegKitTVOS/Video.m | 6 +- .../FFmpegKitTVOS/VideoViewController.m | 2 +- tvos/test-app-cocoapods/Podfile | 2 +- tvos/test-app-cocoapods/Podfile.lock | 10 +- .../FFmpegKitTVOS/Base.lproj/Main.storyboard | 90 +++++++++--------- .../FFmpegKitTVOS/FFmpegKitTest.m | 12 +-- .../FFmpegKitTVOS/PipeViewController.m | 2 +- .../FFmpegKitTVOS/SubtitleViewController.m | 2 +- .../FFmpegKitTVOS/Video.m | 6 +- .../FFmpegKitTVOS/VideoViewController.m | 2 +- 62 files changed, 207 insertions(+), 188 deletions(-) create mode 100644 macos/test-app-cocoapods/FFmpegKitMACOS.xcworkspace/xcuserdata/sue.xcuserdatad/UserInterfaceState.xcuserstate diff --git a/README.md b/README.md index 261538c..ab98097 100644 --- a/README.md +++ b/README.md @@ -22,6 +22,15 @@ Test applications are tagged with `ffmpeg-kit` release they depend on. | Platform | FFmpegKit Version | Tag | | :----: |:-----------------:|:---------------------------------------------------------------------------------:| +| Android | 6.0 | [6.0](https://github.com/arthenica/ffmpeg-kit-test/tree/android.v6.0) | +| Android | 6.0.LTS | [6.0.LTS](https://github.com/arthenica/ffmpeg-kit-test/tree/android.v6.0.lts) | +| iOS | 6.0 | [6.0](https://github.com/arthenica/ffmpeg-kit-test/tree/ios.v6.0) | +| iOS | 6.0.LTS | [6.0.LTS](https://github.com/arthenica/ffmpeg-kit-test/tree/ios.v6.0.lts) | +| macOS | 6.0 | [6.0](https://github.com/arthenica/ffmpeg-kit-test/tree/macos.v6.0) | +| macOS | 6.0.LTS | [6.0.LTS](https://github.com/arthenica/ffmpeg-kit-test/tree/macos.v6.0.lts) | +| tvOS | 6.0 | [6.0](https://github.com/arthenica/ffmpeg-kit-test/tree/tvos.v6.0) | +| tvOS | 6.0.LTS | [6.0.LTS](https://github.com/arthenica/ffmpeg-kit-test/tree/tvos.v6.0.lts) | +| - | - | - | | Android | 5.1 | [5.1](https://github.com/arthenica/ffmpeg-kit-test/tree/android.v5.1) | | Android | 5.1.LTS | [5.1.LTS](https://github.com/arthenica/ffmpeg-kit-test/tree/android.v5.1.lts) | | iOS | 5.1 | [5.1](https://github.com/arthenica/ffmpeg-kit-test/tree/ios.v5.1) | diff --git a/android/build.gradle b/android/build.gradle index e76cba4..4d286df 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -4,7 +4,7 @@ buildscript { mavenCentral() } dependencies { - classpath 'com.android.tools.build:gradle:7.3.0' + classpath 'com.android.tools.build:gradle:8.1.0' } } diff --git a/android/gradle/wrapper/gradle-wrapper.properties b/android/gradle/wrapper/gradle-wrapper.properties index ae04661..84a0b92 100644 --- a/android/gradle/wrapper/gradle-wrapper.properties +++ b/android/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.2.1-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/android/test-app-local-dependency/build.gradle b/android/test-app-local-dependency/build.gradle index 0f89dab..01ba4dc 100644 --- a/android/test-app-local-dependency/build.gradle +++ b/android/test-app-local-dependency/build.gradle @@ -9,14 +9,16 @@ android { keyPassword 'android' } } - namespace 'com.arthenica.ffmpegkit.test' - compileSdk 31 + if (project.android.hasProperty("namespace")) { + namespace 'com.arthenica.ffmpegkit.test' + } + compileSdk 33 defaultConfig { applicationId "com.arthenica.ffmpegkit.test" minSdk 24 - targetSdk 31 - versionCode 240510 - versionName "5.1" + targetSdk 33 + versionCode 240600 + versionName "6.0" } buildTypes { debug { @@ -55,6 +57,6 @@ dependencies { // implementation files('../../../ffmpeg-kit/prebuilt/bundle-android-aar-lts/ffmpeg-kit/ffmpeg-kit.aar') implementation files('../../../ffmpeg-kit/prebuilt/bundle-android-aar/ffmpeg-kit/ffmpeg-kit.aar') implementation 'com.arthenica:smart-exception-java:0.2.1' - implementation 'androidx.appcompat:appcompat:1.4.2' + implementation 'androidx.appcompat:appcompat:1.6.1' implementation 'androidx.constraintlayout:constraintlayout:2.1.4' } diff --git a/android/test-app-local-dependency/src/main/java/com/arthenica/ffmpegkit/test/PipeTabFragment.java b/android/test-app-local-dependency/src/main/java/com/arthenica/ffmpegkit/test/PipeTabFragment.java index 3b8fe44..e45bc1c 100644 --- a/android/test-app-local-dependency/src/main/java/com/arthenica/ffmpegkit/test/PipeTabFragment.java +++ b/android/test-app-local-dependency/src/main/java/com/arthenica/ffmpegkit/test/PipeTabFragment.java @@ -250,7 +250,7 @@ protected void updateProgressDialog() { return; } - int timeInMilliseconds = this.statistics.getTime(); + double timeInMilliseconds = this.statistics.getTime(); int totalVideoDuration = 9000; String completePercentage = new BigDecimal(timeInMilliseconds).multiply(new BigDecimal(100)).divide(new BigDecimal(totalVideoDuration), 0, BigDecimal.ROUND_HALF_UP).toString(); diff --git a/android/test-app-local-dependency/src/main/java/com/arthenica/ffmpegkit/test/SafTabFragment.java b/android/test-app-local-dependency/src/main/java/com/arthenica/ffmpegkit/test/SafTabFragment.java index 96d0469..951c279 100644 --- a/android/test-app-local-dependency/src/main/java/com/arthenica/ffmpegkit/test/SafTabFragment.java +++ b/android/test-app-local-dependency/src/main/java/com/arthenica/ffmpegkit/test/SafTabFragment.java @@ -336,7 +336,7 @@ private void updateProgressDialog() { return; } - int timeInMilliseconds = this.statistics.getTime(); + double timeInMilliseconds = this.statistics.getTime(); int totalVideoDuration = 9000; String completePercentage = new BigDecimal(timeInMilliseconds).multiply(new BigDecimal(100)).divide(new BigDecimal(totalVideoDuration), 0, BigDecimal.ROUND_HALF_UP).toString(); diff --git a/android/test-app-local-dependency/src/main/java/com/arthenica/ffmpegkit/test/SubtitleTabFragment.java b/android/test-app-local-dependency/src/main/java/com/arthenica/ffmpegkit/test/SubtitleTabFragment.java index 06009d9..3cf2770 100644 --- a/android/test-app-local-dependency/src/main/java/com/arthenica/ffmpegkit/test/SubtitleTabFragment.java +++ b/android/test-app-local-dependency/src/main/java/com/arthenica/ffmpegkit/test/SubtitleTabFragment.java @@ -286,7 +286,7 @@ protected void updateProgressDialog() { return; } - int timeInMilliseconds = this.statistics.getTime(); + double timeInMilliseconds = this.statistics.getTime(); int totalVideoDuration = 9000; String completePercentage = new BigDecimal(timeInMilliseconds).multiply(new BigDecimal(100)).divide(new BigDecimal(totalVideoDuration), 0, BigDecimal.ROUND_HALF_UP).toString(); diff --git a/android/test-app-local-dependency/src/main/java/com/arthenica/ffmpegkit/test/Video.java b/android/test-app-local-dependency/src/main/java/com/arthenica/ffmpegkit/test/Video.java index fe0daf7..71f9fa6 100644 --- a/android/test-app-local-dependency/src/main/java/com/arthenica/ffmpegkit/test/Video.java +++ b/android/test-app-local-dependency/src/main/java/com/arthenica/ffmpegkit/test/Video.java @@ -49,7 +49,7 @@ static String generateCreateVideoWithPipesScript(final String image1Pipe, final "[stream2starting][stream1ending]blend=all_expr=\'if(gte(X,(W/2)*T/1)*lte(X,W-(W/2)*T/1),B,A)\':shortest=1[stream2blended];" + "[stream3starting][stream2ending]blend=all_expr=\'if(gte(X,(W/2)*T/1)*lte(X,W-(W/2)*T/1),B,A)\':shortest=1[stream3blended];" + "[stream1overlaid][stream2blended][stream2overlaid][stream3blended][stream3overlaid]concat=n=5:v=1:a=0,scale=w=640:h=424,format=yuv420p[video]\"" + - " -map [video] -vsync 2 -async 1 -c:v mpeg4 -r 30 " + videoFilePath; + " -map [video] -fps_mode cfr -c:v mpeg4 -r 30 " + videoFilePath; } static String generateEncodeVideoScript(final String image1Path, final String image2Path, final String image3Path, final String videoFilePath, final String videoCodec, final String customOptions) { @@ -74,7 +74,7 @@ static String generateEncodeVideoScript(final String image1Path, final String im "[stream2starting][stream1ending]blend=all_expr=\'if(gte(X,(W/2)*T/1)*lte(X,W-(W/2)*T/1),B,A)\':shortest=1[stream2blended];" + "[stream3starting][stream2ending]blend=all_expr=\'if(gte(X,(W/2)*T/1)*lte(X,W-(W/2)*T/1),B,A)\':shortest=1[stream3blended];" + "[stream1overlaid][stream2blended][stream2overlaid][stream3blended][stream3overlaid]concat=n=5:v=1:a=0,scale=w=640:h=424,format=" + pixelFormat + "[video]\"" + - " -map [video] -vsync 2 -async 1 " + customOptions + "-c:v " + videoCodec.toLowerCase(Locale.ENGLISH) + " -r 30 " + videoFilePath; + " -map [video] -fps_mode cfr " + customOptions + "-c:v " + videoCodec.toLowerCase(Locale.ENGLISH) + " -r 30 " + videoFilePath; } static String generateShakingVideoScript(final String image1Path, final String image2Path, final String image3Path, final String videoFilePath) { @@ -94,7 +94,7 @@ static String generateShakingVideoScript(final String image1Path, final String i "[3:v][stream2overlaid]overlay=x=\'2*mod(n,4)\':y=\'2*mod(n,2)\',trim=duration=3[stream2shaking];" + "[3:v][stream3overlaid]overlay=x=\'2*mod(n,4)\':y=\'2*mod(n,2)\',trim=duration=3[stream3shaking];" + "[stream1shaking][stream2shaking][stream3shaking]concat=n=3:v=1:a=0,scale=w=640:h=424,format=yuv420p[video]\"" + - " -map [video] -vsync 2 -async 1 -c:v mpeg4 -r 30 " + videoFilePath; + " -map [video] -fps_mode cfr -c:v mpeg4 -r 30 " + videoFilePath; } static String generateZscaleVideoScript(final String inputVideoFilePath, final String outputVideoFilePath) { diff --git a/android/test-app-local-dependency/src/main/java/com/arthenica/ffmpegkit/test/VideoTabFragment.java b/android/test-app-local-dependency/src/main/java/com/arthenica/ffmpegkit/test/VideoTabFragment.java index 53a0e68..5951010 100644 --- a/android/test-app-local-dependency/src/main/java/com/arthenica/ffmpegkit/test/VideoTabFragment.java +++ b/android/test-app-local-dependency/src/main/java/com/arthenica/ffmpegkit/test/VideoTabFragment.java @@ -243,6 +243,12 @@ public String getSelectedVideoCodec() { case "x264": videoCodec = "libx264"; break; + case "h264_mediacodec": + videoCodec = "h264_mediacodec"; + break; + case "hevc_mediacodec": + videoCodec = "hevc_mediacodec"; + break; case "openh264": videoCodec = "libopenh264"; break; @@ -292,7 +298,7 @@ public File getVideoFile() { break; default: - // mpeg4, x264, x265, xvid, kvazaar + // mpeg4, x264, h264_mediacodec, hevc_mediacodec, x265, xvid, kvazaar extension = "mp4"; break; } @@ -319,7 +325,7 @@ public String getCustomOptions() { return "-format hap_q "; default: - // kvazaar, mpeg4, x264, xvid + // kvazaar, mpeg4, x264, h264_mediacodec, hevc_mediacodec, xvid return ""; } } @@ -344,7 +350,7 @@ protected void updateProgressDialog() { return; } - int timeInMilliseconds = this.statistics.getTime(); + double timeInMilliseconds = this.statistics.getTime(); int totalVideoDuration = 9000; String completePercentage = new BigDecimal(timeInMilliseconds).multiply(new BigDecimal(100)).divide(new BigDecimal(totalVideoDuration), 0, BigDecimal.ROUND_HALF_UP).toString(); diff --git a/android/test-app-local-dependency/src/main/res/values/video_codec.xml b/android/test-app-local-dependency/src/main/res/values/video_codec.xml index 9f2eb89..4f0af49 100644 --- a/android/test-app-local-dependency/src/main/res/values/video_codec.xml +++ b/android/test-app-local-dependency/src/main/res/values/video_codec.xml @@ -3,6 +3,8 @@ mpeg4 x264 + h264_mediacodec + hevc_mediacodec openh264 x265 xvid diff --git a/android/test-app-maven-central/build.gradle b/android/test-app-maven-central/build.gradle index 9e24103..252a9ae 100644 --- a/android/test-app-maven-central/build.gradle +++ b/android/test-app-maven-central/build.gradle @@ -9,14 +9,16 @@ android { keyPassword 'android' } } - namespace 'com.arthenica.ffmpegkit.test' - compileSdk 31 + if (project.android.hasProperty("namespace")) { + namespace 'com.arthenica.ffmpegkit.test' + } + compileSdk 33 defaultConfig { applicationId "com.arthenica.ffmpegkit.test" minSdk 24 - targetSdk 31 - versionCode 240510 - versionName "5.1" + targetSdk 33 + versionCode 240600 + versionName "6.0" } buildTypes { debug { @@ -52,7 +54,7 @@ android.applicationVariants.all { variant -> } dependencies { - implementation 'com.arthenica:ffmpeg-kit-full:5.1' - implementation 'androidx.appcompat:appcompat:1.4.2' + implementation 'com.arthenica:ffmpeg-kit-full:6.0' + implementation 'androidx.appcompat:appcompat:1.6.1' implementation 'androidx.constraintlayout:constraintlayout:2.1.4' } diff --git a/android/test-app-maven-central/src/main/java/com/arthenica/ffmpegkit/test/PipeTabFragment.java b/android/test-app-maven-central/src/main/java/com/arthenica/ffmpegkit/test/PipeTabFragment.java index 3b8fe44..e45bc1c 100644 --- a/android/test-app-maven-central/src/main/java/com/arthenica/ffmpegkit/test/PipeTabFragment.java +++ b/android/test-app-maven-central/src/main/java/com/arthenica/ffmpegkit/test/PipeTabFragment.java @@ -250,7 +250,7 @@ protected void updateProgressDialog() { return; } - int timeInMilliseconds = this.statistics.getTime(); + double timeInMilliseconds = this.statistics.getTime(); int totalVideoDuration = 9000; String completePercentage = new BigDecimal(timeInMilliseconds).multiply(new BigDecimal(100)).divide(new BigDecimal(totalVideoDuration), 0, BigDecimal.ROUND_HALF_UP).toString(); diff --git a/android/test-app-maven-central/src/main/java/com/arthenica/ffmpegkit/test/SafTabFragment.java b/android/test-app-maven-central/src/main/java/com/arthenica/ffmpegkit/test/SafTabFragment.java index 96d0469..951c279 100644 --- a/android/test-app-maven-central/src/main/java/com/arthenica/ffmpegkit/test/SafTabFragment.java +++ b/android/test-app-maven-central/src/main/java/com/arthenica/ffmpegkit/test/SafTabFragment.java @@ -336,7 +336,7 @@ private void updateProgressDialog() { return; } - int timeInMilliseconds = this.statistics.getTime(); + double timeInMilliseconds = this.statistics.getTime(); int totalVideoDuration = 9000; String completePercentage = new BigDecimal(timeInMilliseconds).multiply(new BigDecimal(100)).divide(new BigDecimal(totalVideoDuration), 0, BigDecimal.ROUND_HALF_UP).toString(); diff --git a/android/test-app-maven-central/src/main/java/com/arthenica/ffmpegkit/test/SubtitleTabFragment.java b/android/test-app-maven-central/src/main/java/com/arthenica/ffmpegkit/test/SubtitleTabFragment.java index 06009d9..3cf2770 100644 --- a/android/test-app-maven-central/src/main/java/com/arthenica/ffmpegkit/test/SubtitleTabFragment.java +++ b/android/test-app-maven-central/src/main/java/com/arthenica/ffmpegkit/test/SubtitleTabFragment.java @@ -286,7 +286,7 @@ protected void updateProgressDialog() { return; } - int timeInMilliseconds = this.statistics.getTime(); + double timeInMilliseconds = this.statistics.getTime(); int totalVideoDuration = 9000; String completePercentage = new BigDecimal(timeInMilliseconds).multiply(new BigDecimal(100)).divide(new BigDecimal(totalVideoDuration), 0, BigDecimal.ROUND_HALF_UP).toString(); diff --git a/android/test-app-maven-central/src/main/java/com/arthenica/ffmpegkit/test/Video.java b/android/test-app-maven-central/src/main/java/com/arthenica/ffmpegkit/test/Video.java index fe0daf7..71f9fa6 100644 --- a/android/test-app-maven-central/src/main/java/com/arthenica/ffmpegkit/test/Video.java +++ b/android/test-app-maven-central/src/main/java/com/arthenica/ffmpegkit/test/Video.java @@ -49,7 +49,7 @@ static String generateCreateVideoWithPipesScript(final String image1Pipe, final "[stream2starting][stream1ending]blend=all_expr=\'if(gte(X,(W/2)*T/1)*lte(X,W-(W/2)*T/1),B,A)\':shortest=1[stream2blended];" + "[stream3starting][stream2ending]blend=all_expr=\'if(gte(X,(W/2)*T/1)*lte(X,W-(W/2)*T/1),B,A)\':shortest=1[stream3blended];" + "[stream1overlaid][stream2blended][stream2overlaid][stream3blended][stream3overlaid]concat=n=5:v=1:a=0,scale=w=640:h=424,format=yuv420p[video]\"" + - " -map [video] -vsync 2 -async 1 -c:v mpeg4 -r 30 " + videoFilePath; + " -map [video] -fps_mode cfr -c:v mpeg4 -r 30 " + videoFilePath; } static String generateEncodeVideoScript(final String image1Path, final String image2Path, final String image3Path, final String videoFilePath, final String videoCodec, final String customOptions) { @@ -74,7 +74,7 @@ static String generateEncodeVideoScript(final String image1Path, final String im "[stream2starting][stream1ending]blend=all_expr=\'if(gte(X,(W/2)*T/1)*lte(X,W-(W/2)*T/1),B,A)\':shortest=1[stream2blended];" + "[stream3starting][stream2ending]blend=all_expr=\'if(gte(X,(W/2)*T/1)*lte(X,W-(W/2)*T/1),B,A)\':shortest=1[stream3blended];" + "[stream1overlaid][stream2blended][stream2overlaid][stream3blended][stream3overlaid]concat=n=5:v=1:a=0,scale=w=640:h=424,format=" + pixelFormat + "[video]\"" + - " -map [video] -vsync 2 -async 1 " + customOptions + "-c:v " + videoCodec.toLowerCase(Locale.ENGLISH) + " -r 30 " + videoFilePath; + " -map [video] -fps_mode cfr " + customOptions + "-c:v " + videoCodec.toLowerCase(Locale.ENGLISH) + " -r 30 " + videoFilePath; } static String generateShakingVideoScript(final String image1Path, final String image2Path, final String image3Path, final String videoFilePath) { @@ -94,7 +94,7 @@ static String generateShakingVideoScript(final String image1Path, final String i "[3:v][stream2overlaid]overlay=x=\'2*mod(n,4)\':y=\'2*mod(n,2)\',trim=duration=3[stream2shaking];" + "[3:v][stream3overlaid]overlay=x=\'2*mod(n,4)\':y=\'2*mod(n,2)\',trim=duration=3[stream3shaking];" + "[stream1shaking][stream2shaking][stream3shaking]concat=n=3:v=1:a=0,scale=w=640:h=424,format=yuv420p[video]\"" + - " -map [video] -vsync 2 -async 1 -c:v mpeg4 -r 30 " + videoFilePath; + " -map [video] -fps_mode cfr -c:v mpeg4 -r 30 " + videoFilePath; } static String generateZscaleVideoScript(final String inputVideoFilePath, final String outputVideoFilePath) { diff --git a/android/test-app-maven-central/src/main/java/com/arthenica/ffmpegkit/test/VideoTabFragment.java b/android/test-app-maven-central/src/main/java/com/arthenica/ffmpegkit/test/VideoTabFragment.java index 53a0e68..5951010 100644 --- a/android/test-app-maven-central/src/main/java/com/arthenica/ffmpegkit/test/VideoTabFragment.java +++ b/android/test-app-maven-central/src/main/java/com/arthenica/ffmpegkit/test/VideoTabFragment.java @@ -243,6 +243,12 @@ public String getSelectedVideoCodec() { case "x264": videoCodec = "libx264"; break; + case "h264_mediacodec": + videoCodec = "h264_mediacodec"; + break; + case "hevc_mediacodec": + videoCodec = "hevc_mediacodec"; + break; case "openh264": videoCodec = "libopenh264"; break; @@ -292,7 +298,7 @@ public File getVideoFile() { break; default: - // mpeg4, x264, x265, xvid, kvazaar + // mpeg4, x264, h264_mediacodec, hevc_mediacodec, x265, xvid, kvazaar extension = "mp4"; break; } @@ -319,7 +325,7 @@ public String getCustomOptions() { return "-format hap_q "; default: - // kvazaar, mpeg4, x264, xvid + // kvazaar, mpeg4, x264, h264_mediacodec, hevc_mediacodec, xvid return ""; } } @@ -344,7 +350,7 @@ protected void updateProgressDialog() { return; } - int timeInMilliseconds = this.statistics.getTime(); + double timeInMilliseconds = this.statistics.getTime(); int totalVideoDuration = 9000; String completePercentage = new BigDecimal(timeInMilliseconds).multiply(new BigDecimal(100)).divide(new BigDecimal(totalVideoDuration), 0, BigDecimal.ROUND_HALF_UP).toString(); diff --git a/android/test-app-maven-central/src/main/res/values/video_codec.xml b/android/test-app-maven-central/src/main/res/values/video_codec.xml index 9f2eb89..4f0af49 100644 --- a/android/test-app-maven-central/src/main/res/values/video_codec.xml +++ b/android/test-app-maven-central/src/main/res/values/video_codec.xml @@ -3,6 +3,8 @@ mpeg4 x264 + h264_mediacodec + hevc_mediacodec openh264 x265 xvid diff --git a/ios/test-app-cocoapods/FFmpegKitIOS/FFmpegKitTest.m b/ios/test-app-cocoapods/FFmpegKitIOS/FFmpegKitTest.m index af68d67..08cfc20 100644 --- a/ios/test-app-cocoapods/FFmpegKitIOS/FFmpegKitTest.m +++ b/ios/test-app-cocoapods/FFmpegKitIOS/FFmpegKitTest.m @@ -77,10 +77,10 @@ } void testParseSimpleCommand() { - NSArray *argumentArray = parseArguments(@"-hide_banner -loop 1 -i file.jpg -filter_complex [0:v]setpts=PTS-STARTPTS[video] -map [video] -vsync 2 -async 1 video.mp4"); + NSArray *argumentArray = parseArguments(@"-hide_banner -loop 1 -i file.jpg -filter_complex [0:v]setpts=PTS-STARTPTS[video] -map [video] -fps_mode cfr video.mp4"); assert(argumentArray != nil); - assertNumber([[NSNumber alloc] initWithInt:14], [[NSNumber alloc] initWithUnsignedLong: [argumentArray count]]); + assertNumber([[NSNumber alloc] initWithInt:12], [[NSNumber alloc] initWithUnsignedLong: [argumentArray count]]); assertString(@"-hide_banner", argumentArray[0]); assertString(@"-loop", argumentArray[1]); @@ -91,11 +91,9 @@ void testParseSimpleCommand() { assertString(@"[0:v]setpts=PTS-STARTPTS[video]", argumentArray[6]); assertString(@"-map", argumentArray[7]); assertString(@"[video]", argumentArray[8]); - assertString(@"-vsync", argumentArray[9]); - assertString(@"2", argumentArray[10]); - assertString(@"-async", argumentArray[11]); - assertString(@"1", argumentArray[12]); - assertString(@"video.mp4", argumentArray[13]); + assertString(@"-fps_mode", argumentArray[9]); + assertString(@"cfr", argumentArray[10]); + assertString(@"video.mp4", argumentArray[11]); } void testParseSingleQuotesInCommand() { diff --git a/ios/test-app-cocoapods/FFmpegKitIOS/PipeViewController.m b/ios/test-app-cocoapods/FFmpegKitIOS/PipeViewController.m index ec28239..64a7fc4 100644 --- a/ios/test-app-cocoapods/FFmpegKitIOS/PipeViewController.m +++ b/ios/test-app-cocoapods/FFmpegKitIOS/PipeViewController.m @@ -263,7 +263,7 @@ - (void)updateProgressDialog { } if (alertController != nil) { - int timeInMilliseconds = [statistics getTime]; + double timeInMilliseconds = [statistics getTime]; int totalVideoDuration = 9000; int percentage = timeInMilliseconds*100/totalVideoDuration; diff --git a/ios/test-app-cocoapods/FFmpegKitIOS/SubtitleViewController.m b/ios/test-app-cocoapods/FFmpegKitIOS/SubtitleViewController.m index 4b9c30e..09ecb4c 100644 --- a/ios/test-app-cocoapods/FFmpegKitIOS/SubtitleViewController.m +++ b/ios/test-app-cocoapods/FFmpegKitIOS/SubtitleViewController.m @@ -259,7 +259,7 @@ - (void)updateProgressDialog { } if (alertController != nil) { - int timeInMilliseconds = [statistics getTime]; + double timeInMilliseconds = [statistics getTime]; int totalVideoDuration = 9000; int percentage = timeInMilliseconds*100/totalVideoDuration; diff --git a/ios/test-app-cocoapods/FFmpegKitIOS/Video.m b/ios/test-app-cocoapods/FFmpegKitIOS/Video.m index f910e28..f6bbfba 100644 --- a/ios/test-app-cocoapods/FFmpegKitIOS/Video.m +++ b/ios/test-app-cocoapods/FFmpegKitIOS/Video.m @@ -44,7 +44,7 @@ + (NSString*)generateCreateVideoWithPipesScript:(NSString *)image1 :(NSString *) [stream2fadein][stream1fadeout]overlay=(main_w-overlay_w)/2:(main_h-overlay_h)/2,trim=duration=1,select=lte(n\\,30)[stream2blended];\ [stream3fadein][stream2fadeout]overlay=(main_w-overlay_w)/2:(main_h-overlay_h)/2,trim=duration=1,select=lte(n\\,30)[stream3blended];\ [stream1overlaid][stream2blended][stream2overlaid][stream3blended][stream3overlaid]concat=n=5:v=1:a=0,scale=w=640:h=424,format=yuv420p[video]\" \ --map [video] -vsync 2 -async 1 -c:v mpeg4 -r 30 %@", image1, image2, image3, videoFile]; +-map [video] -fps_mode cfr -c:v mpeg4 -r 30 %@", image1, image2, image3, videoFile]; } + (NSString*)generateVideoEncodeScript:(NSString *)image1 :(NSString *)image2 :(NSString *)image3 :(NSString *)videoFile :(NSString *)videoCodec :(NSString *)customOptions { @@ -71,7 +71,7 @@ + (NSString*)generateVideoEncodeScriptWithCustomPixelFormat:(NSString *)image1 : [stream2fadein][stream1fadeout]overlay=(main_w-overlay_w)/2:(main_h-overlay_h)/2,trim=duration=1,select=lte(n\\,30)[stream2blended];\ [stream3fadein][stream2fadeout]overlay=(main_w-overlay_w)/2:(main_h-overlay_h)/2,trim=duration=1,select=lte(n\\,30)[stream3blended];\ [stream1overlaid][stream2blended][stream2overlaid][stream3blended][stream3overlaid]concat=n=5:v=1:a=0,scale=w=640:h=424,format=%@[video]\" \ --map [video] -vsync 2 -async 1 %@-c:v %@ -r 30 %@", image1, image2, image3, pixelFormat, customOptions, videoCodec, videoFile]; +-map [video] -fps_mode cfr %@-c:v %@ -r 30 %@", image1, image2, image3, pixelFormat, customOptions, videoCodec, videoFile]; } + (NSString*)generateShakingVideoScript:(NSString *)image1 :(NSString *)image2 :(NSString *)image3 :(NSString *)videoFile { @@ -91,7 +91,7 @@ + (NSString*)generateShakingVideoScript:(NSString *)image1 :(NSString *)image2 : [3:v][stream2overlaid]overlay=x=\'2*mod(n,4)\':y=\'2*mod(n,2)\',trim=duration=3[stream2shaking];\ [3:v][stream3overlaid]overlay=x=\'2*mod(n,4)\':y=\'2*mod(n,2)\',trim=duration=3[stream3shaking];\ [stream1shaking][stream2shaking][stream3shaking]concat=n=3:v=1:a=0,scale=w=640:h=424,format=yuv420p[video]\" \ --map [video] -vsync 2 -async 1 -c:v mpeg4 -r 30 %@", image1, image2, image3, videoFile]; +-map [video] -fps_mode cfr -c:v mpeg4 -r 30 %@", image1, image2, image3, videoFile]; } + (NSString*)generateZscaleVideoScript:(NSString *)inputVideoFilePath :(NSString *)outputVideoFilePath { diff --git a/ios/test-app-cocoapods/FFmpegKitIOS/VideoViewController.m b/ios/test-app-cocoapods/FFmpegKitIOS/VideoViewController.m index f5d8993..c0adccf 100644 --- a/ios/test-app-cocoapods/FFmpegKitIOS/VideoViewController.m +++ b/ios/test-app-cocoapods/FFmpegKitIOS/VideoViewController.m @@ -314,7 +314,7 @@ - (void)updateProgressDialog { } if (alertController != nil) { - int timeInMilliseconds = [statistics getTime]; + double timeInMilliseconds = [statistics getTime]; int totalVideoDuration = 9000; int percentage = timeInMilliseconds*100/totalVideoDuration; diff --git a/ios/test-app-cocoapods/Podfile b/ios/test-app-cocoapods/Podfile index d8143de..cb55a07 100644 --- a/ios/test-app-cocoapods/Podfile +++ b/ios/test-app-cocoapods/Podfile @@ -3,5 +3,5 @@ platform :ios, '12.1' use_frameworks! target "FFmpegKitIOS" do - pod 'ffmpeg-kit-ios-full', '5.1' + pod 'ffmpeg-kit-ios-full', '6.0' end diff --git a/ios/test-app-cocoapods/Podfile.lock b/ios/test-app-cocoapods/Podfile.lock index 9bd3a47..9b3d050 100644 --- a/ios/test-app-cocoapods/Podfile.lock +++ b/ios/test-app-cocoapods/Podfile.lock @@ -1,16 +1,16 @@ PODS: - - ffmpeg-kit-ios-full (5.1) + - ffmpeg-kit-ios-full (6.0) DEPENDENCIES: - - ffmpeg-kit-ios-full (= 5.1) + - ffmpeg-kit-ios-full (= 6.0) SPEC REPOS: trunk: - ffmpeg-kit-ios-full SPEC CHECKSUMS: - ffmpeg-kit-ios-full: 4a02624db22a9ea1e92e3b6707bffe67c76f4aad + ffmpeg-kit-ios-full: 0099a769d22114dde52cdc238397941c32f75d27 -PODFILE CHECKSUM: d33ad1ed4542f47af092078dbea2f23d511b1388 +PODFILE CHECKSUM: 8c42a302da6ad905c148995a942a9ec84a405dfd -COCOAPODS: 1.11.3 +COCOAPODS: 1.12.1 diff --git a/ios/test-app-local-dependency/FFmpegKitIOS/FFmpegKitTest.m b/ios/test-app-local-dependency/FFmpegKitIOS/FFmpegKitTest.m index af68d67..08cfc20 100644 --- a/ios/test-app-local-dependency/FFmpegKitIOS/FFmpegKitTest.m +++ b/ios/test-app-local-dependency/FFmpegKitIOS/FFmpegKitTest.m @@ -77,10 +77,10 @@ } void testParseSimpleCommand() { - NSArray *argumentArray = parseArguments(@"-hide_banner -loop 1 -i file.jpg -filter_complex [0:v]setpts=PTS-STARTPTS[video] -map [video] -vsync 2 -async 1 video.mp4"); + NSArray *argumentArray = parseArguments(@"-hide_banner -loop 1 -i file.jpg -filter_complex [0:v]setpts=PTS-STARTPTS[video] -map [video] -fps_mode cfr video.mp4"); assert(argumentArray != nil); - assertNumber([[NSNumber alloc] initWithInt:14], [[NSNumber alloc] initWithUnsignedLong: [argumentArray count]]); + assertNumber([[NSNumber alloc] initWithInt:12], [[NSNumber alloc] initWithUnsignedLong: [argumentArray count]]); assertString(@"-hide_banner", argumentArray[0]); assertString(@"-loop", argumentArray[1]); @@ -91,11 +91,9 @@ void testParseSimpleCommand() { assertString(@"[0:v]setpts=PTS-STARTPTS[video]", argumentArray[6]); assertString(@"-map", argumentArray[7]); assertString(@"[video]", argumentArray[8]); - assertString(@"-vsync", argumentArray[9]); - assertString(@"2", argumentArray[10]); - assertString(@"-async", argumentArray[11]); - assertString(@"1", argumentArray[12]); - assertString(@"video.mp4", argumentArray[13]); + assertString(@"-fps_mode", argumentArray[9]); + assertString(@"cfr", argumentArray[10]); + assertString(@"video.mp4", argumentArray[11]); } void testParseSingleQuotesInCommand() { diff --git a/ios/test-app-local-dependency/FFmpegKitIOS/PipeViewController.m b/ios/test-app-local-dependency/FFmpegKitIOS/PipeViewController.m index ec28239..64a7fc4 100644 --- a/ios/test-app-local-dependency/FFmpegKitIOS/PipeViewController.m +++ b/ios/test-app-local-dependency/FFmpegKitIOS/PipeViewController.m @@ -263,7 +263,7 @@ - (void)updateProgressDialog { } if (alertController != nil) { - int timeInMilliseconds = [statistics getTime]; + double timeInMilliseconds = [statistics getTime]; int totalVideoDuration = 9000; int percentage = timeInMilliseconds*100/totalVideoDuration; diff --git a/ios/test-app-local-dependency/FFmpegKitIOS/SubtitleViewController.m b/ios/test-app-local-dependency/FFmpegKitIOS/SubtitleViewController.m index 4b9c30e..09ecb4c 100644 --- a/ios/test-app-local-dependency/FFmpegKitIOS/SubtitleViewController.m +++ b/ios/test-app-local-dependency/FFmpegKitIOS/SubtitleViewController.m @@ -259,7 +259,7 @@ - (void)updateProgressDialog { } if (alertController != nil) { - int timeInMilliseconds = [statistics getTime]; + double timeInMilliseconds = [statistics getTime]; int totalVideoDuration = 9000; int percentage = timeInMilliseconds*100/totalVideoDuration; diff --git a/ios/test-app-local-dependency/FFmpegKitIOS/Video.m b/ios/test-app-local-dependency/FFmpegKitIOS/Video.m index f910e28..f6bbfba 100644 --- a/ios/test-app-local-dependency/FFmpegKitIOS/Video.m +++ b/ios/test-app-local-dependency/FFmpegKitIOS/Video.m @@ -44,7 +44,7 @@ + (NSString*)generateCreateVideoWithPipesScript:(NSString *)image1 :(NSString *) [stream2fadein][stream1fadeout]overlay=(main_w-overlay_w)/2:(main_h-overlay_h)/2,trim=duration=1,select=lte(n\\,30)[stream2blended];\ [stream3fadein][stream2fadeout]overlay=(main_w-overlay_w)/2:(main_h-overlay_h)/2,trim=duration=1,select=lte(n\\,30)[stream3blended];\ [stream1overlaid][stream2blended][stream2overlaid][stream3blended][stream3overlaid]concat=n=5:v=1:a=0,scale=w=640:h=424,format=yuv420p[video]\" \ --map [video] -vsync 2 -async 1 -c:v mpeg4 -r 30 %@", image1, image2, image3, videoFile]; +-map [video] -fps_mode cfr -c:v mpeg4 -r 30 %@", image1, image2, image3, videoFile]; } + (NSString*)generateVideoEncodeScript:(NSString *)image1 :(NSString *)image2 :(NSString *)image3 :(NSString *)videoFile :(NSString *)videoCodec :(NSString *)customOptions { @@ -71,7 +71,7 @@ + (NSString*)generateVideoEncodeScriptWithCustomPixelFormat:(NSString *)image1 : [stream2fadein][stream1fadeout]overlay=(main_w-overlay_w)/2:(main_h-overlay_h)/2,trim=duration=1,select=lte(n\\,30)[stream2blended];\ [stream3fadein][stream2fadeout]overlay=(main_w-overlay_w)/2:(main_h-overlay_h)/2,trim=duration=1,select=lte(n\\,30)[stream3blended];\ [stream1overlaid][stream2blended][stream2overlaid][stream3blended][stream3overlaid]concat=n=5:v=1:a=0,scale=w=640:h=424,format=%@[video]\" \ --map [video] -vsync 2 -async 1 %@-c:v %@ -r 30 %@", image1, image2, image3, pixelFormat, customOptions, videoCodec, videoFile]; +-map [video] -fps_mode cfr %@-c:v %@ -r 30 %@", image1, image2, image3, pixelFormat, customOptions, videoCodec, videoFile]; } + (NSString*)generateShakingVideoScript:(NSString *)image1 :(NSString *)image2 :(NSString *)image3 :(NSString *)videoFile { @@ -91,7 +91,7 @@ + (NSString*)generateShakingVideoScript:(NSString *)image1 :(NSString *)image2 : [3:v][stream2overlaid]overlay=x=\'2*mod(n,4)\':y=\'2*mod(n,2)\',trim=duration=3[stream2shaking];\ [3:v][stream3overlaid]overlay=x=\'2*mod(n,4)\':y=\'2*mod(n,2)\',trim=duration=3[stream3shaking];\ [stream1shaking][stream2shaking][stream3shaking]concat=n=3:v=1:a=0,scale=w=640:h=424,format=yuv420p[video]\" \ --map [video] -vsync 2 -async 1 -c:v mpeg4 -r 30 %@", image1, image2, image3, videoFile]; +-map [video] -fps_mode cfr -c:v mpeg4 -r 30 %@", image1, image2, image3, videoFile]; } + (NSString*)generateZscaleVideoScript:(NSString *)inputVideoFilePath :(NSString *)outputVideoFilePath { diff --git a/ios/test-app-local-dependency/FFmpegKitIOS/VideoViewController.m b/ios/test-app-local-dependency/FFmpegKitIOS/VideoViewController.m index f5d8993..c0adccf 100644 --- a/ios/test-app-local-dependency/FFmpegKitIOS/VideoViewController.m +++ b/ios/test-app-local-dependency/FFmpegKitIOS/VideoViewController.m @@ -314,7 +314,7 @@ - (void)updateProgressDialog { } if (alertController != nil) { - int timeInMilliseconds = [statistics getTime]; + double timeInMilliseconds = [statistics getTime]; int totalVideoDuration = 9000; int percentage = timeInMilliseconds*100/totalVideoDuration; diff --git a/linux/test-app-local-dependency/CMakeLists.txt b/linux/test-app-local-dependency/CMakeLists.txt index 23fcc13..43fbd42 100644 --- a/linux/test-app-local-dependency/CMakeLists.txt +++ b/linux/test-app-local-dependency/CMakeLists.txt @@ -1,12 +1,12 @@ cmake_minimum_required(VERSION 3.7) -project(ffmpeg-kit-linux-test VERSION 5.1) +project(ffmpeg-kit-linux-test VERSION 6.0) include(CTest) enable_testing() set(ENV{PKG_CONFIG_PATH} "${CMAKE_SOURCE_DIR}/../../../ffmpeg-kit/prebuilt/bundle-linux/ffmpeg-kit/pkgconfig") find_package(PkgConfig REQUIRED) -pkg_check_modules(FFMPEG_KIT REQUIRED IMPORTED_TARGET ffmpeg-kit=5.1) +pkg_check_modules(FFMPEG_KIT REQUIRED IMPORTED_TARGET ffmpeg-kit=6.0) pkg_check_modules(GTKMM REQUIRED IMPORTED_TARGET gtkmm-3.0>=3.0) configure_file(${CMAKE_CURRENT_SOURCE_DIR}/data/ffmpeg-kit-linux-test-app.sh.in ${CMAKE_CURRENT_BINARY_DIR}/bin/ffmpeg-kit-linux-test-app.sh @ONLY) diff --git a/linux/test-app-local-dependency/src/FFmpegKitTest.cpp b/linux/test-app-local-dependency/src/FFmpegKitTest.cpp index 1675abb..12722fe 100644 --- a/linux/test-app-local-dependency/src/FFmpegKitTest.cpp +++ b/linux/test-app-local-dependency/src/FFmpegKitTest.cpp @@ -28,9 +28,9 @@ using namespace ffmpegkit; void testParseSimpleCommand() { - auto argumentList = FFmpegKitConfig::parseArguments("-hide_banner -loop 1 -i file.jpg -filter_complex [0:v]setpts=PTS-STARTPTS[video] -map [video] -vsync 2 -async 1 video.mp4"); + auto argumentList = FFmpegKitConfig::parseArguments("-hide_banner -loop 1 -i file.jpg -filter_complex [0:v]setpts=PTS-STARTPTS[video] -map [video] -fps_mode cfr video.mp4"); - assert(14 == argumentList.size()); + assert(12 == argumentList.size()); auto it = argumentList.begin(); assertString("-hide_banner", *it++); @@ -42,10 +42,8 @@ void testParseSimpleCommand() { assertString("[0:v]setpts=PTS-STARTPTS[video]", *it++); assertString("-map", *it++); assertString("[video]", *it++); - assertString("-vsync", *it++); - assertString("2", *it++); - assertString("-async", *it++); - assertString("1", *it++); + assertString("-fps_mode", *it++); + assertString("cfr", *it++); assertString("video.mp4", *it++); } diff --git a/linux/test-app-local-dependency/src/PipeTab.cpp b/linux/test-app-local-dependency/src/PipeTab.cpp index 13d3854..8dfbfbe 100644 --- a/linux/test-app-local-dependency/src/PipeTab.cpp +++ b/linux/test-app-local-dependency/src/PipeTab.cpp @@ -109,7 +109,7 @@ void ffmpegkittest::PipeTab::updateProgressDialog(const std::shared_ptrstatistics = statistics; - int timeInMilliseconds = this->statistics->getTime(); + double timeInMilliseconds = this->statistics->getTime(); int totalVideoDuration = 9000; double completePercentage = timeInMilliseconds*100/totalVideoDuration; // progressDialog.update(completePercentage); diff --git a/linux/test-app-local-dependency/src/SubtitleTab.cpp b/linux/test-app-local-dependency/src/SubtitleTab.cpp index 03b36ae..a3f67ec 100644 --- a/linux/test-app-local-dependency/src/SubtitleTab.cpp +++ b/linux/test-app-local-dependency/src/SubtitleTab.cpp @@ -124,7 +124,7 @@ void ffmpegkittest::SubtitleTab::updateProgressDialog(const std::shared_ptrstatistics = statistics; - int timeInMilliseconds = this->statistics->getTime(); + double timeInMilliseconds = this->statistics->getTime(); int totalVideoDuration = 9000; double completePercentage = timeInMilliseconds*100/totalVideoDuration; // progressDialog.update(completePercentage); diff --git a/linux/test-app-local-dependency/src/Video.cpp b/linux/test-app-local-dependency/src/Video.cpp index efb2a34..82a10d9 100644 --- a/linux/test-app-local-dependency/src/Video.cpp +++ b/linux/test-app-local-dependency/src/Video.cpp @@ -40,7 +40,7 @@ std::string ffmpegkittest::Video::generateCreateVideoWithPipesScript(std::string "[stream2starting][stream1ending]blend=all_expr=\'if(gte(X,(W/2)*T/1)*lte(X,W-(W/2)*T/1),B,A)\':shortest=1[stream2blended];" + "[stream3starting][stream2ending]blend=all_expr=\'if(gte(X,(W/2)*T/1)*lte(X,W-(W/2)*T/1),B,A)\':shortest=1[stream3blended];" + "[stream1overlaid][stream2blended][stream2overlaid][stream3blended][stream3overlaid]concat=n=5:v=1:a=0,scale=w=640:h=424,format=yuv420p[video]\"" + - " -map [video] -vsync 2 -async 1 -c:v mpeg4 -r 30 " + videoFilePath; + " -map [video] -fps_mode cfr -c:v mpeg4 -r 30 " + videoFilePath; } std::string ffmpegkittest::Video::generateEncodeVideoScript(std::string image1Path, std::string image2Path, std::string image3Path, std::string videoFilePath, std::string videoCodec, std::string customOptions) { @@ -65,7 +65,7 @@ std::string ffmpegkittest::Video::generateEncodeVideoScript(std::string image1Pa "[stream2starting][stream1ending]blend=all_expr=\'if(gte(X,(W/2)*T/1)*lte(X,W-(W/2)*T/1),B,A)\':shortest=1[stream2blended];" + "[stream3starting][stream2ending]blend=all_expr=\'if(gte(X,(W/2)*T/1)*lte(X,W-(W/2)*T/1),B,A)\':shortest=1[stream3blended];" + "[stream1overlaid][stream2blended][stream2overlaid][stream3blended][stream3overlaid]concat=n=5:v=1:a=0,scale=w=640:h=424,format=" + pixelFormat + "[video]\"" + - " -map [video] -vsync 2 -async 1 " + customOptions + "-c:v " + videoCodec + " -r 30 " + videoFilePath; + " -map [video] -fps_mode cfr " + customOptions + "-c:v " + videoCodec + " -r 30 " + videoFilePath; } std::string ffmpegkittest::Video::generateShakingVideoScript(std::string image1Path, std::string image2Path, std::string image3Path, std::string videoFilePath) { @@ -85,7 +85,7 @@ std::string ffmpegkittest::Video::generateShakingVideoScript(std::string image1P "[3:v][stream2overlaid]overlay=x=\'2*mod(n,4)\':y=\'2*mod(n,2)\',trim=duration=3[stream2shaking];" + "[3:v][stream3overlaid]overlay=x=\'2*mod(n,4)\':y=\'2*mod(n,2)\',trim=duration=3[stream3shaking];" + "[stream1shaking][stream2shaking][stream3shaking]concat=n=3:v=1:a=0,scale=w=640:h=424,format=yuv420p[video]\"" + - " -map [video] -vsync 2 -async 1 -c:v mpeg4 -r 30 " + videoFilePath; + " -map [video] -fps_mode cfr -c:v mpeg4 -r 30 " + videoFilePath; } std::string ffmpegkittest::Video::generateZscaleVideoScript(std::string inputVideoFilePath, std::string outputVideoFilePath) { diff --git a/linux/test-app-local-dependency/src/VideoTab.cpp b/linux/test-app-local-dependency/src/VideoTab.cpp index bc238ea..7286f6b 100644 --- a/linux/test-app-local-dependency/src/VideoTab.cpp +++ b/linux/test-app-local-dependency/src/VideoTab.cpp @@ -101,7 +101,7 @@ void ffmpegkittest::VideoTab::updateProgressDialog(const std::shared_ptrstatistics = statistics; - int timeInMilliseconds = this->statistics->getTime(); + double timeInMilliseconds = this->statistics->getTime(); int totalVideoDuration = 9000; double completePercentage = timeInMilliseconds*100/totalVideoDuration; // progressDialog.update(completePercentage); diff --git a/linux/test-app-local-dependency/src/main.cpp b/linux/test-app-local-dependency/src/main.cpp index a02f5c7..bedca8b 100644 --- a/linux/test-app-local-dependency/src/main.cpp +++ b/linux/test-app-local-dependency/src/main.cpp @@ -24,6 +24,7 @@ #include "MediaInformationParserTest.h" #include "FFmpegKitTest.h" #include +#include int main(int argc, char** argv) { auto app = Gtk::Application::create(argc, argv, "com.arthenica.ffmpegkit"); @@ -31,6 +32,9 @@ int main(int argc, char** argv) { application.set_default_icon_name("ffmpeg-kit-linux-test"); application.set_icon_name("ffmpeg-kit-linux-test"); + // FIX DEFAULT LOCALE AFTER GTK INIT + setlocale(LC_ALL, "C"); + // RUN UNIT TESTS BEFORE STARTING THE APPLICATION testMediaInformationJsonParser(); testFFmpegKit(); diff --git a/macos/test-app-cocoapods/FFmpegKitMACOS.xcworkspace/xcuserdata/sue.xcuserdatad/UserInterfaceState.xcuserstate b/macos/test-app-cocoapods/FFmpegKitMACOS.xcworkspace/xcuserdata/sue.xcuserdatad/UserInterfaceState.xcuserstate new file mode 100644 index 0000000000000000000000000000000000000000..098f2dd5f9d53e7fa757fd6a91f3f7482780ea92 GIT binary patch literal 7889 zcmbVR34Bv!wm;uZ(%xpfX=#$1uoc@vDYT{wT@bKo(_$%IY-lNEiD`0M0%;O+Q`%CI zPZSwPM-gQlM1-~|g6p_F#}UREhjDbAQ33Z|9Cds;j^j9p3%+yjP106)@AuxLKXUWk zZ#m0%mj5~FiUb2<%;7iz1Q<|(8Z?jssi5u1*&sy4KsdA_#~byn4d7^5PAnYh$O(6? z6MQi-1IX3;JSMKm-5?AKer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