Recherche avancée

Médias (0)

Mot : - Tags -/content

Aucun média correspondant à vos critères n’est disponible sur le site.

Autres articles (26)

  • Utilisation et configuration du script

    19 janvier 2011, par

    Informations spécifiques à la distribution Debian
    Si vous utilisez cette distribution, vous devrez activer les dépôts "debian-multimedia" comme expliqué ici :
    Depuis la version 0.3.1 du script, le dépôt peut être automatiquement activé à la suite d’une question.
    Récupération du script
    Le script d’installation peut être récupéré de deux manières différentes.
    Via svn en utilisant la commande pour récupérer le code source à jour :
    svn co (...)

  • Ajouter notes et légendes aux images

    7 février 2011, par

    Pour pouvoir ajouter notes et légendes aux images, la première étape est d’installer le plugin "Légendes".
    Une fois le plugin activé, vous pouvez le configurer dans l’espace de configuration afin de modifier les droits de création / modification et de suppression des notes. Par défaut seuls les administrateurs du site peuvent ajouter des notes aux images.
    Modification lors de l’ajout d’un média
    Lors de l’ajout d’un média de type "image" un nouveau bouton apparait au dessus de la prévisualisation (...)

  • Contribute to translation

    13 avril 2011

    You can help us to improve the language used in the software interface to make MediaSPIP more accessible and user-friendly. You can also translate the interface into any language that allows it to spread to new linguistic communities.
    To do this, we use the translation interface of SPIP where the all the language modules of MediaSPIP are available. Just subscribe to the mailing list and request further informantion on translation.
    MediaSPIP is currently available in French and English (...)

Sur d’autres sites (7739)

  • Integrating FFMpeg in Native Android Application with C++ results in bunch of errors [closed]

    13 décembre 2024, par BraveEvidence

    I need to integrate ffmpeg in my android app, i don't want to usee ffmpegkit as that is not properly maintained, i cloned ffmpeg-android-maker and then ran ./ffmpeg-android-maker.sh it created build folder and output folder,
The output folder looks like this

    


    enter image description here

    


    I have created a kotlin android project using android studio, so i have written all the code to pick the video and i have the video uri with me in kotlin, i also added a C++ module with help of Android studio and it did all the configuration in build.gradle and also created CMake file for me.

    


    For now I just want to concentrate on building the android project so forget about writing any C++ code, I then created jniLibs in main folder and in jniLibs I copied arm64-v8a,armeabi-v7a, x86,x86_64 from the output folder of ffmpeg-android-maker and then I want to cpp folder of my android project which is also in main folder and in cpp folder I created include folder and copied libavcodec, libavdevice, libavfilter etc then I updated my CmakeLists.txt to following

    


    cmake_minimum_required(VERSION 3.22.1)

project("myandroidapp")

#set(FFMPEG_LIBS_DIR ${CMAKE_SOURCE_DIR}/src/main/jniLibs)

include_directories(${CMAKE_SOURCE_DIR}/src/main/cpp/include)

set_target_properties(${CMAKE_PROJECT_NAME} PROPERTIES
        LIBRARY_OUTPUT_DIRECTORY ${CMAKE_SOURCE_DIR}/src/main/jniLibs/${ANDROID_ABI}
)

add_library(${CMAKE_PROJECT_NAME} SHARED
    # List C/C++ source files with relative paths to this CMakeLists.txt.
    myandroidapp.cpp)


# Specifies libraries CMake should link to your target library. You
# can link libraries from various origins, such as libraries defined in this
# build script, prebuilt third-party libraries, or Android system libraries.
target_link_libraries(${CMAKE_PROJECT_NAME}
    # List libraries link to the target library
    android
    log
        avcodec
        avdevice
        avfilter
        avformat
        avutil
        swresample
        swscale)


    


    Then in build.gradle I did following

    


    externalNativeBuild {
        cmake {
            path = file("src/main/cpp/CMakeLists.txt")
            version = "3.22.1"
        }
    }

    sourceSets {
        getByName("main") {
            jniLibs.srcDirs("src/main/jniLibs")
        }
    }

    packaging {
        jniLibs.pickFirsts.add("lib/arm64-v8a/libavcodec.so")
        jniLibs.pickFirsts.add("lib/arm64-v8a/libavformat.so")
        jniLibs.pickFirsts.add("lib/arm64-v8a/libavutil.so")
        jniLibs.pickFirsts.add("lib/arm64-v8a/libswscale.so")
        jniLibs.pickFirsts.add("lib/armeabi-v7a/libavcodec.so")
        jniLibs.pickFirsts.add("lib/armeabi-v7a/libavformat.so")
        jniLibs.pickFirsts.add("lib/armeabi-v7a/libavutil.so")
        jniLibs.pickFirsts.add("lib/armeabi-v7a/libswscale.so")
        jniLibs.pickFirsts.add("lib/x86/libavcodec.so")
        jniLibs.pickFirsts.add("lib/x86/libavformat.so")
        jniLibs.pickFirsts.add("lib/x86/libavutil.so")
        jniLibs.pickFirsts.add("lib/x86/libswscale.so")
        jniLibs.pickFirsts.add("lib/x86_64/libavcodec.so")
        jniLibs.pickFirsts.add("lib/x86_64/libavformat.so")
        jniLibs.pickFirsts.add("lib/x86_64/libavutil.so")
        jniLibs.pickFirsts.add("lib/x86_64/libswscale.so")
    }


    


    when I try to build my project I get following error

    


    [CXX1429] error when building with cmake using /Users/transformhub/Downloads/mycam/ffmpeg/MyAndroidapp/app/src/main/cpp/CMakeLists.txt: -- Configuring incomplete, errors occurred!
See also "/Users/transformhub/Downloads/mycam/ffmpeg/MyAndroidapp/app/.cxx/Debug/406wr1e2/arm64-v8a/CMakeFiles/CMakeOutput.log".

C++ build system [configure] failed while executing:
    /Users/transformhub/Library/Android/sdk/cmake/3.22.1/bin/cmake \
      -H/Users/transformhub/Downloads/mycam/ffmpeg/MyAndroidapp/app/src/main/cpp \
      -DCMAKE_SYSTEM_NAME=Android \
      -DCMAKE_EXPORT_COMPILE_COMMANDS=ON \
      -DCMAKE_SYSTEM_VERSION=24 \
      -DANDROID_PLATFORM=android-24 \
      -DANDROID_ABI=arm64-v8a \
      -DCMAKE_ANDROID_ARCH_ABI=arm64-v8a \
      -DANDROID_NDK=/Users/transformhub/Library/Android/sdk/ndk/26.1.10909125 \
      -DCMAKE_ANDROID_NDK=/Users/transformhub/Library/Android/sdk/ndk/26.1.10909125 \
      -DCMAKE_TOOLCHAIN_FILE=/Users/transformhub/Library/Android/sdk/ndk/26.1.10909125/build/cmake/android.toolchain.cmake \
      -DCMAKE_MAKE_PROGRAM=/Users/transformhub/Library/Android/sdk/cmake/3.22.1/bin/ninja \
      -DCMAKE_LIBRARY_OUTPUT_DIRECTORY=/Users/transformhub/Downloads/mycam/ffmpeg/MyAndroidapp/app/build/intermediates/cxx/Debug/406wr1e2/obj/arm64-v8a \
      -DCMAKE_RUNTIME_OUTPUT_DIRECTORY=/Users/transformhub/Downloads/mycam/ffmpeg/MyAndroidapp/app/build/intermediates/cxx/Debug/406wr1e2/obj/arm64-v8a \
      -DCMAKE_BUILD_TYPE=Debug \
      -B/Users/transformhub/Downloads/mycam/ffmpeg/MyAndroidapp/app/.cxx/Debug/406wr1e2/arm64-v8a \
      -GNinja
  from /Users/transformhub/Downloads/mycam/ffmpeg/MyAndroidapp/app
CMake Error at CMakeLists.txt:15 (set_target_properties):
  set_target_properties Can not find target to add properties to:
  myandroidapp : com.android.ide.common.process.ProcessException: -- Configuring incomplete, errors occurred!
See also "/Users/transformhub/Downloads/mycam/ffmpeg/MyAndroidapp/app/.cxx/Debug/406wr1e2/arm64-v8a/CMakeFiles/CMakeOutput.log".

C++ build system [configure] failed while executing:
    /Users/transformhub/Library/Android/sdk/cmake/3.22.1/bin/cmake \
      -H/Users/transformhub/Downloads/mycam/ffmpeg/MyAndroidapp/app/src/main/cpp \
      -DCMAKE_SYSTEM_NAME=Android \
      -DCMAKE_EXPORT_COMPILE_COMMANDS=ON \
      -DCMAKE_SYSTEM_VERSION=24 \
      -DANDROID_PLATFORM=android-24 \
      -DANDROID_ABI=arm64-v8a \
      -DCMAKE_ANDROID_ARCH_ABI=arm64-v8a \
      -DANDROID_NDK=/Users/transformhub/Library/Android/sdk/ndk/26.1.10909125 \
      -DCMAKE_ANDROID_NDK=/Users/transformhub/Library/Android/sdk/ndk/26.1.10909125 \
      -DCMAKE_TOOLCHAIN_FILE=/Users/transformhub/Library/Android/sdk/ndk/26.1.10909125/build/cmake/android.toolchain.cmake \
      -DCMAKE_MAKE_PROGRAM=/Users/transformhub/Library/Android/sdk/cmake/3.22.1/bin/ninja \
      -DCMAKE_LIBRARY_OUTPUT_DIRECTORY=/Users/transformhub/Downloads/mycam/ffmpeg/MyAndroidapp/app/build/intermediates/cxx/Debug/406wr1e2/obj/arm64-v8a \
      -DCMAKE_RUNTIME_OUTPUT_DIRECTORY=/Users/transformhub/Downloads/mycam/ffmpeg/MyAndroidapp/app/build/intermediates/cxx/Debug/406wr1e2/obj/arm64-v8a \
      -DCMAKE_BUILD_TYPE=Debug \
      -B/Users/transformhub/Downloads/mycam/ffmpeg/MyAndroidapp/app/.cxx/Debug/406wr1e2/arm64-v8a \
      -GNinja
  from /Users/transformhub/Downloads/mycam/ffmpeg/MyAndroidapp/app
CMake Error at CMakeLists.txt:15 (set_target_properties):
  set_target_properties Can not find target to add properties to:
  myandroidapp
    at com.android.build.gradle.internal.cxx.process.ExecuteProcessKt.execute(ExecuteProcess.kt:288)
    at com.android.build.gradle.internal.cxx.process.ExecuteProcessKt$executeProcess$1.invoke(ExecuteProcess.kt:108)
    at com.android.build.gradle.internal.cxx.process.ExecuteProcessKt$executeProcess$1.invoke(ExecuteProcess.kt:106)
    at com.android.build.gradle.internal.cxx.timing.TimingEnvironmentKt.time(TimingEnvironment.kt:32)
    at com.android.build.gradle.internal.cxx.process.ExecuteProcessKt.executeProcess(ExecuteProcess.kt:106)
    at com.android.build.gradle.internal.cxx.process.ExecuteProcessKt.executeProcess$default(ExecuteProcess.kt:85)
    at com.android.build.gradle.tasks.CmakeQueryMetadataGenerator.executeProcess(CmakeFileApiMetadataGenerator.kt:59)
    at com.android.build.gradle.tasks.ExternalNativeJsonGenerator$configureOneAbi$1$1$3.invoke(ExternalNativeJsonGenerator.kt:247)
    at com.android.build.gradle.tasks.ExternalNativeJsonGenerator$configureOneAbi$1$1$3.invoke(ExternalNativeJsonGenerator.kt:247)
    at com.android.build.gradle.internal.cxx.timing.TimingEnvironmentKt.time(TimingEnvironment.kt:32)
    at com.android.build.gradle.tasks.ExternalNativeJsonGenerator.configureOneAbi(ExternalNativeJsonGenerator.kt:247)
    at com.android.build.gradle.tasks.ExternalNativeJsonGenerator.configure(ExternalNativeJsonGenerator.kt:113)
    at com.android.build.gradle.tasks.ExternalNativeBuildJsonTask.doTaskAction(ExternalNativeBuildJsonTask.kt:89)
    at com.android.build.gradle.internal.tasks.UnsafeOutputsTask$taskAction$$inlined$recordTaskAction$1.invoke(BaseTask.kt:66)
    at com.android.build.gradle.internal.tasks.Blocks.recordSpan(Blocks.java:51)
    at com.android.build.gradle.internal.tasks.UnsafeOutputsTask.taskAction(UnsafeOutputsTask.kt:81)
    at jdk.internal.reflect.GeneratedMethodAccessor172.invoke(Unknown Source)
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.base/java.lang.reflect.Method.invoke(Unknown Source)
    at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:125)
    at org.gradle.api.internal.project.taskfactory.StandardTaskAction.doExecute(StandardTaskAction.java:58)
    at org.gradle.api.internal.project.taskfactory.StandardTaskAction.execute(StandardTaskAction.java:51)
    at org.gradle.api.internal.project.taskfactory.StandardTaskAction.execute(StandardTaskAction.java:29)
    at org.gradle.api.internal.tasks.execution.TaskExecution$3.run(TaskExecution.java:244)
    at org.gradle.internal.operations.DefaultBuildOperationRunner$1.execute(DefaultBuildOperationRunner.java:29)
    at org.gradle.internal.operations.DefaultBuildOperationRunner$1.execute(DefaultBuildOperationRunner.java:26)
    at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:66)
    at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:59)
    at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:157)
    at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:59)
    at org.gradle.internal.operations.DefaultBuildOperationRunner.run(DefaultBuildOperationRunner.java:47)
    at org.gradle.internal.operations.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:68)
    at org.gradle.api.internal.tasks.execution.TaskExecution.executeAction(TaskExecution.java:229)
    at org.gradle.api.internal.tasks.execution.TaskExecution.executeActions(TaskExecution.java:212)
    at org.gradle.api.internal.tasks.execution.TaskExecution.executeWithPreviousOutputFiles(TaskExecution.java:195)
    at org.gradle.api.internal.tasks.execution.TaskExecution.execute(TaskExecution.java:162)
    at org.gradle.internal.execution.steps.ExecuteStep.executeInternal(ExecuteStep.java:105)
    at org.gradle.internal.execution.steps.ExecuteStep.access$000(ExecuteStep.java:44)
    at org.gradle.internal.execution.steps.ExecuteStep$1.call(ExecuteStep.java:59)
    at org.gradle.internal.execution.steps.ExecuteStep$1.call(ExecuteStep.java:56)
    at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:200)
    at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:195)
    at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:66)
    at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:59)
    at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:157)
    at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:59)
    at org.gradle.internal.operations.DefaultBuildOperationRunner.call(DefaultBuildOperationRunner.java:53)
    at org.gradle.internal.operations.DefaultBuildOperationExecutor.call(DefaultBuildOperationExecutor.java:73)
    at org.gradle.internal.execution.steps.ExecuteStep.execute(ExecuteStep.java:56)
    at org.gradle.internal.execution.steps.ExecuteStep.execute(ExecuteStep.java:44)
    at org.gradle.internal.execution.steps.CancelExecutionStep.execute(CancelExecutionStep.java:41)
    at org.gradle.internal.execution.steps.TimeoutStep.executeWithoutTimeout(TimeoutStep.java:74)
    at org.gradle.internal.execution.steps.TimeoutStep.execute(TimeoutStep.java:55)
    at org.gradle.internal.execution.steps.PreCreateOutputParentsStep.execute(PreCreateOutputParentsStep.java:50)
    at org.gradle.internal.execution.steps.PreCreateOutputParentsStep.execute(PreCreateOutputParentsStep.java:28)
    at org.gradle.internal.execution.steps.RemovePreviousOutputsStep.execute(RemovePreviousOutputsStep.java:67)
    at org.gradle.internal.execution.steps.RemovePreviousOutputsStep.execute(RemovePreviousOutputsStep.java:37)
    at org.gradle.internal.execution.steps.BroadcastChangingOutputsStep.execute(BroadcastChangingOutputsStep.java:61)
    at org.gradle.internal.execution.steps.BroadcastChangingOutputsStep.execute(BroadcastChangingOutputsStep.java:26)
    at org.gradle.internal.execution.steps.CaptureOutputsAfterExecutionStep.execute(CaptureOutputsAfterExecutionStep.java:67)
    at org.gradle.internal.execution.steps.CaptureOutputsAfterExecutionStep.execute(CaptureOutputsAfterExecutionStep.java:45)
    at org.gradle.internal.execution.steps.ResolveInputChangesStep.execute(ResolveInputChangesStep.java:40)
    at org.gradle.internal.execution.steps.ResolveInputChangesStep.execute(ResolveInputChangesStep.java:29)
    at org.gradle.internal.execution.steps.BuildCacheStep.executeWithoutCache(BuildCacheStep.java:189)
    at org.gradle.internal.execution.steps.BuildCacheStep.lambda$execute$1(BuildCacheStep.java:75)
    at org.gradle.internal.Either$Right.fold(Either.java:175)
    at org.gradle.internal.execution.caching.CachingState.fold(CachingState.java:62)
    at org.gradle.internal.execution.steps.BuildCacheStep.execute(BuildCacheStep.java:73)
    at org.gradle.internal.execution.steps.BuildCacheStep.execute(BuildCacheStep.java:48)
    at org.gradle.internal.execution.steps.StoreExecutionStateStep.execute(StoreExecutionStateStep.java:46)
    at org.gradle.internal.execution.steps.StoreExecutionStateStep.execute(StoreExecutionStateStep.java:35)
    at org.gradle.internal.execution.steps.SkipUpToDateStep.executeBecause(SkipUpToDateStep.java:76)
    at org.gradle.internal.execution.steps.SkipUpToDateStep.lambda$execute$2(SkipUpToDateStep.java:54)
    at java.base/java.util.Optional.orElseGet(Unknown Source)
    at org.gradle.internal.execution.steps.SkipUpToDateStep.execute(SkipUpToDateStep.java:54)
    at org.gradle.internal.execution.steps.SkipUpToDateStep.execute(SkipUpToDateStep.java:36)
    at org.gradle.internal.execution.steps.legacy.MarkSnapshottingInputsFinishedStep.execute(MarkSnapshottingInputsFinishedStep.java:37)
    at org.gradle.internal.execution.steps.legacy.MarkSnapshottingInputsFinishedStep.execute(MarkSnapshottingInputsFinishedStep.java:27)
    at org.gradle.internal.execution.steps.ResolveIncrementalCachingStateStep.executeDelegate(ResolveIncrementalCachingStateStep.java:49)
    at org.gradle.internal.execution.steps.ResolveIncrementalCachingStateStep.executeDelegate(ResolveIncrementalCachingStateStep.java:27)
    at org.gradle.internal.execution.steps.AbstractResolveCachingStateStep.execute(AbstractResolveCachingStateStep.java:71)
    at org.gradle.internal.execution.steps.AbstractResolveCachingStateStep.execute(AbstractResolveCachingStateStep.java:39)
    at org.gradle.internal.execution.steps.ResolveChangesStep.execute(ResolveChangesStep.java:65)
    at org.gradle.internal.execution.steps.ResolveChangesStep.execute(ResolveChangesStep.java:36)
    at org.gradle.internal.execution.steps.ValidateStep.execute(ValidateStep.java:106)
    at org.gradle.internal.execution.steps.ValidateStep.execute(ValidateStep.java:55)
    at org.gradle.internal.execution.steps.AbstractCaptureStateBeforeExecutionStep.execute(AbstractCaptureStateBeforeExecutionStep.java:64)
    at org.gradle.internal.execution.steps.AbstractCaptureStateBeforeExecutionStep.execute(AbstractCaptureStateBeforeExecutionStep.java:43)
    at org.gradle.internal.execution.steps.AbstractSkipEmptyWorkStep.executeWithNonEmptySources(AbstractSkipEmptyWorkStep.java:125)
    at org.gradle.internal.execution.steps.AbstractSkipEmptyWorkStep.execute(AbstractSkipEmptyWorkStep.java:56)
    at org.gradle.internal.execution.steps.AbstractSkipEmptyWorkStep.execute(AbstractSkipEmptyWorkStep.java:36)
    at org.gradle.internal.execution.steps.legacy.MarkSnapshottingInputsStartedStep.execute(MarkSnapshottingInputsStartedStep.java:38)
    at org.gradle.internal.execution.steps.LoadPreviousExecutionStateStep.execute(LoadPreviousExecutionStateStep.java:36)
    at org.gradle.internal.execution.steps.LoadPreviousExecutionStateStep.execute(LoadPreviousExecutionStateStep.java:23)
    at org.gradle.internal.execution.steps.HandleStaleOutputsStep.execute(HandleStaleOutputsStep.java:75)
    at org.gradle.internal.execution.steps.HandleStaleOutputsStep.execute(HandleStaleOutputsStep.java:41)
    at org.gradle.internal.execution.steps.AssignMutableWorkspaceStep.lambda$execute$0(AssignMutableWorkspaceStep.java:35)
    at org.gradle.api.internal.tasks.execution.TaskExecution$4.withWorkspace(TaskExecution.java:289)
    at org.gradle.internal.execution.steps.AssignMutableWorkspaceStep.execute(AssignMutableWorkspaceStep.java:31)
    at org.gradle.internal.execution.steps.AssignMutableWorkspaceStep.execute(AssignMutableWorkspaceStep.java:22)
    at org.gradle.internal.execution.steps.ChoosePipelineStep.execute(ChoosePipelineStep.java:40)
    at org.gradle.internal.execution.steps.ChoosePipelineStep.execute(ChoosePipelineStep.java:23)
    at org.gradle.internal.execution.steps.ExecuteWorkBuildOperationFiringStep.lambda$execute$2(ExecuteWorkBuildOperationFiringStep.java:67)
    at java.base/java.util.Optional.orElseGet(Unknown Source)
    at org.gradle.internal.execution.steps.ExecuteWorkBuildOperationFiringStep.execute(ExecuteWorkBuildOperationFiringStep.java:67)
    at org.gradle.internal.execution.steps.ExecuteWorkBuildOperationFiringStep.execute(ExecuteWorkBuildOperationFiringStep.java:39)
    at org.gradle.internal.execution.steps.IdentityCacheStep.execute(IdentityCacheStep.java:46)
    at org.gradle.internal.execution.steps.IdentityCacheStep.execute(IdentityCacheStep.java:34)
    at org.gradle.internal.execution.steps.IdentifyStep.execute(IdentifyStep.java:48)
    at org.gradle.internal.execution.steps.IdentifyStep.execute(IdentifyStep.java:35)
    at org.gradle.internal.execution.impl.DefaultExecutionEngine$1.execute(DefaultExecutionEngine.java:61)
    at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeIfValid(ExecuteActionsTaskExecuter.java:127)
    at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:116)
    at org.gradle.api.internal.tasks.execution.FinalizePropertiesTaskExecuter.execute(FinalizePropertiesTaskExecuter.java:46)
    at org.gradle.api.internal.tasks.execution.ResolveTaskExecutionModeExecuter.execute(ResolveTaskExecutionModeExecuter.java:51)
    at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:57)
    at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:74)
    at org.gradle.api.internal.tasks.execution.CatchExceptionTaskExecuter.execute(CatchExceptionTaskExecuter.java:36)
    at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.executeTask(EventFiringTaskExecuter.java:77)
    at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.call(EventFiringTaskExecuter.java:55)
    at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.call(EventFiringTaskExecuter.java:52)
    at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:200)
    at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:195)
    at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:66)
    at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:59)
    at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:157)
    at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:59)
    at org.gradle.internal.operations.DefaultBuildOperationRunner.call(DefaultBuildOperationRunner.java:53)
    at org.gradle.internal.operations.DefaultBuildOperationExecutor.call(DefaultBuildOperationExecutor.java:73)
    at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter.execute(EventFiringTaskExecuter.java:52)
    at org.gradle.execution.plan.LocalTaskNodeExecutor.execute(LocalTaskNodeExecutor.java:42)
    at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$InvokeNodeExecutorsAction.execute(DefaultTaskExecutionGraph.java:331)
    at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$InvokeNodeExecutorsAction.execute(DefaultTaskExecutionGraph.java:318)
    at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$BuildOperationAwareExecutionAction.lambda$execute$0(DefaultTaskExecutionGraph.java:314)
    at org.gradle.internal.operations.CurrentBuildOperationRef.with(CurrentBuildOperationRef.java:80)
    at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$BuildOperationAwareExecutionAction.execute(DefaultTaskExecutionGraph.java:314)
    at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$BuildOperationAwareExecutionAction.execute(DefaultTaskExecutionGraph.java:303)
    at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.execute(DefaultPlanExecutor.java:463)
    at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.run(DefaultPlanExecutor.java:380)
    at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:64)
    at org.gradle.internal.concurrent.AbstractManagedExecutor$1.run(AbstractManagedExecutor.java:47)
    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at java.base/java.lang.Thread.run(Unknown Source)
Caused by: com.android.ide.common.process.ProcessException: Error while executing process /Users/transformhub/Library/Android/sdk/cmake/3.22.1/bin/cmake with arguments {-H/Users/transformhub/Downloads/mycam/ffmpeg/MyAndroidapp/app/src/main/cpp -DCMAKE_SYSTEM_NAME=Android -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DCMAKE_SYSTEM_VERSION=24 -DANDROID_PLATFORM=android-24 -DANDROID_ABI=arm64-v8a -DCMAKE_ANDROID_ARCH_ABI=arm64-v8a -DANDROID_NDK=/Users/transformhub/Library/Android/sdk/ndk/26.1.10909125 -DCMAKE_ANDROID_NDK=/Users/transformhub/Library/Android/sdk/ndk/26.1.10909125 -DCMAKE_TOOLCHAIN_FILE=/Users/transformhub/Library/Android/sdk/ndk/26.1.10909125/build/cmake/android.toolchain.cmake -DCMAKE_MAKE_PROGRAM=/Users/transformhub/Library/Android/sdk/cmake/3.22.1/bin/ninja -DCMAKE_LIBRARY_OUTPUT_DIRECTORY=/Users/transformhub/Downloads/mycam/ffmpeg/MyAndroidapp/app/build/intermediates/cxx/Debug/406wr1e2/obj/arm64-v8a -DCMAKE_RUNTIME_OUTPUT_DIRECTORY=/Users/transformhub/Downloads/mycam/ffmpeg/MyAndroidapp/app/build/intermediates/cxx/Debug/406wr1e2/obj/arm64-v8a -DCMAKE_BUILD_TYPE=Debug -B/Users/transformhub/Downloads/mycam/ffmpeg/MyAndroidapp/app/.cxx/Debug/406wr1e2/arm64-v8a -GNinja}
    at com.android.build.gradle.internal.process.GradleProcessResult.buildProcessException(GradleProcessResult.java:73)
    at com.android.build.gradle.internal.process.GradleProcessResult.assertNormalExitValue(GradleProcessResult.java:48)
    at com.android.build.gradle.internal.cxx.process.ExecuteProcessKt.execute(ExecuteProcess.kt:277)
    ... 143 more
Caused by: org.gradle.process.internal.ExecException: Process 'command '/Users/transformhub/Library/Android/sdk/cmake/3.22.1/bin/cmake'' finished with non-zero exit value 1
    at org.gradle.process.internal.DefaultExecHandle$ExecResultImpl.assertNormalExitValue(DefaultExecHandle.java:442)
    at com.android.build.gradle.internal.process.GradleProcessResult.assertNormalExitValue(GradleProcessResult.java:46)
    ... 144 more


    


    Here is the complete source code

    


  • Merge mp3 files at specific duration in Android

    18 mai 2017, par Gio Vanno

    First I’m new in Android.

    I’m trying to make an app that can combine a lot of music(mp3 files im using) at specific duration with the selected music via seekbar.

    My main plan is to merge multiple audio files at specific time.

    example :
    when i pressed the drum button at 5 sec(via seekbar), and then guitar button at 6 sec.

    when i clicked the merge button, it will merged the selected mp3 file with those 2 mp3 files at their respective time.

    from what i’m searching so far, the possible way is by using ffmpeg from this :

    -How to overlay two audio files using ffmpeg

    -Merge mp3 files using FFmpeg on Android

    but i don’t see them merged at specified time.

    maybe there’s another way besides ffmpeg,or i’ve missed something ?

    thank you

  • Firebase Functions : completing long processes without touching maximum timeout

    10 juin 2017, par Scott Ewing

    I have to transcode videos from webm to mp4 when they’re uploaded to firebase storage. I have a code demo here that works, but if the uploaded video is too large, firebase functions will time out on me before the conversion is finished. I know it’s possible to increase the timeout limit for the function, but that seems messy, since I can’t ever confirm the process will take less time than the timeout limit.

    Is there some way to stop firebase from timing out without just increasing the maximum timeout limit ?

    If not, is there a way to complete time consuming processes (like video conversion) while still having each process start using firebase function triggers ?

    If even completing time consuming processes using firebase functions isn’t something that really exists, is there some way to speed up the conversion of fluent-ffmpeg without touching the quality that much ? (I realize this part is a lot to ask. I plan on lowering the quality if I absolutely have to, as the reason webms are being converted to mp4 is for IOS devices)

    For reference, here’s the main portion of the demo I mentioned. As I said before, the full code can be seen here, but this section of the code copied over is the part that creates the Promise that makes sure the transcoding finishes. The full code is only 70 something lines, so it should be relatively easy to go through if needed.

    const functions = require('firebase-functions');
    const mkdirp = require('mkdirp-promise');
    const gcs = require('@google-cloud/storage')();
    const Promise = require('bluebird');
    const ffmpeg = require('fluent-ffmpeg');
    const ffmpeg_static = require('ffmpeg-static');

    (There’s a bunch of text parsing code here, followed by this next chunk of code inside an onChange event)

    function promisifyCommand (command) {
       return new Promise( (cb) => {
           command
           .on( 'end',   ()      => { cb(null)  } )
           .on( 'error', (error) => { cb(error) } )
           .run();
       })
    }
    return mkdirp(tempLocalDir).then(() => {
       console.log('Directory Created')
       //Download item from bucket
       const bucket = gcs.bucket(object.bucket);
       return bucket.file(filePath).download({destination: tempLocalFile}).then(() => {
         console.log('file downloaded to convert. Location:', tempLocalFile)
         cmd = ffmpeg({source:tempLocalFile})
                  .setFfmpegPath(ffmpeg_static.path)
                  .inputFormat(fileExtension)
                  .output(tempLocalMP4File)
         cmd = promisifyCommand(cmd)
         return cmd.then(() => {
           //Getting here takes forever, because video transcoding takes forever!
           console.log('mp4 created at ', tempLocalMP4File)
           return bucket.upload(tempLocalMP4File, {
               destination: MP4FilePath
           }).then(() => {
             console.log('mp4 uploaded at', filePath);
           });
         })
       });
     });