
Recherche avancée
Médias (2)
-
Valkaama DVD Label
4 octobre 2011, par
Mis à jour : Février 2013
Langue : English
Type : Image
-
Podcasting Legal guide
16 mai 2011, par
Mis à jour : Mai 2011
Langue : English
Type : Texte
Autres articles (112)
-
Le profil des utilisateurs
12 avril 2011, parChaque utilisateur dispose d’une page de profil lui permettant de modifier ses informations personnelle. Dans le menu de haut de page par défaut, un élément de menu est automatiquement créé à l’initialisation de MediaSPIP, visible uniquement si le visiteur est identifié sur le site.
L’utilisateur a accès à la modification de profil depuis sa page auteur, un lien dans la navigation "Modifier votre profil" est (...) -
Configurer la prise en compte des langues
15 novembre 2010, parAccéder à la configuration et ajouter des langues prises en compte
Afin de configurer la prise en compte de nouvelles langues, il est nécessaire de se rendre dans la partie "Administrer" du site.
De là, dans le menu de navigation, vous pouvez accéder à une partie "Gestion des langues" permettant d’activer la prise en compte de nouvelles langues.
Chaque nouvelle langue ajoutée reste désactivable tant qu’aucun objet n’est créé dans cette langue. Dans ce cas, elle devient grisée dans la configuration et (...) -
Submit bugs and patches
13 avril 2011Unfortunately a software is never perfect.
If you think you have found a bug, report it using our ticket system. Please to help us to fix it by providing the following information : the browser you are using, including the exact version as precise an explanation as possible of the problem if possible, the steps taken resulting in the problem a link to the site / page in question
If you think you have solved the bug, fill in a ticket and attach to it a corrective patch.
You may also (...)
Sur d’autres sites (17230)
-
(Java) ImageIO.write() freezes after 540 iterations
14 octobre 2019, par the4navesI’m currently trying to write a simple audio visualizer (Non realtime), but am running into a very weird problem.
After about 515-545 iterations of ImageIO.write(), the program freezes ; no exceptions, the program doesn’t crash, just, nothing.
Before you read the code below, here’s a quick rundown of it to make it a bit easier to understand :
1. Load data from program arguments.
2. Start ffmpeg with its input set to stdin.
3. In a loop ; Continually render an image, then send it to ffmpeg with ImageIO.write().Other info :
I’ve verified ImageIO.write() IS actually the problem by placing a print before and after the try/catch statement.
My first thought was a memory leak, but that doesn’t seem to be the case, at least according to Runtime.getRuntime().freeMemory() ;
The iterations needed to freeze the program is inconsistent, though its always been in the range of 515-540.
Rendering a video with less frames works flawlessly.
My previous solution was to write all images to a folder, then run ffmpeg on them all at once. This worked fine on any number of frames, but used upwards of a gigabyte of storage for a fairly small test video, unacceptable for the small program I’m trying to create.As a final note, I realize the code probably has a ton of optimization/general problems, I haven’t had the time to try and get it to work well, as it isn’t even fully working yet.
With that said, if you see any obvious problems, feel free to include them in your answer if you have the time, it’ll certainly save me some.Thanks
public class Run {
public static BufferedImage render = new BufferedImage(1920, 1080, BufferedImage.TYPE_INT_RGB);
public static Graphics buffer = render.getGraphics();
public static int frame = 0;
public static double[] bins = new double[3200];
public static double[] previousBins = new double[3200];
public static File audio;
public static BufferedImage background;
public static OutputStream output;
public static void main(String[] args) {
try {
String command = "cd /Users/admin/Desktop/render ; ffmpeg -r 60 -blocksize 150000 -i pipe:0 -i " + args[1].replaceAll(" ", "\\\\ ") + " final.mp4";
System.out.println(command);
ProcessBuilder processBuilder = new ProcessBuilder("bash", "-c", command);
Process process = processBuilder.start();
output = process.getOutputStream();
} catch (IOException e) {
e.printStackTrace();
}
try {
background = ImageIO.read(new File(args[0]));
} catch (IOException e) {
System.out.println("File not found");
}
audio = new File(args[1]);
ByteArrayOutputStream out = new ByteArrayOutputStream();
BufferedInputStream in = null;
try { in = new BufferedInputStream(new FileInputStream(audio));
} catch (FileNotFoundException e1) {
e1.printStackTrace();
}
try {
out.flush();
int read;
byte[] buff = new byte[3200];
while ((read = in .read(buff)) > 0) {
out.write(buff, 0, read);
}
} catch (IOException e1) {
e1.printStackTrace();
}
byte[] audioBytes = out.toByteArray();
System.out.println("Calculating length");
int frames = 600;
System.out.println("Rendering images");
int[] data = new int[3200];
int index = 0;
while (frame < frames) {
for (int i = 0; i < 3200; i++) {
data[i] = (short)(audioBytes[index + 2] << 16 | audioBytes[index + 1] << 8 | audioBytes[index] & 0xff);
index += 3;
}
index -= 4800;
fourier(data, bins);
renderImage();
try {
ImageIO.write(render, "jpg", output);
} catch (IOException e) {
e.printStackTrace();
}
frame++;
if (frame % 20 == 0) {
System.out.println(frame + "/" + frames + " frames completed");
}
}
System.out.println("Render completed");
System.out.println("Optimizing file size");
System.out.println("Optimization complete");
System.out.println("Program complete");
System.exit(0);
}
public static void renderImage() {
buffer.drawImage(background, 0, 0, null);
for (int i = 0; i < 110; i++) {
int height = (int)((bins[i] + previousBins[i]) / Short.MAX_VALUE);
buffer.fillRect(15 * i + 20, 800 - height, 10, (int)(height * 1.2));
}
System.arraycopy(bins, 0, previousBins, 0, 3200);
}
public static void fourier(int[] inReal, double[] out) {
for (int k = 0; k < inReal.length; k++) {
double real = 0.0;
double imaginary = 0.0;
for (int t = 0; t < inReal.length; t++) {
real += inReal[t] * Math.cos(2 * Math.PI * t * k / inReal.length);
imaginary -= inReal[t] * Math.sin(2 * Math.PI * t * k / inReal.length);
}
out[k] = Math.sqrt(Math.pow(real, 2) + Math.pow(imaginary, 2));
}
}
} -
How to install Ffmpeg fluent in LAMBDA ?
9 octobre 2020, par Jhony codeHi, can you help how did you set up the library (node-fluent-ffmpeg) in a lambda function correctly ?


Because i already set up the :


- 

- Serverless file with it's layer parameters
- Uploaded the binaries to the lambda function as a layer
- Already set up the FFPROBE_PATH AND FFMPEG_PATH from the lambda function








Also the weird thing is that : the lambda function just finish working, like sending a normal response.


https://user-images.githubusercontent.com/35440957/95387637-ff99a580-08be-11eb-9fc9-1498aea2e2c1.png


I mean also if you could show me step by step how did you make it work in a lambda function ?


You will see the following example of how i have everything setup and it still does not work :


1- This is from the lambda console


https://user-images.githubusercontent.com/35440957/95386867-ee03ce00-08bd-11eb-91ae-29b45bd90471.png


https://user-images.githubusercontent.com/35440957/95386217-f60f3e00-08bc-11eb-9fd8-b51d1b04a81e.png


2- My json dependencies


"dependencies": {
 "aws-sdk": "^2.764.0",
 "aws-serverless-express": "^3.3.8",
 "fluent-ffmpeg": "^2.1.2",
 "lambduh-execute": "^1.3.0"
 }



3- My serverless file


`service: functionName

provider:
 name: aws
 runtime: nodejs12.x
 memorySize: 3008
 timeout: 300
 stage: live
 region: us-east-1
 environment:
 FFMPEG_PATH: /opt/ffmpeg/ffmpeg
 FFPROBE_PATH: /opt/ffmpeg/ffprobe

functions:
 api:
 handler: lambda.handler
 events:
 - s3: ${self:custom.bucket}
 layers:
 - { Ref: FfmpegLambdaLayer }

layers:
 ffmpeg:
 path: layer

custom:
 bucket: buckename




4- The directory of the layer


https://user-images.githubusercontent.com/35440957/95386502-6918b480-08bd-11eb-95e6-1b0b78f3a230.png


5- Javascript file



const fs = require("fs");
const AWS = require("aws-sdk");
const ffmpeg = require("fluent-ffmpeg");
const s3 = new AWS.S3();

exports.handler = async (event, context, callback) => {

ffmpeg({
 source: `**Object file which i already verified it exists**`
 })
 .on("filenames", async (filenames) => {
 console.log("Uploading please wait");
 })
 .on("error", function (err) {
 console.log("Error in filenames section: " + JSON.stringify(err));
 })
 .on("end", function () {
 console.log("Screenshots taken");
 })
 .screenshots({
 count: 10,
 folder: "tmp/",
 filename: "thumbnail-at-%i.png",
 size: "1600x900",
 })
 .on("end", function (stdout, stderr) {


 })
 .on("error", function (err) {
 console.log("Error writing video to disk: " + JSON.stringify(err));
 throw "An error: " + err.message;
 });

};




Expected results


The dependecy must work as expected in a AWS lambda function.


Observed results


When using enviroment variables


https://user-images.githubusercontent.com/35440957/95548905-154cbf00-09d4-11eb-8f46-f06cd012b05b.png


When not using enviroment variables


Lambda function just finish it's job without showing any log (Error) messages
In the cloudwatch console it just show the log that lambda finished de function succesfully (Not the expected from the dependency)


I already used this dependecy locally, and it works ! but in LAMBDA it is too hard


Checklist


- 

- [ X] I have read the FAQ
- [ X] I have included full stderr/stdout output from ffmpeg
- [ X] I have included the binaries from the static build and deployed it to the lambda function
- [ X] I have set the enviroment variables
FFMPEG_PATH : /opt/ffmpeg/ffmpeg
FFPROBE_PATH : /opt/ffmpeg/ffprobe










Version information


- 

- fluent-ffmpeg version : ^2.1.2
- ffmpeg version or build : ffmpeg-git-20190925-amd64-static.tar.xz
- OS : Lambda (Linux enviroment) / Node 12.x








-
ANSI FATE
24 août 2010, par Multimedia Mike — FATE ServerThe new FATE server is shaping up well. I think most of the old configurations have been migrated to the new server. I see one new compiler for x86_64– PathScale. It’s not faring particularly well at this point.
New Tests
As I write this, I noticed that there are now an even 700 tests, twice as many as the last time I trumpeted such a milestone. (It should be noted that the new FATE system finally breaks down the master regression suite into individual tests.) Thankfully, it’s no longer necessary to wait for me to create or edit tests (anyone with FFmpeg privileges can do this), nor is it necessary to keep up with this blog to know exactly what tests are new. Now, you can simply inspect the file history on tests/fate.mak and tests/fate2.mak (I think these 2 files are going to merge in the near future).Vitor, as of r24865 : “Add FATE test for ANSI/ASCII animation and TTY demuxer.” Eh ? What’s this about ? I admit I was completely removed from FFmpeg development for much of June and July so I could have missed a lot. Fortunately, I can check the file history to see which lines were added to make this test happen. And if FATE is exercising the test, you know exactly where the samples will live. Here’s this new decoder in action on the relevant sample :
The file history fingers Suxen drol/Peter Ross for this handiwork. I might have guessed– the only person who is arguably more enamored with old, weird formats than even I. Now we wait for the day that YouTube has support for this format. I’m sure there are huge archives of these animations out there (and I wager that Trixter and Jason Scott know where).
It’s an animation — it just keeps going
Meanwhile, the FATE suite now encompasses a bunch of perceptual audio formats, thanks to the 1-off testing method and a few other techniques. These formats include Bink audio, WMA Pro, WMA voice, Vorbis, ATRAC1, ATRAC3, MS-GSM, AC3, E-AC3, NellyMoser, TrueSpeech, Intel Music Coder, QDM2, RealAudio Cooker, QCELP (just going down the source control log here), and others, no doubt.
Then there’s this curious tidbit : “Add FATE test for WMV8 DRM”. The test spec is
"fate-wmv8-drm: CMD = framecrc -cryptokey 137381538c84c068111902a59c5cf6c340247c39 -i $(SAMPLES)/wmv8/wmv_drm.wmv -an"
. I would still like to investigate FFmpeg’s cryptographic capabilities, which I suspect are moving in a direction to function as a complete SSL stack one day.New Platforms
As for new platforms, the new FATE system finally allows testing on OS/2 (remember that classic ? It was “the totally cool way to run your computer”). Thanks to Dave Yeo for taking this on.Further, a new MIPS-based platform recently appeared on the FATE list. This one reports itself as running on 74kf CPU. Googling for this processor quickly brings up Mans’ post about the Popcorn Hour device. So, congratulations to him for getting the mundane box to serve a higher purpose. Perhaps one day, I’ll be able to do the same for that Belco Alpha-400 netbook.