
Recherche avancée
Médias (91)
-
Les Miserables
9 décembre 2019, par
Mis à jour : Décembre 2019
Langue : français
Type : Textuel
-
VideoHandle
8 novembre 2019, par
Mis à jour : Novembre 2019
Langue : français
Type : Video
-
Somos millones 1
21 juillet 2014, par
Mis à jour : Juin 2015
Langue : français
Type : Video
-
Un test - mauritanie
3 avril 2014, par
Mis à jour : Avril 2014
Langue : français
Type : Textuel
-
Pourquoi Obama lit il mes mails ?
4 février 2014, par
Mis à jour : Février 2014
Langue : français
-
IMG 0222
6 octobre 2013, par
Mis à jour : Octobre 2013
Langue : français
Type : Image
Autres articles (34)
-
Déploiements possibles
31 janvier 2010, parDeux types de déploiements sont envisageable dépendant de deux aspects : La méthode d’installation envisagée (en standalone ou en ferme) ; Le nombre d’encodages journaliers et la fréquentation envisagés ;
L’encodage de vidéos est un processus lourd consommant énormément de ressources système (CPU et RAM), il est nécessaire de prendre tout cela en considération. Ce système n’est donc possible que sur un ou plusieurs serveurs dédiés.
Version mono serveur
La version mono serveur consiste à n’utiliser qu’une (...) -
Dépôt de média et thèmes par FTP
31 mai 2013, parL’outil MédiaSPIP traite aussi les média transférés par la voie FTP. Si vous préférez déposer par cette voie, récupérez les identifiants d’accès vers votre site MédiaSPIP et utilisez votre client FTP favori.
Vous trouverez dès le départ les dossiers suivants dans votre espace FTP : config/ : dossier de configuration du site IMG/ : dossier des média déjà traités et en ligne sur le site local/ : répertoire cache du site web themes/ : les thèmes ou les feuilles de style personnalisées tmp/ : dossier de travail (...) -
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 (...)
Sur d’autres sites (8474)
-
I am converting images to video using ffmpeg in koltin but i am getting error
28 mars 2024, par Mohith_karthikeyai implement ffmpeg by using this gitbub by this reference :5

https://github.com/tanersener/mobile-ffmpeg
in koltin
my code is :

class BurstModeToVideo(
 private val context: Context,
 private val onVideoConverted: (File) -> Unit
) {

 private val vibeDirectory = File(context.getExternalFilesDir(Environment.DIRECTORY_PICTURES), "vibes")
 private val outputDirectory = context.getExternalFilesDir(Environment.DIRECTORY_MOVIES)

 fun convertBitmapToJpeg(vibes: List<bitmap>) {
 if (!vibeDirectory.exists()) {
 vibeDirectory.mkdirs()
 }

 vibes.forEachIndexed { index, vibe ->
 val fileName = "$index.jpg"
 val file = File(vibeDirectory, fileName)
 FileOutputStream(file).use { fos ->
 vibe.compress(Bitmap.CompressFormat.JPEG, 100, fos)
 }
 }
 }

 private val callback = ExecuteCallback { _, returnCode ->
 if (returnCode == Config.RETURN_CODE_SUCCESS) {
 try {
 val tempFile = File("${outputDirectory?.absolutePath}/vibe.mp4")
 onVideoConverted(tempFile)
 Log.e(TAG, "FFmpeg output found $tempFile")
 Toast.makeText(context,"$tempFile",Toast.LENGTH_LONG).show()
 Log.e(TAG, "FFmpeg output found $")
 } catch (e: IOException) {
 Log.e(TAG, "Error handling FFmpeg output", e)
 }
 } else {
 Log.i(TAG, "Async command execution failed with returnCode=$returnCode.")
 }
 }

 fun convertShotsToVideo() {
 if (!vibeDirectory.exists() || vibeDirectory.listFiles()?.isEmpty() == true) {
 Log.e(TAG, "No images to convert")
 return
 }

 Log.d(TAG, "Images are stored in: ${vibeDirectory.absolutePath}")

 val imageFiles = vibeDirectory.listFiles { file -> file.isFile && file.extension.equals("jpg", ignoreCase = true) }
 if (imageFiles.isNullOrEmpty()) {
 Log.e(TAG, "No image files found in directory")
 return
 }

 Log.d(TAG, "List of image files:")
 imageFiles.forEach { file ->
 Log.d(TAG, file.name)
 }

 val cmd = "-i ${vibeDirectory.absolutePath}/%d.jpg -c:v mpeg4 -y ${outputDirectory?.absolutePath}/vibe.mp4"

 FFmpevubeg.executeAsync(cmd, callback)
 }

 companion object {
 private const val TAG = "BurstModeToVideo"
 }
}
</bitmap>


above function convert images from bimtap to jpeg files and then it converts to video by using ffmpeg. And i initialize this fun in mainactivity.kt and it goes here :


var vibe by remember {
 mutableStateOf(null)
 }

 val burstModeToVideo = BurstModeToVideo(
 context,
 onVideoConverted = {
 vibe = it
 }
 )
coroutineScope.launch {
 withContext(Dispatchers.IO) {
 burstModeToVideo.convertBitmapToJpeg(vibesList)
 burstModeToVideo.convertShotsToVideo()
 }
 }

VideoPlayer(vibe)



now this vibe variable is used in videoPlayer function and it goes here :


@OptIn(UnstableApi::class)
@Composable
fun VideoPlayer(file: File) {
 val context = LocalContext.current

 val exoPlayer = remember {
 ExoPlayer.Builder(context)
 .build()
 .apply {
 val defaultDataSourceFactory = DefaultDataSource.Factory(context)
 val dataSourceFactory: DataSource.Factory = DefaultDataSource.Factory(
 context,
 defaultDataSourceFactory
 )
 this.repeatMode = ExoPlayer.REPEAT_MODE_ALL
 this.playWhenReady = true
 val source = file.let {
 ProgressiveMediaSource.Factory(dataSourceFactory)
 .createMediaSource(MediaItem.fromUri(Uri.fromFile(file)))
 }
 this.setMediaSource(source)
 this.prepare()
 this.play()
 this.volume = 0f
 }
 }

 DisposableEffect(Unit) {
 onDispose {
 exoPlayer.release()
 }
 }

 AndroidView(
 factory = { ctx ->
 PlayerView(ctx).apply {
 useController = false
 resizeMode = AspectRatioFrameLayout.RESIZE_MODE_ZOOM
 player = exoPlayer
 }
 },
 modifier = Modifier.fillMaxSize()
 )
}



the error is :


MediaCodec will operate in async mode
2024-03-28 20:08:53.065 18946-27920 OplusCCodec com.example.flenzey D initiateShutdown [475]: (0xb400007656569fc0) keepComponentAllocated=0
2024-03-28 20:08:53.067 18946-27920 BpBinder com.example.flenzey I onLastStrongRef automatically unlinking death recipients: android.media.IResourceManagerService
2024-03-28 20:08:53.069 18946-27926 hw-BpHwBinder com.example.flenzey I onLastStrongRef automatically unlinking death recipients
2024-03-28 20:08:53.071 18946-27926 OplusCCodec com.example.flenzey D ~OplusCCodec [144]: (0xb400007656569fc0)
2024-03-28 20:08:53.077 18946-27889 MediaCodecRenderer com.example.flenzey W Failed to initialize decoder: c2.android.mpeg4.decoder
 java.lang.IllegalArgumentException
 at android.media.MediaCodec.native_configure(Native Method)
 at android.media.MediaCodec.configure(MediaCodec.java:2176)
 at android.media.MediaCodec.configure(MediaCodec.java:2092)
 at androidx.media3.exoplayer.mediacodec.AsynchronousMediaCodecAdapter.initialize(AsynchronousMediaCodecAdapter.java:174)
 at androidx.media3.exoplayer.mediacodec.AsynchronousMediaCodecAdapter.access$100(AsynchronousMediaCodecAdapter.java:54)
 at androidx.media3.exoplayer.mediacodec.AsynchronousMediaCodecAdapter$Factory.createAdapter(AsynchronousMediaCodecAdapter.java:119)
 at androidx.media3.exoplayer.mediacodec.DefaultMediaCodecAdapterFactory.createAdapter(DefaultMediaCodecAdapterFactory.java:117)
 at androidx.media3.exoplayer.mediacodec.MediaCodecRenderer.initCodec(MediaCodecRenderer.java:1195)
 at androidx.media3.exoplayer.mediacodec.MediaCodecRenderer.maybeInitCodecWithFallback(MediaCodecRenderer.java:1103)
 at androidx.media3.exoplayer.mediacodec.MediaCodecRenderer.maybeInitCodecOrBypass(MediaCodecRenderer.java:551)
 at androidx.media3.exoplayer.mediacodec.MediaCodecRenderer.onInputFormatChanged(MediaCodecRenderer.java:1560)
 at androidx.media3.exoplayer.video.MediaCodecVideoRenderer.onInputFormatChanged(MediaCodecVideoRenderer.java:1152)
 at androidx.media3.exoplayer.mediacodec.MediaCodecRenderer.readSourceOmittingSampleData(MediaCodecRenderer.java:994)
 at androidx.media3.exoplayer.mediacodec.MediaCodecRenderer.render(MediaCodecRenderer.java:814)
 at androidx.media3.exoplayer.video.MediaCodecVideoRenderer.render(MediaCodecVideoRenderer.java:940)
 at androidx.media3.exoplayer.ExoPlayerImplInternal.doSomeWork(ExoPlayerImplInternal.java:1102)
 at androidx.media3.exoplayer.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:541)
 at android.os.Handler.dispatchMessage(Handler.java:102)
 at android.os.Looper.loopOnce(Looper.java:238)
 at android.os.Looper.loop(Looper.java:349)
 at android.os.HandlerThread.run(HandlerThread.java:67)
2024-03-28 20:08:53.091 18946-27889 MediaCodecVideoRenderer com.example.flenzey E Video codec error
 androidx.media3.exoplayer.mediacodec.MediaCodecRenderer$DecoderInitializationException: Decoder init failed: c2.android.mpeg4.decoder, Format(1, null, null, video/mp4v-es, null, 22800180, null, [2448, 3264, 24.999998, ColorInfo(Unset color space, Unset color range, Unset color transfer, false, 8bit Luma, 8bit Chroma)], [-1, -1])
 at androidx.media3.exoplayer.mediacodec.MediaCodecRenderer.maybeInitCodecWithFallback(MediaCodecRenderer.java:1114)
 at androidx.media3.exoplayer.mediacodec.MediaCodecRenderer.maybeInitCodecOrBypass(MediaCodecRenderer.java:551)
 at androidx.media3.exoplayer.mediacodec.MediaCodecRenderer.onInputFormatChanged(MediaCodecRenderer.java:1560)
 at androidx.media3.exoplayer.video.MediaCodecVideoRenderer.onInputFormatChanged(MediaCodecVideoRenderer.java:1152)
 at androidx.media3.exoplayer.mediacodec.MediaCodecRenderer.readSourceOmittingSampleData(MediaCodecRenderer.java:994)
 at androidx.media3.exoplayer.mediacodec.MediaCodecRenderer.render(MediaCodecRenderer.java:814)
 at androidx.media3.exoplayer.video.MediaCodecVideoRenderer.render(MediaCodecVideoRenderer.java:940)
 at androidx.media3.exoplayer.ExoPlayerImplInternal.doSomeWork(ExoPlayerImplInternal.java:1102)
 at androidx.media3.exoplayer.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:541)
 at android.os.Handler.dispatchMessage(Handler.java:102)
 at android.os.Looper.loopOnce(Looper.java:238)
 at android.os.Looper.loop(Looper.java:349)
 at android.os.HandlerThread.run(HandlerThread.java:67)
 Caused by: java.lang.IllegalArgumentException
 at android.media.MediaCodec.native_configure(Native Method)
 at android.media.MediaCodec.configure(MediaCodec.java:2176)
 at android.media.MediaCodec.configure(MediaCodec.java:2092)
 at androidx.media3.exoplayer.mediacodec.AsynchronousMediaCodecAdapter.initialize(AsynchronousMediaCodecAdapter.java:174)
 at androidx.media3.exoplayer.mediacodec.AsynchronousMediaCodecAdapter.access$100(AsynchronousMediaCodecAdapter.java:54)
 at androidx.media3.exoplayer.mediacodec.AsynchronousMediaCodecAdapter$Factory.createAdapter(AsynchronousMediaCodecAdapter.java:119)
 at androidx.media3.exoplayer.mediacodec.DefaultMediaCodecAdapterFactory.createAdapter(DefaultMediaCodecAdapterFactory.java:117)
 at androidx.media3.exoplayer.mediacodec.MediaCodecRenderer.initCodec(MediaCodecRenderer.java:1195)
 at androidx.media3.exoplayer.mediacodec.MediaCodecRenderer.maybeInitCodecWithFallback(MediaCodecRenderer.java:1103)
 at androidx.media3.exoplayer.mediacodec.MediaCodecRenderer.maybeInitCodecOrBypass(MediaCodecRenderer.java:551) 
 at androidx.media3.exoplayer.mediacodec.MediaCodecRenderer.onInputFormatChanged(MediaCodecRenderer.java:1560) 
 at androidx.media3.exoplayer.video.MediaCodecVideoRenderer.onInputFormatChanged(MediaCodecVideoRenderer.java:1152) 
 at androidx.media3.exoplayer.mediacodec.MediaCodecRenderer.readSourceOmittingSampleData(MediaCodecRenderer.java:994) 
 at androidx.media3.exoplayer.mediacodec.MediaCodecRenderer.render(MediaCodecRenderer.java:814) 
 at androidx.media3.exoplayer.video.MediaCodecVideoRenderer.render(MediaCodecVideoRenderer.java:940) 
 at androidx.media3.exoplayer.ExoPlayerImplInternal.doSomeWork(ExoPlayerImplInternal.java:1102) 
 at androidx.media3.exoplayer.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:541) 
 at android.os.Handler.dispatchMessage(Handler.java:102) 
 at android.os.Looper.loopOnce(Looper.java:238) 
 at android.os.Looper.loop(Looper.java:349) 
 at android.os.HandlerThread.run(HandlerThread.java:67) 
2024-03-28 20:08:53.092 18946-27889 MediaCodecInfo com.example.flenzey D NoSupport [sizeAndRate.support, 2448x3264@24.999998092651367] [c2.android.mpeg4.decoder, video/mp4v-es] [OP535DL1, CPH2381, OnePlus, 31]
2024-03-28 20:08:53.108 18946-27889 ExoPlayerImplInternal com.example.flenzey E Playback error
 androidx.media3.exoplayer.ExoPlaybackException: MediaCodecVideoRenderer error, index=0, format=Format(1, null, null, video/mp4v-es, null, 22800180, null, [2448, 3264, 24.999998, ColorInfo(Unset color space, Unset color range, Unset color transfer, false, 8bit Luma, 8bit Chroma)], [-1, -1]), format_supported=NO_EXCEEDS_CAPABILITIES
 at androidx.media3.exoplayer.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:620)
 at android.os.Handler.dispatchMessage(Handler.java:102)
 at android.os.Looper.loopOnce(Looper.java:238)
 at android.os.Looper.loop(Looper.java:349)
 at android.os.HandlerThread.run(HandlerThread.java:67)
 Caused by: androidx.media3.exoplayer.mediacodec.MediaCodecRenderer$DecoderInitializationException: Decoder init failed: c2.android.mpeg4.decoder, Format(1, null, null, video/mp4v-es, null, 22800180, null, [2448, 3264, 24.999998, ColorInfo(Unset color space, Unset color range, Unset color transfer, false, 8bit Luma, 8bit Chroma)], [-1, -1])
 at androidx.media3.exoplayer.mediacodec.MediaCodecRenderer.maybeInitCodecWithFallback(MediaCodecRenderer.java:1114)
 at androidx.media3.exoplayer.mediacodec.MediaCodecRenderer.maybeInitCodecOrBypass(MediaCodecRenderer.java:551)
 at androidx.media3.exoplayer.mediacodec.MediaCodecRenderer.onInputFormatChanged(MediaCodecRenderer.java:1560)
 at androidx.media3.exoplayer.video.MediaCodecVideoRenderer.onInputFormatChanged(MediaCodecVideoRenderer.java:1152)
 at androidx.media3.exoplayer.mediacodec.MediaCodecRenderer.readSourceOmittingSampleData(MediaCodecRenderer.java:994)
 at androidx.media3.exoplayer.mediacodec.MediaCodecRenderer.render(MediaCodecRenderer.java:814)
 at androidx.media3.exoplayer.video.MediaCodecVideoRenderer.render(MediaCodecVideoRenderer.java:940)
 at androidx.media3.exoplayer.ExoPlayerImplInternal.doSomeWork(ExoPlayerImplInternal.java:1102)
 at androidx.media3.exoplayer.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:541)
 at android.os.Handler.dispatchMessage(Handler.java:102) 
 at android.os.Looper.loopOnce(Looper.java:238) 
 at android.os.Looper.loop(Looper.java:349) 
 at android.os.HandlerThread.run(HandlerThread.java:67) 
 Caused by: java.lang.IllegalArgumentException
 at android.media.MediaCodec.native_configure(Native Method)
 at android.media.MediaCodec.configure(MediaCodec.java:2176)
 at android.media.MediaCodec.configure(MediaCodec.java:2092)
 at androidx.media3.exoplayer.mediacodec.AsynchronousMediaCodecAdapter.initialize(AsynchronousMediaCodecAdapter.java:174)
 at androidx.media3.exoplayer.mediacodec.AsynchronousMediaCodecAdapter.access$100(AsynchronousMediaCodecAdapter.java:54)
 at androidx.media3.exoplayer.mediacodec.AsynchronousMediaCodecAdapter$Factory.createAdapter(AsynchronousMediaCodecAdapter.java:119)
 at androidx.media3.exoplayer.mediacodec.DefaultMediaCodecAdapterFactory.createAdapter(DefaultMediaCodecAdapterFactory.java:117)
 at androidx.media3.exoplayer.mediacodec.MediaCodecRenderer.initCodec(MediaCodecRenderer.java:1195)
 at androidx.media3.exoplayer.mediacodec.MediaCodecRenderer.maybeInitCodecWithFallback(MediaCodecRenderer.java:1103)



can anybody solve it


i tried to implement but i don't how to solve it . please decode this and get me correct result.


-
CRO Audit : Increase Your Conversions in 10 Simple Steps
25 mars 2024, par Erin -
how to not remove transparency using negate option on png files ffmpeg
27 mars 2024, par ReilbasI'm new to FFMPEG.
To make it simple, I've created a program that applies a negative filter to small images in png format. For some of the images, everything is fine and the transparency is maintained... But for others, FFMPEG converted the transparency to either black or white pixels.


I'm just using the command :

ffmpeg -y -i input.png -vf negate output.png


I downloaded the latest binaries for windows from https://www.gyan.dev/ffmpeg/builds/ (2024/03/25)