
Recherche avancée
Autres articles (46)
-
Keeping control of your media in your hands
13 avril 2011, parThe vocabulary used on this site and around MediaSPIP in general, aims to avoid reference to Web 2.0 and the companies that profit from media-sharing.
While using MediaSPIP, you are invited to avoid using words like "Brand", "Cloud" and "Market".
MediaSPIP is designed to facilitate the sharing of creative media online, while allowing authors to retain complete control of their work.
MediaSPIP aims to be accessible to as many people as possible and development is based on expanding the (...) -
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 -
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 (7446)
-
Anomalie #2773 (Nouveau) : Boucle recherche Forum : mauvaise selection avec le critère {tout}
24 juin 2012, par Hossein ROTYLe résultat d’une recherche dans les forums est différent selon que l’on emploie le critère plat ou le critère tout. Alors que le critère plat sélectionne correctement les messages contenant l’occurence recherchée, le critère tout sélectionne le premier message du thread et non la réponse à ce message (...)
-
Has anyone used the speech driven animation and can you make it work ?
16 août 2020, par hopw JanI'm talking about this repo. I installed all the dependencies but I can't make it work. Any help is highly appreciated ( :


I'm running python 3.7.5.


This is my code :


import sda
import scipy.io.wavfile as wav
from PIL import Image

va = sda.VideoAnimator(gpu=0, model_path="crema")# Instantiate the animator
fs, audio_clip = wav.read("example/audio.wav")
still_frame = Image.open("example/image.bmp")
vid, aud = va(frame, audio_clip, fs=fs)
va.save_video(vid, aud, "generated.mp4")



Sadly it doesn't seem to work and it gives me this error :


Warning (from warnings module):
 File "C:\Users\Alex\AppData\Local\Programs\Python\Python37\lib\site-packages\pydub\utils.py", line 170
 warn("Couldn't find ffmpeg or avconv - defaulting to ffmpeg, but may not work", RuntimeWarning)
RuntimeWarning: Couldn't find ffmpeg or avconv - defaulting to ffmpeg, but may not work
Traceback (most recent call last):
 File "C:\Users\Alex\Desktop\test\test.py", line 8, in <module>
 vid, aud = va(frame, audio_clip, fs=fs)
NameError: name 'frame' is not defined
</module>


Spent about 2 hours and I can't do anything, I'm out of ideas.
If you take the time to help me thank you from the bottom of my heart.


-
AWS Lambda for generate thumbnail save empty file
30 octobre 2019, par MilouselI need to create aws lambda for creating thumbnail from video by using ffmpeg, which is saved on S3 and this thumbnail saved into S3 too.
I downloaded ffmpeg from https://johnvansickle.com/ffmpeg/ page, set ffmpeg into nodejs file and send it into .zip. From this zip file I created ffmpeg layer. After that I connect my lambda with this ffmpeg layer. When I test it I receive Success response, but I save empty file (0 B size) into S3.
const AWS = require("aws-sdk");
const { spawn } = require("child_process");
const { createReadStream, createWriteStream } = require("fs");
const s3 = new AWS.S3();
const ffmpegPath = "/opt/nodejs/ffmpeg";
const allowedTypes = ["mov", "mpg", "mpeg", "mp4", "wmv", "avi", "webm"];
const width = process.env.WIDTH;
const height = process.env.HEIGHT;
module.exports.handler = async (event, context) => {
const srcKey = "test/0255f240-efef-11e9-862e-3949600f0ec9.mp4";
const bucket = "video.devel.abc.com";
const target = s3.getSignedUrl("getObject", {
Bucket: bucket,
Key: srcKey,
Expires: 1000
});
let fileType = "mp4";
console.log("srcKey: " + srcKey);
console.log("bucket: " + bucket);
console.log("target: " + target);
if (!fileType) {
throw new Error(`invalid file type found for key: ${srcKey}`);
}
if (allowedTypes.indexOf(fileType) === -1) {
throw new Error(`filetype: ${fileType} is not an allowed type`);
}
function createImage(seek) {
return new Promise((resolve, reject) => {
let tmpFile = createWriteStream(`/tmp/screenshot.jpg`);
const ffmpeg = spawn(ffmpegPath, [
"-ss",
seek,
"-i",
target,
"-vf",
`thumbnail,scale=${width}:${height}`,
"-qscale:v",
"2",
"-frames:v",
"1",
"-f",
"image2",
"-c:v",
"mjpeg",
"pipe:1"
]);
ffmpeg.stdout.pipe(tmpFile);
ffmpeg.on("close", function(code) {
console.log('code: ' + code);
tmpFile.end();
resolve();
});
ffmpeg.on("error", function(err) {
console.log(err);
reject();
});
});
}
function uploadToS3() {
return new Promise((resolve, reject) => {
let tmpFile = createReadStream(`/tmp/screenshot.jpg`);
let dstKey = srcKey
.replace(/\.\w+$/, `.jpg`)
.replace("test/", "test/shots/");
//const screensFile = "test/shots/";
console.log("dstKey: " + dstKey);
var params = {
Bucket: bucket,
Key: dstKey,
Body: tmpFile,
ContentType: `image/jpg`
};
s3.upload(params, function(err, data) {
if (err) {
console.log(err);
reject();
}
console.log(`successful upload to ${bucket}/${dstKey}`);
resolve();
});
});
}
await createImage(1);
await uploadToS3();
return console.log(`processed ${bucket}/${srcKey} successfully`);
};When I test it I receive these logs :
- srcKey : test/0255f240-efef-11e9-862e-3949600f0ec9.mp4
- bucket : video.devel.abc.com
- INFO processed video.devel.abc.com successfully
- code : 1
- bucket : video.devel.abc.com
- dstKey : test/shots/0255f240-efef-11e9-862e-3949600f0ec9.jpg
- successful upload to video.devel.abc.com/test/shots/0255f240-efef-11e9-862e-3949600f0ec9.jpg
- processed video.devel.abc.com/test/0255f240-efef-11e9-862e-3949600f0ec9.mp4 successfully
So file is really created, but it is empty (size is 0 B), which is not ideal.