
Recherche avancée
Médias (1)
-
Rennes Emotion Map 2010-11
19 octobre 2011, par
Mis à jour : Juillet 2013
Langue : français
Type : Texte
Autres articles (111)
-
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 -
Script d’installation automatique de MediaSPIP
25 avril 2011, parAfin de palier aux difficultés d’installation dues principalement aux dépendances logicielles coté serveur, un script d’installation "tout en un" en bash a été créé afin de faciliter cette étape sur un serveur doté d’une distribution Linux compatible.
Vous devez bénéficier d’un accès SSH à votre serveur et d’un compte "root" afin de l’utiliser, ce qui permettra d’installer les dépendances. Contactez votre hébergeur si vous ne disposez pas de cela.
La documentation de l’utilisation du script d’installation (...) -
Ajouter des informations spécifiques aux utilisateurs et autres modifications de comportement liées aux auteurs
12 avril 2011, parLa manière la plus simple d’ajouter des informations aux auteurs est d’installer le plugin Inscription3. Il permet également de modifier certains comportements liés aux utilisateurs (référez-vous à sa documentation pour plus d’informations).
Il est également possible d’ajouter des champs aux auteurs en installant les plugins champs extras 2 et Interface pour champs extras.
Sur d’autres sites (9911)
-
ffmpeg - overlay filter alpha premultiplied performs brighter on transparent images
26 avril 2022, par windows_airDescription


I'm using ffmpeg's overlay filter with alpha premultiplied parameter. I noticed that when a completely transparent image was overlay to the background video, the output video was much brighter.


In the following demo, I will use RGBA8888 format images for overlay. Its use of
RGBA (255,255,255,0)
indicates full transparency (aka completely transparent white), and the result demonstrates a very noticeable brightening (the expected result should be unchanged, since the image is completely transparent).
ps : UsingRGBA (0,0,0,0)
(aka completely transparent black) also results in a brightened image.

Code (overlay transparent white)


ffmpeg.exe -loglevel debug -i a1.mp4 -i a1.png -filter_complex "[0:v][1:v]overlay=x=0:y=0:alpha=premultiplied[v]" -map "[v]" -c:v:0 libx264 -f mp4 output.mp4





Code (overlay transparent black)


This command uses lavfi to simulate the transparent black output of RGBA. For demonstration purposes only, you may need ctrl+c to prevent infinite output.


ffmpeg.exe -y -i a1.mp4 -f lavfi -i "color=color=black@0.0:size=1920x540,format=rgba" -filter_complex "[0:v][1:v]overlay=x=0:y=0:alpha=premultiplied[v]" -map "[v]" -c:v:0 libx264 -f mp4 output.mp4





The results show that the upper part is more whitish (brighter).


Related files can be downloaded here : https://gist.github.com/windowsair/5315437a97dadf3f74f886486657183d



Back to the question, I had to use
premultiplied
to get the correct overlay result : Using thestraight
option will have a darkening effect in areas that are not fully transparent, which is why I insisted onpremultiplied
. Is this a ffmpeg problem ? How should I avoid the undesirable effect of brighter images from transparent image overlays ? Thank you !

-
Add Padding to video
26 juin 2023, par AkariI have a video which size is 576 x 1024, my screen phone is 576 x 2044. I want to make the height of video is 2044 (full screen) and add padding black background both top and bottom. What can I do ? I currently use FFmpeg library.


I want to process video in android kotlin, and I use some commands but it it doesn't work.


Example :


fun makeVideoFullScreen(
 context: Context,
 inputVideoPath: String,
 screenWidth: Int,
 screenHeight: Int,
 listener : (outputPath: String, returnCode: Int) -> Unit
){
 val fileName = Utility.getCurrentTime()
 val externalDir = context.getExternalFilesDir(null)
 val file = File(externalDir, "temp_video${fileName}.mp4")
 val outputPath = file.absolutePath

 val cmd = arrayOf(
 "-i", inputVideoPath,
 "-vf", "scale=-1:$screenHeight, pad=$screenWidth:$screenHeight:(ow-iw)/2:(oh-ih)/2:black",
 "-c:v", "libx264",
 "-preset", "ultrafast",
 "-c:a", "copy",
 outputPath
 )

 FFmpeg.executeAsync(cmd
 ) { _, returnCode ->
 listener(outputPath, returnCode)
 }
}



-
How to use ffmpeg to overlay waveforms on xstack mosaics and specify specific audio for playback
1er mai 2022, par kellibI would like to make a mosaic of multiple titled streams, 1) specifying which of the audio streams to play and 2) overlay waveforms at the bottom of each of the video tiles for the audio that they belong to.


I'm successfully able to create the titled mosaic of streams with the code below.


However :


- 

- I'm having a hard time figuring out how to specify just one of the specific audio sources. I found amix, but I don't really want to mix them, I just want to specify audio [a0], or [a1], or [a2], etc.




and


- 

- I'm having a hard time figuring out how to overlay the wave forms at the bottom of the video for each of the tiles. I struggled trying to figure out putting showwaves into the mix. Is it possible ?




I want each tile to look like this, but since these are rtmp streams, they need to play-out the matching waveforms dynamically with each stream. https://dragonquest64.blogspot.com/2020/01/ffmpeg-audio-waveform.html


If someone could point me in the right direction, that would be great. I'm getting close, but I'm pretty new to all of this, and have already spent way more time than I should have, so would love a little help.


ffmpeg \
-i rtmp://my.cdn.com/srcEncoders/STREAM-1 \
-i rtmp://my.cdn.com/srcEncoders/STREAM-2 \
-i rtmp://my.cdn.com/srcEncoders/STREAM-3 \
-i rtmp://my.cdn.com/srcEncoders/STREAM-4 \
 -filter_complex " \
 [0:v] setpts=PTS-STARTPTS, scale=qvga \
 , drawtext=text=STREAM-1:fontsize=20:x=10:y=10:fontcolor=white:box=1:boxcolor=black@0.5:boxborderw=5 [a0]; \
 [1:v] setpts=PTS-STARTPTS, scale=qvga \
 , drawtext=text=STREAM-2:fontsize=20:x=10:y=10:fontcolor=white:box=1:boxcolor=black@0.5:boxborderw=5 [a1]; \
 [2:v] setpts=PTS-STARTPTS, scale=qvga \
 , drawtext=text=STREAM-3:fontsize=20:x=10:y=10:fontcolor=white:box=1:boxcolor=black@0.5:boxborderw=5 [a2]; \
 [3:v] setpts=PTS-STARTPTS, scale=qvga \ 
 , drawtext=text=STREAM-4:fontsize=20:x=10:y=10:fontcolor=white:box=1:boxcolor=black@0.5:boxborderw=5 [a3]; \
 [a0][a1][a2][a3]xstack=inputs=4:layout=0_0|0_h0|w0_0|w0_h0[out]; \
 amix=inputs=1
 " \
 -map "[out]" \
 -c:v libx264 -b:v 1000k -g 30 -keyint_min 120 -profile:v baseline -preset veryfast -f mpegts "udp://127.0.0.1:1234?pkt_size=1316"