
Recherche avancée
Médias (1)
-
Bug de détection d’ogg
22 mars 2013, par
Mis à jour : Avril 2013
Langue : français
Type : Video
Autres articles (7)
-
Emballe Médias : Mettre en ligne simplement des documents
29 octobre 2010, parLe plugin emballe médias a été développé principalement pour la distribution mediaSPIP mais est également utilisé dans d’autres projets proches comme géodiversité par exemple. Plugins nécessaires et compatibles
Pour fonctionner ce plugin nécessite que d’autres plugins soient installés : CFG Saisies SPIP Bonux Diogène swfupload jqueryui
D’autres plugins peuvent être utilisés en complément afin d’améliorer ses capacités : Ancres douces Légendes photo_infos spipmotion (...) -
Prérequis à l’installation
31 janvier 2010, parPréambule
Cet article n’a pas pour but de détailler les installations de ces logiciels mais plutôt de donner des informations sur leur configuration spécifique.
Avant toute chose SPIPMotion tout comme MediaSPIP est fait pour tourner sur des distributions Linux de type Debian ou dérivées (Ubuntu...). Les documentations de ce site se réfèrent donc à ces distributions. Il est également possible de l’utiliser sur d’autres distributions Linux mais aucune garantie de bon fonctionnement n’est possible.
Il (...) -
Menus personnalisés
14 novembre 2010, parMediaSPIP utilise le plugin Menus pour gérer plusieurs menus configurables pour la navigation.
Cela permet de laisser aux administrateurs de canaux la possibilité de configurer finement ces menus.
Menus créés à l’initialisation du site
Par défaut trois menus sont créés automatiquement à l’initialisation du site : Le menu principal ; Identifiant : barrenav ; Ce menu s’insère en général en haut de la page après le bloc d’entête, son identifiant le rend compatible avec les squelettes basés sur Zpip ; (...)
Sur d’autres sites (4186)
-
Handling an arbitrary number of start and stop time pairings to cut a movie file down
9 juin 2019, par KieranI am writing a function that takes a list of tuples and a file path string as arguments and outputs a cut down video that only includes the frames that fall inside the start/stop pairings provided.
I’m getting stuck because I am not sure whether the .trim() method of the ’infile’ object is altering the existing object or or creating a new one or doing something else entirely.
the list of start/stop frame pairings can be arbitrarily long, every example I have found has been for a specific number of start and stop pairings and I can’t find anything describing what data structure needs to be passed back to ffmpeg.concat().
My code is displayed below :
import ffmpeg
frameStamps = [(50,75),(120,700),(1250,1500)]
videoFilePath = 'C:/Users/Kieran/Videos/testMovie.mp4'
outputFolder = 'C:/Users/Kieran/Videos/'
def slice_video(frameStamps, videoFilePath, outputFolder):
originalFile = ffmpeg.input(videoFilePath)
for stamp in frameStamps:
ffmpeg.concat(originalFile.trim(start_frame=stamp[0], end_frame=stamp[1]))
ffmpeg.output(outputFolder + 'testoutput.mp4')
ffmpeg.run()
slice_video(frameStamps, videoFilePath, outputFolder)Now I am able to get the following when I individually print out originalFile.trim() which are getting recognised in the console as "FilterableStream" objects
trim(end_frame=75, start_frame=50)[None] <29b4fb0736ec>
trim(end_frame=700, start_frame=120)[None] <c66c4e1a48f5>
trim(end_frame=1500, start_frame=1250)[None] <13e0697a5288>
</c66c4e1a48f5>and I have tried passing them back as a list, dictionary and tuple and haven’t been able to get it working
Output Errors :
File "C:/Users/Kieran/Example.py", line 21, in slice_video
ffmpeg.output(outputFolder + 'testoutput.mp4')
File "C:\ProgramData\Anaconda3\lib\site-packages\ffmpeg\_ffmpeg.py", line 94, in output
return OutputNode(streams, output.__name__, kwargs=kwargs).stream()
File "C:\ProgramData\Anaconda3\lib\site-packages\ffmpeg\nodes.py", line 282, in __init__
kwargs=kwargs
File "C:\ProgramData\Anaconda3\lib\site-packages\ffmpeg\nodes.py", line 170, in __init__
self.__check_input_len(stream_map, min_inputs, max_inputs)
File "C:\ProgramData\Anaconda3\lib\site-packages\ffmpeg\nodes.py", line 149, in __check_input_len
raise ValueError('Expected at least {} input stream(s); got {}'.format(min_inputs, len(stream_map)))
ValueError: Expected at least 1 input stream(s); got 0 -
How to convert a javascript animation to video on the server-side using nodejs ?
13 mai 2019, par user9964622I have a app where a user can create animations , I want to be able to convert these animations to video on server side, so user can save and share them eg YouTube, etc
Here is what I have so far , animation created using create js and ffmpegserver.js.
ffmpegserver.js.
This is a simple node server and library that sends canvas frames to the server and uses FFmpeg to compress the video. It can be used standalone or with CCapture.js
Test3.html
<code class="echappe-js"><body onload="init();">Simple Tween Demo
<script src="http://localhost:8081/ffmpegserver/CCapture.js"></script>
<script src="http://localhost:8081/ffmpegserver/ffmpegserver.js"></script>
<script src="https://code.createjs.com/1.0.0/createjs.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/tween.js/17.2.0/Tween.js"></script>
<script src='http://stackoverflow.com/feeds/tag/test3.js'></script>
Test3.js
/* eslint-disable eol-last */
/* eslint-disable no-undef */
/* eslint-disable quotes */
var canvas, stage;
function init() {
var framesPerSecond = 60;
var numFrames = framesPerSecond * 5; // a 5 second 60fps video
var frameNum = 0;
var progressElem = document.getElementById("progress");
var progressNode = document.createTextNode("");
progressElem.appendChild(progressNode);
function onProgress(progress) {
progressNode.nodeValue = (progress * 100).toFixed(1) + "%";
}
function showVideoLink(url, size) {
size = size ? (" [size: " + (size / 1024 / 1024).toFixed(1) + "meg]") : " [unknown size]";
var a = document.createElement("a");
a.href = url;
var filename = url;
var slashNdx = filename.lastIndexOf("/");
if (slashNdx >= 0) {
filename = filename.substr(slashNdx + 1);
}
a.download = filename;
a.appendChild(document.createTextNode("Download"));
var container = document.getElementById("container").insertBefore(a, progressElem);
}
var capturer = new CCapture( {
format: 'ffmpegserver',
//workersPath: "3rdparty/",
//format: 'gif',
//verbose: true,
framerate: framesPerSecond,
onProgress: onProgress,
//extension: ".mp4",
//codec: "libx264",
} );
capturer.start();
canvas = document.getElementById("testCanvas");
stage = new createjs.Stage(canvas);
var ball = new createjs.Shape();
ball.graphics.setStrokeStyle(5, 'round', 'round');
// eslint-disable-next-line quotes
ball.graphics.beginStroke('#000000');
ball.graphics.beginFill("#FF0000").drawCircle(0, 0, 50);
ball.graphics.setStrokeStyle(1, 'round', 'round');
ball.graphics.beginStroke('#000000');
ball.graphics.moveTo(0, 0);
ball.graphics.lineTo(0, 50);
ball.graphics.endStroke();
ball.x = 200;
ball.y = -50;
createjs.Tween.get(ball, {loop: -1})
.to({x: ball.x, y: canvas.height - 55, rotation: -360}, 1500, createjs.Ease.bounceOut)
.wait(1000)
.to({x: canvas.width - 55, rotation: 360}, 2500, createjs.Ease.bounceOut)
.wait(1000)
.to({scaleX: 2, scaleY: 2}, 2500, createjs.Ease.quadOut)
.wait(1000)
stage.addChild(ball);
createjs.Ticker.addEventListener("tick", stage);
function render() {
requestAnimationFrame(render);
capturer.capture( canvas );
++frameNum;
if (frameNum < numFrames) {
progressNode.nodeValue = "rendered frame# " + frameNum + " of " + numFrames;
} else if (frameNum === numFrames) {
capturer.stop();
capturer.save(showVideoLink);
}
}
render();
}Everything works fine, you can test it yourself if you want by cloning the repo.
Right now animation rendering happens in client side, I would like this animation rendering to happen in the backend side
What do I need to change to make this animation rendering in backend server side using Nodejs ? any help or suggestions will be appreciated.
-
Audio conversion and filter application using ffmpeg with 1 command
1er juillet 2019, par user2773013I have an mp3 file I need to convert to wav, and apply loudnorm filter afterwards. So far i’ve been doing it with 2 commands.
ffmpeg -i input.mp3 output.wav
and
ffmpeg -y -nostdin -i output.wav -filter_complex "[0:0]FILTER PARAMETER" -map_metadata 0 -map_metadata:s:a:0 0:s:a:0 -map_chapters 0 -map [norm0] -c:a pcm_s16le -ar 1500 -c:s copy out2.wav
Is there anyway to use 1 command instead of 2 ? I tried converting straight from mp3 to out2.wav by changing output.wav to input.mp3, but when the resulting file is compared with diff, they are different compared to the 2 step process.
I’m fairly new to ffmpeg, and have spent hours on the documentation without really knowing how to accomplish what i’m trying to do.