
Recherche avancée
Médias (2)
-
Granite de l’Aber Ildut
9 septembre 2011, par
Mis à jour : Septembre 2011
Langue : français
Type : Texte
-
Géodiversité
9 septembre 2011, par ,
Mis à jour : Août 2018
Langue : français
Type : Texte
Autres articles (28)
-
La file d’attente de SPIPmotion
28 novembre 2010, parUne file d’attente stockée dans la base de donnée
Lors de son installation, SPIPmotion crée une nouvelle table dans la base de donnée intitulée spip_spipmotion_attentes.
Cette nouvelle table est constituée des champs suivants : id_spipmotion_attente, l’identifiant numérique unique de la tâche à traiter ; id_document, l’identifiant numérique du document original à encoder ; id_objet l’identifiant unique de l’objet auquel le document encodé devra être attaché automatiquement ; objet, le type d’objet auquel (...) -
Publier sur MédiaSpip
13 juin 2013Puis-je poster des contenus à partir d’une tablette Ipad ?
Oui, si votre Médiaspip installé est à la version 0.2 ou supérieure. Contacter au besoin l’administrateur de votre MédiaSpip pour le savoir -
Contribute to documentation
13 avril 2011Documentation is vital to the development of improved technical capabilities.
MediaSPIP welcomes documentation by users as well as developers - including : critique of existing features and functions articles contributed by developers, administrators, content producers and editors screenshots to illustrate the above translations of existing documentation into other languages
To contribute, register to the project users’ mailing (...)
Sur d’autres sites (6003)
-
MobileFFMPEG Output file #0 does not contain any stream
30 septembre 2020, par AlhajI am using implementation 'com.arthenica:mobile-ffmpeg-full:4.4'


I just want o crop audio file to 10 second to 20 second


'''
fun cropAudio(input :String)


val newFileName = UUID.randomUUID().toString()

 val location: String = getBatchDirectoryName()!!

 val output: String = location + "/" + newFileName + ".mp3"

 val temp=" -i $input -ss 60 -to 70 $output"

 Log.e("alhaj", " a $s")

 FFmpeg.execute(temp, object : ExecuteCallback {

 fun onSuccess(message: String?) {
 uploadOnFirebase(output, title)
 mediaPlayer.stop()
 Log.e("alhaj", message!!)
 }

 override fun apply(executionId: kotlin.Long, returnCode: Int) {
 if (returnCode == RETURN_CODE_SUCCESS) {
 Log.i("alhaj", "Async command execution completed successfully.");
 } else if (returnCode == RETURN_CODE_CANCEL) {
 Log.i("alhaj", "Async command execution cancelled by user.");
 } else {
 Log.i("alhaj", String.format("Async command execution failed with rc=%d.", returnCode));
 }
 }
 }.toString())
}



'''


but i am getting error


'''


2020-09-30 03:13:41.079 10300-10410/com.example.touchmeadmin I/mobile-ffmpeg : Output #0, mp3, to ' -i /storage/emulated/0/AJ backup/songs/Maroon 5 - Memories (Official Video) ( 256kbps cbr ).mp3 -ss 60 -to 70 /storage/emulated/0/Android/data/com.example.touchmeadmin/files/Music/830350fd-5218-4ee0-bd99-0dd50b802930.mp3' :
2020-09-30 03:13:41.079 10300-10410/com.example.touchmeadmin E/mobile-ffmpeg : Output file #0 does not contain any stream


'''


-
How to combine multiple videos in android using ffmpeg ?
23 mai 2023, par HaeinyI added dependency to use ffmpeg on Android.


implementation "com.arthenica:mobile-ffmpeg-full:4.4"



And I wanted to combine the videos from the gallery, so I temporarily saved the imported video in the cache directory in the app.


After that, I wrote the following function to take the saved images and merge them using ffmpeg :



fun mergeVideos(videoPaths: List\): Int {
 val cacheDirectory = this.externalCacheDir
 mergedVideoFile = File(cacheDirectory, "merged_video.mp4").absolutePath

 val command = StringBuilder()
 command.append("ffmpeg")
 for (videoPath in videoPaths) {
 command.append(" -i ").append(videoPath)
 }

 command.append(" -filter_complex ").append("\"")
 for (i in videoPaths.indices) {
 command.append("[$i:v] ").append("[$i:a] ")
 }

 command.append("concat=n=").append(videoPaths.size).append(":v=1:a=1 [v] [a]").append("\"")
 command.append(" -map \"[v]\" -map \"[a]\" ").append(mergedVideoFile)
 
 return FFmpeg.execute(command.toString())
 }



I wanted to temporarily save the merged video in the "mergedVideoFile" so that I could save them in the cache directory, and videoPaths would get the Urls of the videos I wanted to merge into the list.


The command verified through Log.d :



ffmpeg -i /storage/emulated/0/Android/data/"project name"/files/Movies/VIDEO1.mp4 -i /storage/emulated/0/Android/data/"project name"/files/Movies/VIDEO2.mp4 -filter_complex "\[0:v\] \[0:a\] \[1:v\] \[1:a\] concat=n=2:v=1:a=1 \[v\] \[a\]" -map "\[v\]" -map "\[a\]" /storage/emulated/0/Android/data/"project name"/cache/merged_video.mp4



result of mergeVideos execution :



Loading mobile-ffmpeg.
Loaded mobile-ffmpeg-full-arm64-v8a-4.4-20210207.
Callback thread started.
ffmpeg version v4.4-dev-416
Copyright (c) 2000-2020 the FFmpeg developers
built with Android (6454773 based on r365631c2) clang version 9.0.8 (https://android.googlesource.com/toolchain/llvm-project 98c855489587874b2a325e7a516b99d838599c6f) (based on LLVM 9.0.8svn)

configuration: --cross-prefix=aarch64-linux-android- --sysroot=/files/android-sdk/ndk/21.3.6528147/toolchains/llvm/prebuilt/linux-x86_64/sysroot --prefix=/home/taner/Projects/mobile-ffmpeg/prebuilt/android-arm64/ffmpeg --pkg-config=/usr/bin/pkg-config --enable-version3 --arch=aarch64 --cpu=armv8-a --cc=aarch64-linux-android24-clang --cxx=aarch64-linux-android24-clang++ --extra-libs='-L/home/taner/Projects/mobile-ffmpeg/prebuilt/android-arm64/cpu-features/lib -lndk_compat' --target-os=android --enable-neon --enable-asm --enable-inline-asm --enable-cross-compile --enable-pic --enable-jni --enable-optimizations --enable-swscale --enable-shared --enable-v4l2-m2m --disable-outdev=fbdev --disable-indev=fbdev --enable-small --disable-openssl --disable-xmm-clobber-test --disable-debug --enable-lto --disable-neon-clobber-test --disable-programs --disable-postproc --disable-doc --disable-htmlpages --disable-manpages --disable-podpages --disable-txtpages --disable-static --disable-sndio --disable-schannel --disable-securetransport --disable-xlib --disable-cuda --disable-cuvid --disable-nvenc --disable-vaapi --disable-vdpau --disable-videotoolbox --disable-audiotoolbox --disable-appkit --disable-alsa --disable-cuda --disable-cuvid --disable-nvenc --disable-vaapi --disable-vdpau --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-gmp --enable-gnutls --enable-libmp3lame --enable-libass --enable-iconv --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libxml2 --enable-libopencore-amrnb --enable-libshine --enable-libspeex --enable-libwavpack --enable-libkvazaar --enable-libilbc --enable-libopus --enable-libsnappy --enable-libsoxr --enable-libaom --enable-libtwolame --disable-sdl2 --enable-libvo-amrwbenc --enable-zlib --enable-mediacodec

libavutil 56. 55.100 / 56. 55.100
libavcodec 58. 96.100 / 58. 96.100
libavformat 58. 48.100 / 58. 48.100
libavdevice 58. 11.101 / 58. 11.101
libavfilter 7. 87.100 / 7. 87.100
libswscale 5. 8.100 / 5. 8.100
libswresample 3. 8.100 / 3. 8.100

Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/storage/emulated/0/Android/data/"project name"/files/Movies/VIDEO1.mp4':

Metadata:
major_brand : mp42
minor_version : 0
compatible_brands: isommp42
creation_time : 2023-05-02T12:22:45.000000Z
com.android.version: 11
com.android.capture.fps: 30.000000
Duration: 00:00:02.51 , start: 0.000000 , bitrate: 14232 kb/s

 Stream #0:0

(eng)
: Video: h264 (avc1 / 0x31637661), yuv420p(tv, bt709), 1920x1080, 14022 kb/s
, SAR 1:1 DAR 16:9 , 30 fps, 30 tbr, 90k tbn, 180k tbc (default)

Metadata:
rotate : 90
creation_time : 2023-05-02T12:22:45.000000Z
handler_name : VideoHandle
Side data:
displaymatrix: rotation of -90.00 degrees

 Stream #0:1

(eng)
: Audio: aac (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 256 kb/s (default)

 Metadata:
 creation_time : 2023-05-02T12:22:45.000000Z
 handler_name : SoundHandle

Input #1, mov,mp4,m4a,3gp,3g2,mj2, from '/storage/emulated/0/Android/data/"project name"/files/Movies/VIDEO2.mp4':

... Input #1's video metadatas ...

\[NULL @ 0x78367662e0\] Unable to find a suitable output format for 'ffmpeg'
ffmpeg: Invalid argument



I don't know what is the problem in my code.
Please help me.


-
FFmpeg Android Errors
17 février, par axjpOk so im making a kotlin android app and for file conversion from 3gp to wav i added the android ffmpeg library with
implementation 'com.arthenica:mobile-ffmpeg-full:4.4'
then i added this code to convert the filesFFmpeg.execute("-i" + f2 +"/storage/emulated/0/Android/data/com.icompilecodewithnowarnings.ffmpegthing/files/Documents/recording.wav")
for further context f2 is/storage/emulated/0/Android/data/com.icompilecodewithnowarnings.ffmpegthing/files/Documents/recording.3gp


The error log is to large to simply just fit here but heres some of it


Execution failed for task ':app:checkDebugAarMetadata'.
> Could not resolve all files for configuration ':app:debugRuntimeClasspath'.
 > Could not find com.github.hiteshsondhi88.libffmpeg:FFmpegAndroid:0.3.2.
 Searched in the following locations:
 - https://dl.google.com/dl/android/maven2/com/github/hiteshsondhi88/libffmpeg/FFmpegAndroid/0.3.2/FFmpegAndroid-0.3.2.pom
 - https://repo.maven.apache.org/maven2/com/github/hiteshsondhi88/libffmpeg/FFmpegAndroid/0.3.2/FFmpegAndroid-0.3.2.pom
 Required by:
 project :app



Caused by: org.gradle.internal.resolve.ModuleVersionNotFoundException: Could not find com.github.hiteshsondhi88.libffmpeg:FFmpegAndroid:0.3.2.



I tried to compile however the compiler immediatley rejected my app and refused to compile. I would have expected it to have immidiatley compiled into a apk.


EDIT :


Here is my build.gradle file


plugins {
 id 'com.android.application'
 id 'org.jetbrains.kotlin.android'
}

android {
 namespace 'com.icompilecodewithnowarnings.ffmpegthing'
 compileSdk 33

 defaultConfig {
 applicationId "com.icompilecodewithnowarnings.ffmpegthing"
 minSdk 26
 targetSdk 33
 versionCode 1
 versionName "1.0"

 testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
 }

 buildTypes {
 release {
 minifyEnabled false
 proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
 }
 }
 compileOptions {
 sourceCompatibility JavaVersion.VERSION_1_8
 targetCompatibility JavaVersion.VERSION_1_8
 }
 kotlinOptions {
 jvmTarget = '1.8'
 }
}

dependencies {

 implementation 'androidx.core:core-ktx:1.8.0'
 implementation 'androidx.appcompat:appcompat:1.4.1'
 implementation 'com.google.android.material:material:1.5.0'
 implementation 'androidx.constraintlayout:constraintlayout:2.1.3'
 implementation 'com.arthenica:mobile-ffmpeg-full:4.4'
 implementation files('src/main/java/musicg-1.4.2.0.jar')
 testImplementation 'junit:junit:4.13.2'
 androidTestImplementation 'androidx.test.ext:junit:1.1.3'
 androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
}