
Recherche avancée
Médias (16)
-
#7 Ambience
16 octobre 2011, par
Mis à jour : Juin 2015
Langue : English
Type : Audio
-
#6 Teaser Music
16 octobre 2011, par
Mis à jour : Février 2013
Langue : English
Type : Audio
-
#5 End Title
16 octobre 2011, par
Mis à jour : Février 2013
Langue : English
Type : Audio
-
#3 The Safest Place
16 octobre 2011, par
Mis à jour : Février 2013
Langue : English
Type : Audio
-
#4 Emo Creates
15 octobre 2011, par
Mis à jour : Février 2013
Langue : English
Type : Audio
-
#2 Typewriter Dance
15 octobre 2011, par
Mis à jour : Février 2013
Langue : English
Type : Audio
Autres articles (79)
-
Les autorisations surchargées par les plugins
27 avril 2010, parMediaspip core
autoriser_auteur_modifier() afin que les visiteurs soient capables de modifier leurs informations sur la page d’auteurs -
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 (...) -
Les images
15 mai 2013
Sur d’autres sites (9082)
-
Uncaught ReferenceError : CCapture is not defined ?
13 octobre 2024, par The Dead ManI have a simple app to create a canvas and render it. I am using capture js and FFmpeg module for converting videos in my app, but when I run the app I get the following reference error :



Uncaught ReferenceError: CCapture is not defined
 at test.js:67`




Here is test.js :



(function() {
 "use strict";

 var framesPerSecond = 60;
 var numFrames = 20; //framesPerSecond * 60 * 2;
 var thickness = 100;
 var speed = 4;
 var frameNum = 0;

 var canvas = document.getElementById("c");
 var ctx = canvas.getContext("2d");
 canvas.width = 1280;
 canvas.height = 720;

 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(url + size));
 document.body.appendChild(a);
 }

 var capturer = new CCapture( {
 format: 'ffmpegserver',
 //workersPath: "3rdparty/",
 //format: 'gif',
 verbose: false,
 framerate: framesPerSecond,
 onProgress: onProgress,
 //extension: ".mp4",
 //codec: "libx264",
 } );
 capturer.start();

 function drawLines(ctx) {
 for (var xx = -canvas.width; xx < canvas.width; xx += 2) {
 var l = (xx - (-canvas.width)) / (canvas.width * 2);
 ctx.beginPath();
 ctx.moveTo(xx, -canvas.height);
 ctx.lineTo(xx, canvas.height);
 ctx.strokeStyle = "hsla(" + ((l * 360 * 24) % 360) + ",100%,50%,0.5)";
 ctx.stroke();
 }
 }

 function render(time) {
 ctx.fillStyle = "#000";
 ctx.fillRect(0, 0, canvas.width, canvas.height);

 ctx.fillStyle = "#FFF";
 for (var xx = 0; xx < canvas.width + thickness * 2; xx += thickness * 2) {
 var x = xx - (frameNum * speed % (thickness * 2));
 ctx.fillRect(x, 0, thickness, canvas.height);
 }

 ctx.save();
 ctx.globalCompositeOperation = "difference";

 ctx.font = "400px sans-serif";
 ctx.textAlign = "center";
 ctx.textBaseline = "middle";
 ctx.fillText(frameNum, canvas.width / 2, canvas.height / 2);


 ctx.save();
 ctx.translate(canvas.width * 0.5, canvas.height * 0.5);
 ctx.rotate(frameNum * 0.01);
 ctx.translate(canvas.width * 0.25, 0);
 drawLines(ctx);
 ctx.restore();

 ctx.save();
 ctx.translate(canvas.width * 0.5, canvas.height * 0.5);
 ctx.rotate(frameNum * -0.013);
 ctx.translate(canvas.width * 0.37, 0);
 drawLines(ctx);
 ctx.restore();

 ctx.restore();

 capturer.capture(canvas);

 ++frameNum;
 if (frameNum === numFrames) {
 capturer.stop();
 capturer.save(showVideoLink);
 } else {
 requestAnimationFrame(render);
 }
 }
 requestAnimationFrame(render);
}());



-
How To Add Line Break In CMD Command In Batch File
23 août 2022, par HarinderI want to add a line break in a batch file here is the code


for %%I in (*.mp4) do (
 set "FullFileName=%%I"
 set "OnlyFileName=%%~nI"
 setlocal EnableDelayedExpansion
 set "FullFileNameTrim=!OnlyFileName:_=!"
 set "FullFileNameTrim=!OnlyFileName:~9!"
 
 set "OnlyFileName=!OnlyFileName:_= !"
 set "OnlyFileName=!OnlyFileName:-= !"
 set "n=!^&echo.!"
 set "OnlyFileName=!OnlyFileName:(=%n%!"
 set "OnlyFileName=!OnlyFileName:~9!"
 ffmpeg.exe -i "!FullFileName!" -vf "drawtext=text=!OnlyFileName!:fontfile='C\:\\Users\\harin\\Desktop\\test\\Fonts\\Glamy Sunrise.ttf':fontcolor=black:fontsize=54:x=20:y=50" -b:v 1M -r 60 -b:a 144k -crf 17 "C:\Users\harin\Desktop\test\in\Working\1\!FullFileNameTrim!.mp4"
 endlocal
)
endlocal



I am not able to put line break by using


set "n=!^&echo.!"
 set "OnlyFileName=!OnlyFileName:(=%n%!"



Is there a way I can add a line break


Thanks


-
avfilter/af_channelmap : Fix double-free of AVFilterChannelLayouts on error
7 août 2020, par Andreas Rheinhardtavfilter/af_channelmap : Fix double-free of AVFilterChannelLayouts on error
The query_formats function of the channelmap filter tries to allocate
a list of channel layouts which on success are attached to more permanent
objects (an AVFilterLink) for storage afterwards. If attaching succeeds,
the link becomes one of the common owners (in this case, the only owner)
of the list. Yet if the list has been successfully attached to the link
and an error happens lateron, the list was manually freed, which is wrong,
because it is owned by its link so that the link's pointer to the list will
become dangling and there will be a double-free/use-after-free when the link
is later cleaned up automatically.This commit fixes this by removing the custom freeing code ; this will
temporarily add a leaking codepath (if attaching the list fails, the list
will leak), but this will be fixed soon by making sure that an
AVFilterChannelLayouts without owner will be automatically freed when
attaching it to an AVFilterLink fails.Reviewed-by : Nicolas George <george@nsup.org>
Signed-off-by : Andreas Rheinhardt <andreas.rheinhardt@gmail.com>