
Recherche avancée
Médias (1)
-
The Great Big Beautiful Tomorrow
28 octobre 2011, par
Mis à jour : Octobre 2011
Langue : English
Type : Texte
Autres articles (76)
-
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 (13673)
-
Index Out Of Bounds Exception when merging frames
25 avril 2016, par ElucidatorI’m writing software to convert 6 cubemap videos to 1 equirectangular video. Basically, it extracts frames from the 6 cubemap videos with ffmpeg, uses Nona to stitch them into a single frame, and converts the frames back into video.
I’m getting an IndexOutOfBounds exception when I try to run this. Can you give me any pointers on where my error could be or how to fix it ?
framecount = Directory.GetFiles(@System.IO.Path.GetDirectoryName(Application.ExecutablePath)).Count(path => Regex.IsMatch(path, @"front\d*[.]jpg"));
for (int i = 1; i < framecount; i++)
{
MergeFrames(i.ToString().PadLeft(5, '0'), i.ToString());
}
public void MergeFrames(string framenum, string exportname){
this.Text = "Merging frame: " + Int32.Parse(framenum) + "/" + framecount;
progressBar1.Value = ((Int32.Parse(framenum) / framecount) * 100);
var lines = File.ReadAllLines(System.IO.Path.GetDirectoryName(Application.ExecutablePath) + @"\" + "script.pto");
lines[13] = "i f0 y0 p-90 r0 v90 n\"" + System.IO.Path.GetDirectoryName(Application.ExecutablePath) + @"\" + "down" + framenum + ".jpg\"";
lines[14] = "i f0 y0 p0 r0 v90 n\"" + System.IO.Path.GetDirectoryName(Application.ExecutablePath) + @"\" + "front" + framenum + ".jpg\"";
lines[15] = "i f0 y90 p0 r0 v90 n\"" + System.IO.Path.GetDirectoryName(Application.ExecutablePath) + @"\" + "right" + framenum + ".jpg\"";
lines[16] = "i f0 y180 p0 r0 v90 n\"" + System.IO.Path.GetDirectoryName(Application.ExecutablePath) + @"\" + "back" + framenum + ".jpg\"";
lines[17] = "i y-90 p0 r0 v90 n\"" + System.IO.Path.GetDirectoryName(Application.ExecutablePath) + @"\" + "left" + framenum + ".jpg\"";
lines[18] = "i f0 y0 p90 r0 v90 n\"" + System.IO.Path.GetDirectoryName(Application.ExecutablePath) + @"\" + "top" + framenum + ".jpg\"";
File.WriteAllLines(System.IO.Path.GetDirectoryName(Application.ExecutablePath) + @"\" + "script.pto", lines);
String command = "script.pto -o " + exportname + ".png -v";
ProcessStartInfo cmdsi = new ProcessStartInfo("nona.exe");
cmdsi.Arguments = command;
Process cmd = Process.Start(cmdsi);
cmd.WaitForExit();
File.Delete(System.IO.Path.GetDirectoryName(Application.ExecutablePath) + @"\" + "down" + framenum + ".jpg");
File.Delete(System.IO.Path.GetDirectoryName(Application.ExecutablePath) + @"\" + "front" + framenum + ".jpg");
File.Delete(System.IO.Path.GetDirectoryName(Application.ExecutablePath) + @"\" + "right" + framenum + ".jpg");
File.Delete(System.IO.Path.GetDirectoryName(Application.ExecutablePath) + @"\" + "back" + framenum + ".jpg");
File.Delete(System.IO.Path.GetDirectoryName(Application.ExecutablePath) + @"\" + "left" + framenum + ".jpg");
File.Delete(System.IO.Path.GetDirectoryName(Application.ExecutablePath) + @"\" + "top" + framenum + ".jpg");
} -
Can FFMPEG be used to change the transparency of a single PNG ?
19 juillet 2020, par ChameleonI know that FFMPEG can manipulate transparency using fade in/fade out over a series of frames. I just haven't found a way to generate a png with a specified transparency setting.


I am in the process of creating a lot (20 in first set) of procedurally-generated videos. Each video requires several starts and stops, where with each stop, a png overlay describing what is seen will be displayed for several (actual number TBD, and may vary) frames. I'd like each overlay to fade in over x frames, display for y frames at full opacity and then fade out over y frames. The documentation on FFMPEG really sucks at explaining fade effects, and no one I've found showing usage actually explains what all of the parameters do.


The original sources for the videos are CGI png frames with a transparent background. I will be making the descriptive overlays with transparent backgrounds (same resolution as the CGI frames) - I'm really hoping to not have to manually save each overlay (8 overlays per video at a minimum) with 4 to 6 (or more) transparency settings - The company is being real indecisive as to the length of the fade in/out or the "hang time" of the descriptive overlays.


I have already created a Python script that uses FFMPEG to place overlays on specific frames, then uses FFMPEG to stitch all frames into a single video, adds a background to the video and then places the company's watermark on the video. It already manages the key frames and what images should be overlaid (and for how many frames). It is working well, but the company doesn't like the lack of fade. I already have the framework in place to manage the fade in/out duration (I'm just missing the answer to this question). I created the script because I have no doubt that I'll have to generate the final output on the first couple of videos a number of times to appease the stakeholders.


I'm really hoping to find a fairly easy way to hand FFMPEG a png with a transparent background and have FFMPEG hand me a copy of the image whose non-transparent part is now "x percent" transparent (or "y percent" opaque). I know from failed attempts that FFMPEG doesn't choke trying to make a region more than 100% transparent.


It's a real pain to get approval to install new software on the workstation, so I'm not actually interested in any suggestion that doesn't use FFMPEG or a pretty vanilla Python installation. - It's not that the other software might not be useful, it just means that if other software is needed, I'll have to manually create the frames.


-
Combine many videos in list using FFMPEG
2 septembre 2022, par anoor1234I have a bunch of videos that are MP4s with different FPS, resolution, aspect ratio, basically everything. I'm trying to see if its possible to use FFMPEG to combine them into a single 1080/720 video using a single command, or at least make them all similar format so that combining is easy. Speed and less CPU power would be preferred but I'm in no rush and


I found this command on another stack overflow question :


ffmpeg -i 1.mp4 -i 2.mp4 -i 3.mp4 -filter_complex \
"[0:v]scale=1280:720:force_original_aspect_ratio=decrease,pad=1280:720:-1:-1,setsar=1,fps=30,format=yuv420p[v0];
 [1:v]scale=1280:720:force_original_aspect_ratio=decrease,pad=1280:720:-1:-1,setsar=1,fps=30,format=yuv420p[v1];
 [2:v]scale=1280:720:force_original_aspect_ratio=decrease,pad=1280:720:-1:-1,setsar=1,fps=30,format=yuv420p[v2];
 [v0][0:a][v1][1:a][v2][2:a]concat=n=3:v=1:a=1[v][a]" \
-map "[v]" -map "[a]" -c:v libx264 -c:a aac -movflags +faststart output.mp4



The problem is that I have more that 3 videos to combine and I don't know how to work this command with more, I have an entire list of videos in a list.txt file structured as such :


file './videos/video1.mp4'
file './videos/video2.mp4'
file './videos/video3.mp4'



The code that somewhat worked for me was this


ffmpeg -safe 0 -f concat -i list.txt -c copy output.mp4



It combines the video well and fairly fast but I get weird glitches with the audio and the resolution is weird (I'm hoping for 1920x1080). I suspect this is due to the varying attributes of each video but I'm not sure. I'm familiar with Python but I have found no Python script that can do what I ask. If there any way to combine my list into one video (using FFMPEG or not) reliably ?