
Recherche avancée
Médias (1)
-
Revolution of Open-source and film making towards open film making
6 octobre 2011, par
Mis à jour : Juillet 2013
Langue : English
Type : Texte
Autres articles (70)
-
MediaSPIP version 0.1 Beta
16 avril 2011, parMediaSPIP 0.1 beta est la première version de MediaSPIP décrétée comme "utilisable".
Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
Pour avoir une installation fonctionnelle, il est nécessaire d’installer manuellement l’ensemble des dépendances logicielles sur le serveur.
Si vous souhaitez utiliser cette archive pour une installation en mode ferme, il vous faudra également procéder à d’autres modifications (...) -
MediaSPIP 0.1 Beta version
25 avril 2011, parMediaSPIP 0.1 beta is the first version of MediaSPIP proclaimed as "usable".
The zip file provided here only contains the sources of MediaSPIP in its standalone version.
To get a working installation, you must manually install all-software dependencies on the server.
If you want to use this archive for an installation in "farm mode", you will also need to proceed to other manual (...) -
Amélioration de la version de base
13 septembre 2013Jolie sélection multiple
Le plugin Chosen permet d’améliorer l’ergonomie des champs de sélection multiple. Voir les deux images suivantes pour comparer.
Il suffit pour cela d’activer le plugin Chosen (Configuration générale du site > Gestion des plugins), puis de configurer le plugin (Les squelettes > Chosen) en activant l’utilisation de Chosen dans le site public et en spécifiant les éléments de formulaires à améliorer, par exemple select[multiple] pour les listes à sélection multiple (...)
Sur d’autres sites (10586)
-
make fifo pipe in java(windows), write some data into it, let other process read the pipe
9 novembre 2017, par vs93My objective is to create a named pipe(fifo) in windows(java), write some data(coming from camera) into that and invoke ffmpeg command to make mp4 from that data. But I suspect that it is not opening a fifo pipe, rather it is opening a file. How can I make it open a fifo pipe ?
Here is the code :public void run () {
String mp4Folder = "C://Users/user_2/Desktop/streamDestination"; // Where the MP4 is to be kept
VFrame frame = null;
int actualPipeValLen = 0;
FileOutputStream requestStream = null;
long lastProcessedTS = 0;
final String FIFOPATH = "D://FIFO//";
final String PIPE_NAME = FIFOPATH + "myfifo";
final String MKFIFOCOMMAND = "mkfifo -m=rw " + PIPE_NAME;
final String DELFIFOCOMMAND = "rm -r " + PIPE_NAME;
String mp4FileName = mp4Folder + File.separator + "1.mp4";
mp4FileName = mp4FileName.replace("\\", "/");
long firstTimeStamp = 0;
try {
Runtime.getRuntime().exec(MKFIFOCOMMAND);
} catch (IOException e1) {
e1.printStackTrace();
}
if(firstTimeStamp == 0) {
firstTimeStamp = frame.getTimestamp();
}
if((frame.getTimestamp() - firstTimeStamp) > (15 * 1000)) {
if(requestStream != null) {
requestStream.close();
requestStream = null;
}
if(actualPipeValLen > 0) {
String[] ffmpeg = new String[] {"ffmpeg", "-i", PIPE_NAME , "-vcodec", "copy", mp4FileName };
Process ffmpegProcess = Runtime.getRuntime().exec(ffmpeg);
actualPipeValLen = 0;
firstTimeStamp = lastProcessedTS;
Thread.sleep(2 * 1000);
try {
Runtime.getRuntime().exec(DELFIFOCOMMAND);
} catch (IOException e1) {
e1.printStackTrace();
}
System.exit(0);
}
} else {
System.out.println("Writing into pipe : " + actualPipeValLen);
if(requestStream == null) {
requestStream = new FileOutputStream(PIPE_NAME);
}
requestStream.write(frame.getFrame());
actualPipeValLen += frame.getFrame().length;
lastProcessedTS = frame.getTimestamp();
}}
-
Overlay a video with rounded corners - FFMPEG React Native (Like Facetime or other Video Chats)
25 février 2024, par Christopher GabbaI'm trying to overlay one video on top of another using FFMPEG, in the exact same format as FaceTime, but the video would have rounded corners. I've tried the commands on other posts but they all generate unexpected results or errors.


Here is the command that overlays the videos decently :


-i main_video.mp4 -i small_overlaid_video_in_lower_left_corner.mp4 -filter_complex \
 "[0:v]scale=iw:ih[main_scaled]; \
 [1:v]scale=iw/2:ih/2:force_original_aspect_ratio=decrease,format=yuva420p[reaction_resized]; \
 [main_scaled][reaction_resized]overlay=x=40:y=H-h-40:format=auto[final]" \
 -map "[final]" -map 1:a? -c:a copy -c:v libx264 -crf 18 -preset ultrafast -t -y output.mp4



The problems this has is that the main videos resolution varies from video to video, so sometimes the overlaid video is super small and sometimes its too big. Three questions :


- 

- How do I make the overlaid video the same size in comparison to the main video every time ?
- How can I apply rounded corners on the rectangle ?
- How can I modify it to include both video's audio ?








-
How to apply 'simple 'opacity to combined(layered) mp4s in FFMPEG
27 mai 2021, par CamI am not getting the final image results I need when layering together multiple mp4s of the same length and format into a single output MP4. I am using ffmpeg to create a pseudo 'motion blur' effect on animation, and need to layer mp4s together with identical opacities to produce the final video.


I am using a base 'black' MP4 as the first layer for a background, and then adding a series of source mp4s with equal opacity over the top in each pass. Here I am showing a photoshop mockup using their 'normal' blending mode which is exactly the blending effect I am trying to replicate with ffmpeg. I understand that the final composite is less "bright" but that's fine (unless you have any ideas).



Instead of looking like the result above, I am getting output where the colors are either all pink, garbled, super dark or generally hugely overbright etc based on trying different blend modes.


Here are the commands I am using :


To create the original (uncompressed ?) 'black' MP4 from a sequence of black pngs :


ffmpeg -start_number 0 -r 24 -f image2 -s 1920x1080 -i black_seq.%04d.png -vcodec libx264 -crf 0 -pix_fmt yuv420p black_seq.mp4 -y



I then take that "black_seq.mp4" and blend a set of n number of source mp4s over the top with an opacity value. This runs in a loop and the output.mp4 of each pass becomes the input.mp4 of the next pass until it completes. In this example a total of 10 source mp4s assigns their opacity to 0.1 for each pass, and this is a single pass (below). The source mp4s are all very similar in their appearance and color, essentially just the same sequence of animation but offset in time by fractions of a single frame and have been generated from color pngs, using the same code that produced the first black layer (above).


ffmpeg i input.mp4 -i n_layer.mp4 -vcodec libx264 -crf 0 -pix_fmt yuv420p -filter_complex "blend=all_mode='overlay':all_opacity=0.1" output.mp4 -y



Then finally add some compression to the result as the final "blur.mp4"


ffmpeg -i "output.mp4" -vcodec libx264 -crf 25 -pix_fmt yuv420p "blur.mp4" -y



And yes, this is certainly highly inefficient as an approach, but I am learning. The main issue I am trying to solve is, despite the final blur.mp4 being less "bright", it has colors that are not matching the original animation and instead looks like the animation has been hue shifted somehow.


This image shows a cropped output for comparison (the processed blur is set to zero for clarity)



I would love some insight.