
Recherche avancée
Médias (1)
-
MediaSPIP Simple : futur thème graphique par défaut ?
26 septembre 2013, par
Mis à jour : Octobre 2013
Langue : français
Type : Video
Autres articles (41)
-
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 (5651)
-
no access to m3u8 when using ffmpeg [closed]
7 octobre 2023, par asdI have a code that allows me to download videos from
.m3u8
, but for some reason it hasn't worked since yesterday

ffmpeg -user_agent "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/117.0.0.0 Safari/537.36" -headers "Referer: https://upstream.to/" -i "https://s92.upstreamcdn.co/hls2/01/03509/wc3i5yhdfgyk_o/master.m3u8?t=M9p8oTpo_LgYLnh2Ay4UEOT6Szltp5vGepiZ09ZjnFo&s=1696668614&e=10800&f=17548793&i=169.150&sp=0" -c copy -bsf:a aac_adtstoasc "name.mp4"



what can I do to make it similar to the upstream task which looks like this


Request URL:https://s92.upstreamcdn.co/hls2/01/03509/wc3i5yhdfgyk_o/master.m3u8?t=M9p8oTpo_LgYLnh2Ay4UEOT6Szltp5vGepiZ09ZjnFo&s=1696668614&e=10800&f=17548793&i=169.150&sp=0
Request Method: GET
Status Code: 200 OK
Remote Address: 164.132.163.19:443
Referrer Policy: strict-origin-when-cross-origin
Access-Control-Allow-Origin: *
Cache-Control: max-age=8640000
Cache-Control: public, no-transform
Connection: keep-alive
Content-Encoding: gzip
Content-Type: application/vnd.apple.mpegurl
Date: Sat, 07 Oct 2023 08:50:16 GMT
Expires: Mon, 15 Jan 2024 08:50:16 GMT
Last-Modified: Sat, 07 Oct 2023 08:50:16 GMT
Server: nginx

Transfer-Encoding:chunked
Accept:*/*
Accept-Encoding:gzip, deflate, br
Accept-Language:pl-PL,pl;q=0.9,en-US;q=0.8,en;q=0.7
Connection:keep-alive
Host:s92.upstreamcdn.co
Origin:https://upstream.to
Referer:https://upstream.to/
Sec-Ch-Ua:"Google Chrome";v="117", "Not;A=Brand";v="8", "Chromium";v="117"
Sec-Ch-Ua-Mobile:?0
Sec-Ch-Ua-Platform:"Windows"
Sec-Fetch-Dest:empty
Sec-Fetch-Mode:cors
Sec-Fetch-Site:cross-site
User-Agent:Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/117.0.0.0 Safari/537.36



-
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)


-
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.