
Recherche avancée
Autres articles (99)
-
Qu’est ce qu’un éditorial
21 juin 2013, parEcrivez votre de point de vue dans un article. Celui-ci sera rangé dans une rubrique prévue à cet effet.
Un éditorial est un article de type texte uniquement. Il a pour objectif de ranger les points de vue dans une rubrique dédiée. Un seul éditorial est placé à la une en page d’accueil. Pour consulter les précédents, consultez la rubrique dédiée.
Vous pouvez personnaliser le formulaire de création d’un éditorial.
Formulaire de création d’un éditorial Dans le cas d’un document de type éditorial, les (...) -
Formulaire personnalisable
21 juin 2013, parCette page présente les champs disponibles dans le formulaire de publication d’un média et il indique les différents champs qu’on peut ajouter. Formulaire de création d’un Media
Dans le cas d’un document de type média, les champs proposés par défaut sont : Texte Activer/Désactiver le forum ( on peut désactiver l’invite au commentaire pour chaque article ) Licence Ajout/suppression d’auteurs Tags
On peut modifier ce formulaire dans la partie :
Administration > Configuration des masques de formulaire. (...) -
Qu’est ce qu’un masque de formulaire
13 juin 2013, parUn masque de formulaire consiste en la personnalisation du formulaire de mise en ligne des médias, rubriques, actualités, éditoriaux et liens vers des sites.
Chaque formulaire de publication d’objet peut donc être personnalisé.
Pour accéder à la personnalisation des champs de formulaires, il est nécessaire d’aller dans l’administration de votre MediaSPIP puis de sélectionner "Configuration des masques de formulaires".
Sélectionnez ensuite le formulaire à modifier en cliquant sur sont type d’objet. (...)
Sur d’autres sites (7418)
-
FFmpeg parameters for Fisheye image correction
19 janvier 2023, par Julio CesarI am trying to achieve two things (any of them will work for my solution) :


- 

- Fisheye video to equirectangular (and view it in 360 view)
- Fisheye video to flat (if I understood correctly, it will be just like the fisheye image (maybe I will lose some FoV ?) but without distortions. Of course in this case I will not use 360 view).






Camera specs : https://documentation.meraki.com/MV/Viewing_Video/Understanding_Image_Quality_on_the_MV32


For test purposes I am using an image as input :


For 1), I am using
ffmpeg -i input_file -vf v360=fisheye:e:ih_fov=180:iv_fov=180:pitch=90 output_file
. This command gives me a rectangular image where the half upper is black, and when testing in https://renderstuff.com/tools/360-panorama-web-viewer/ the user can navigate through this black space (I would like to limit user view, so he could not get to the black part). If I crop and remove the black part, the image in the 360 view becomes distorted (loses the aspect ratio).

For 2), I tried
ffmpeg -i input_file -vf v360=fisheye:flat:ih_fov=180:iv_fov=180 output_file
but it doesn't seem to correct the distortions properly.

FYI this video will be published in AntMedia server to be used as an iframe in web applications. I'll try to use 1) in AntMedia since it supports 360 view (https://antmedia.io/play-live-360-degree-video/).


Since I am new to this, please ask for more information if needed.

Thanks in advance.

-
FFmpeg. Reading and writing multiple files from a stream
17 février 2023, par Stiven DipletThe problem is the following. I need to convert a video to a set of pictures using the ffmpeg process. I have successfully done this before with the following code :


public void VideoToImages1()
 {
 var inputFile = @"D:\testVideo.avi";
 var outputFilesPattern = @"D:\image%03d.jpg";

 using var process = new Process
 {
 StartInfo = new ProcessStartInfo
 {
 UseShellExecute = false,
 CreateNoWindow = true,
 Arguments = $"-y -i {inputFile} {outputFilesPattern}",
 FileName = "ffmpeg.exe"
 },
 EnableRaisingEvents = true
 };

 process.Start();

 process.WaitForExit();
 }



Now I need to stream video through the input Stream and receive data from the output Stream. For this I have the following code. It's fully working since I used it to convert video and successfully streamed input via Stream and received output via Stream and produced a valid file.


public void VideoToImages2()
 {
 var inputFile = @"D:\testVideo.avi";
 var outputFile = @"D:\resultImages.png";

 var process = new Process
 {
 StartInfo = new ProcessStartInfo
 {
 RedirectStandardInput = true,
 RedirectStandardOutput = true,
 UseShellExecute = false,
 CreateNoWindow = true,
 Arguments = "-y -i - -f image2 -",
 FileName = _ffmpeg
 },
 EnableRaisingEvents = true
 };

 process.Start();

 //Write input data to input stream
 var inputTask = Task.Run(() =>
 {
 using (var input = new FileStream(inputFile, FileMode.Open))
 {
 input.CopyTo(process.StandardInput.BaseStream);
 process.StandardInput.Close();
 }
 });


 //Read multiple files from output stream
 var outputTask = Task.Run(() =>
 {
 //Problem here
 using (var output = new FileStream(outputFile, FileMode.Create))
 process.StandardOutput.BaseStream.CopyTo(output);
 });


 Task.WaitAll(inputTask, outputTask);

 process.WaitForExit();
 }



The problem here is that instead of creating files in a directory according to the specified pattern, it returns these files in a stream. As a result, I do not know how to write all the files from the Stream and how to process this output, since it contains many files. At the moment I have only 1 image created.
Help me please.


I tried googling but didn't find anything useful


-
av::av_encode_video produces blurred video from crisp files
9 janvier 2023, par AbdirizakI am using the
av::av_encode_video()
function to produce a .mp4 video from png files, as in this answer. I pay special attention for the png files to be perfectly crisp, i.e. I plot matrices to png with exactly the same dimensions, so that every matrix cell maps to one cell in the png. Here is code to illustrate what I mean :

library(av)

n.times <- 24*10
n.row <- 50
n.col <- 26

out.dir <- "/Users/Abdirizak/Documents/some/directory/"

for (i in 1:n.times) {
 
 current.mat <- matrix(data = rnorm(n.row*n.col), nrow = n.row, ncol = n.col)
 
 setwd(out.dir)
 png(filename = paste0(i, ".png"), width = n.row, height = n.col)
 
 par(mar = rep(0,4))
 image(current.mat)
 
 dev.off()
 
}

setwd(out.dir)
png.files <- paste0(out.dir, list.files(pattern = ".png$"))

av::av_encode_video(input = png.files, output = "000.mp4", framerate = 24)



Now, even though my input .png files are perfectly crisp, the output .mp4 video is blurry. How can I prevent that from happening ? I.e. how can I get a perfectly crisp video ? (I am aware that this will likely inflate the file size of the .mp4 file)


I already digged a bit into the
vfilter
argument ofav_encode_video()
and the underlying ffmpeg filter graphs on here, but could not yet really get the hang on it.

I am looking at the .mp4 file through QuickTime Player on MacOS Ventura 13.0.1, and using R version 4.2.2 through RStudio 2022.12.0.353


Edit 9.1.2023 :


To further clarify, here is an example screenshot of a png image (not the original png file because that one appears too small here) :




As I said, a perfectly crisp image.


On the other hand, a screenshot of the .mp4 movie looks like this :




Somewhat unsatisfactory. Any suggestions are welcome.