
Recherche avancée
Médias (2)
-
Exemple de boutons d’action pour une collection collaborative
27 février 2013, par
Mis à jour : Mars 2013
Langue : français
Type : Image
-
Exemple de boutons d’action pour une collection personnelle
27 février 2013, par
Mis à jour : Février 2013
Langue : English
Type : Image
Autres articles (46)
-
Mise à jour de la version 0.1 vers 0.2
24 juin 2013, parExplications des différents changements notables lors du passage de la version 0.1 de MediaSPIP à la version 0.3. Quelles sont les nouveautés
Au niveau des dépendances logicielles Utilisation des dernières versions de FFMpeg (>= v1.2.1) ; Installation des dépendances pour Smush ; Installation de MediaInfo et FFprobe pour la récupération des métadonnées ; On n’utilise plus ffmpeg2theora ; On n’installe plus flvtool2 au profit de flvtool++ ; On n’installe plus ffmpeg-php qui n’est plus maintenu au (...) -
Personnaliser en ajoutant son logo, sa bannière ou son image de fond
5 septembre 2013, parCertains thèmes prennent en compte trois éléments de personnalisation : l’ajout d’un logo ; l’ajout d’une bannière l’ajout d’une image de fond ;
-
Ecrire une actualité
21 juin 2013, parPrésentez les changements dans votre MédiaSPIP ou les actualités de vos projets sur votre MédiaSPIP grâce à la rubrique actualités.
Dans le thème par défaut spipeo de MédiaSPIP, les actualités sont affichées en bas de la page principale sous les éditoriaux.
Vous pouvez personnaliser le formulaire de création d’une actualité.
Formulaire de création d’une actualité Dans le cas d’un document de type actualité, les champs proposés par défaut sont : Date de publication ( personnaliser la date de publication ) (...)
Sur d’autres sites (7577)
-
Why does menconder fps rate does not work ?
27 février 2016, par ACRI’m using mencoder to create a video out of some .png files. The problem is that the frame rate doesn’t change, regardless of the -fps flag. The output video has different time lengths (in their properties), but the video’s size and speed are always the same (regardless of the FPS chosen).
I just want to create a shorted video by using higher FPS rates. In short, a "time-lapse" of my original set of images. What am I doing wrong with mencoder ? I’m using the following command :
mencoder mf://./IMG/images*.png -mf w=800:h=600:fps=20:type=png -ovc copy -oac copy -o video.avi
-
Why menconder fps rate does not work ?
2 mars 2016, par ACRI’m using mencoder to create a video out of some .png files. The problem is that the frame rate doesn’t change, regardless of the -fps flag. The output video has different time lengths (in their properties), but the video’s size and speed are always the same (regardless of the FPS chosen).
I just want to create a shorted video by using higher FPS rates. In short, a "time-lapse" of my original set of images. What am I doing wrong with mencoder ? I’m using the following command :
mencoder mf://./IMG/images*.png -mf w=800:h=600:fps=20:type=png -ovc copy -oac copy -o video.avi
-
How to pass bytesArray as input and output in command array for FFmpeg execute ?
11 avril 2023, par Rohit guptaI was working with FFmpeg library where I was developing microphone-based reading and writeing the audioData, where i got the challenge to process some audioData. but i dont want to store the files as outputstream or something as it will add additional delays.


This was my code that i used


implementation 'com.arthenica:mobile-ffmpeg-full:4.2.2.LTS'



private fun processAudioAsChipmunk(audioData: ShortArray, record: AudioRecord): ShortArray {
 val sampleRate = record.sampleRate
 val channels = record.channelCount
 val filter = "asetrate=2*${sampleRate},aresample=48000,atempo=2"
 val outputData = audioData
 val cmd = arrayOf(
 "-y",
 "-i",
 fileName1, // here input filepath is passed, i want it to be ByteArray(audioData)
 "-af",
 "asetrate=22100,atempo=1/2",
 fileName2 //here output filepath is passed, i want it to be ByteArray(outputData)
 )//Chipmunk

 FFmpeg.execute(cmd)
 return outputData
 }




Now i wanted to read and write the audioData without storing and using it as filenames.


the below code shows the code i'm using to read and write audio Data


read = record!!.read(audioData, 0, minBuffer) //AudioRecord
val processedAudioData = processAudioAsChipmunk(audioData, record!!) // Here! 
write = player!!.write(processedAudioData, 0, read) //AudioTrack



Post thought ->


I tried below code but again failed to pass input and output stream instead of filename inside executeAsync


https://github.com/arthenica/ffmpeg-kit



fun executeFfmpegCommand(audioData: ShortArray, rubberbandPitch: Float = 1.0f): ShortArray {
 // Convert short array to byte array
 val byteBuffer = ByteBuffer.allocate(audioData.size * 2)
 byteBuffer.order(ByteOrder.nativeOrder())
 for (i in audioData.indices) {
 byteBuffer.putShort(audioData[i])
 }
 val inputData = byteBuffer.array()

 // Set input data as input stream
 val inputStream = ByteArrayInputStream(inputData)

 // Create output stream to store output data
 val outputStream = ByteArrayOutputStream()

 // Add rubberband filter to command to make audio sound like chipmunk
 val rubberbandFilter = "rubberband=pitch=${rubberbandPitch}"
 val commandWithFilter = arrayOf("-f", "s16le", "-ar", "44100", "-ac", "2", "-i", "-", "-af", rubberbandFilter, "-f", "s16le", "-")

 // Create ffmpeg session
 val session = FFmpegKit.executeAsync() // @!! HOW TO PASS CommandFilter, inputStream, outPutStream here !!@

 // Wait for session to complete
 session.wait()

 // Check if session was successful
 if (ReturnCode.isSuccess(session.returnCode)) {
 Log.e("FFmpeg", "FFmpeg execution failed with return code: ${session.returnCode}")
 return ShortArray(0)
 }

 // Convert output stream to short array
 val outputData = outputStream.toByteArray()
 val shortBuffer = ByteBuffer.wrap(outputData)
 .order(ByteOrder.nativeOrder())
 .asShortBuffer()
 val outputShortArray = ShortArray(shortBuffer.remaining())
 shortBuffer.get(outputShortArray)

 // Return output short array
 return outputShortArray
 }