
Recherche avancée
Médias (1)
-
Rennes Emotion Map 2010-11
19 octobre 2011, par
Mis à jour : Juillet 2013
Langue : français
Type : Texte
Autres articles (47)
-
Demande de création d’un canal
12 mars 2010, parEn fonction de la configuration de la plateforme, l’utilisateur peu avoir à sa disposition deux méthodes différentes de demande de création de canal. La première est au moment de son inscription, la seconde, après son inscription en remplissant un formulaire de demande.
Les deux manières demandent les mêmes choses fonctionnent à peu près de la même manière, le futur utilisateur doit remplir une série de champ de formulaire permettant tout d’abord aux administrateurs d’avoir des informations quant à (...) -
Websites made with MediaSPIP
2 mai 2011, parThis page lists some websites based on MediaSPIP.
-
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 (...)
Sur d’autres sites (9125)
-
aarch64 : Use ret x instead of br x where possible
28 septembre 2020, par Jonathan Wrightaarch64 : Use ret x<n> instead of br x<n> where possible
Change AArch64 assembly code to use :
ret x<n>
instead of :
br x<n>"ret x<n>" is already used in a lot of places so this patch makes it
consistent across the code base. This does not change behavior or
performance.In addition, this change reduces the number of landing pads needed in
a subsequent patch to support the Armv8.5-A Branch Target
Identification (BTI) security feature.Signed-off-by : Jonathan Wright <jonathan.wright@arm.com>
Signed-off-by : Martin Storsjö <martin@martin.st> -
Javascript sync images
26 septembre 2021, par Ruan MattI'm studying about FPS, animations, image processing in order to get into the game development world.


I took a video and extract each frame into a .jpg image, and I want to run these images, side by side, in the same sync as the original video


You can test at this link => https://jsfiddle.net/ruanmatt144/267erymL/2/


The problem : The video FPS is 30, but even if I put 1000/30, or any other value that refers to the original FPS, it doesn't work ! It doesn't stay in sync. setTimeout has a limit on decimal places that I don't know about ?


Video timestamp for each frame => https://unity-animation.ztech.gq/timestamp.txt


How can I sync those images following the original video timestamp ? Thank you.


var arr = Array();
var v = 0;
var v2 = 0;
var k = 0;

(function getImages(i) {
 setTimeout(function() {
 v++;
 var r = Math.random();
 loadImage("https://unity-animation.ztech.gq/frames/out-" + v + ".jpg?v=" + r);
 arr.push("https://unity-animation.ztech.gq/frames/out-" + v + ".jpg?v=" + r);

 if (--i) getImages(i);
 }, 30)
})(20000);



const loadImage = src =>
 new Promise((resolve, reject) => {
 const img = new Image();
 img.onload = () => resolve(img);
 img.src = src;
 }) 
;

var imgArray = new Array();
setTimeout(function() {
 (function runVideo(i) {
 setTimeout(function() {
 v2++;
 imgArray[v2] = new Image();
 document.getElementById('load').appendChild(imgArray[v2]);

 imgArray[v2].src = arr[v2];
 imgArray[v2].classList.add("overlayImage");
 imgArray.shift();
 var parent = document.querySelector("#load");
 [...parent.children].slice(0,-10).forEach(parent.removeChild.bind(parent));
 var last = document.querySelector('#load img:last-child').getAttribute("src");
 var _final = last.substring(
 last.indexOf("-") + 1, 
 last.lastIndexOf(".jpg")
 );
 arr.shift();
 if (--i) runVideo(i);
 }, 90) // <== the problem is here, which value I must use?
 })(38194);
 document.getElementById("video").play();
}, 20000);



-
FFMPEG : Can not free AVPacket when decode H264 stream ?
13 janvier 2016, par TTGroupI’m using FFMPEG to decode H264 stream, my code is below
AVFormatContext *pFormatCtx = NULL;
AVCodecContext *pCodecCtx = NULL;
AVFrame *pFrame = NULL;
AVPacket packet;
packet.data = NULL;
pFormatCtx = avformat_alloc_context();
avformat_open_input(&pFormatCtx, videoStreamPath, NULL, NULL);
liveHeader.pCodecCtx = pFormatCtx->streams[videoStreamIndex]->codec;
int bytesDecoded = 0;
int frameFinished = 0;
while (true)
{
while (packet.size > 0)
{
// Decode the next chunk of data
bytesDecoded = avcodec_decode_video2(pCodecCtx, pFrame,
&frameFinished, &packet);
// Was there an error?
if (bytesDecoded < 0)
{
printf(strErr, "Error while decoding frame\n");
commonGlobal->WriteRuntimeRecLogs(strErr);
return RS_NOT_OK;
}
packet.size -= bytesDecoded;
packet.data += bytesDecoded;
if (frameFinished)
{
//av_free_packet(&packet); //(free 1)
return RS_OK;
}
// Did we finish the current frame? Then we can return
}
do
{
try
{
int ret = av_read_frame(pFormatCtx, &packet);
if (ret < 0)
{
char strErr[STR_LENGTH_256];
if (ret == AVERROR_EOF || (pFormatCtx->pb && pFormatCtx->pb->eof_reached))
{
sprintf(strErr, "Error end of file line %d", __LINE__);
}
if (pFormatCtx->pb && pFormatCtx->pb->error)
{
sprintf(strErr, "Error end of file line %d", __LINE__);
}
packet.data = NULL;
return RS_NOT_OK;
}
}
catch (...)
{
packet.data = NULL;
return RS_NOT_OK;
}
} while (packet.stream_index != videoStreamIndex);
}
//av_free_packet(&packet); //(free 2)The problem is I don’t know how to free memory of
packet
correctly.I have tried to delete packet’s data by calling one of two places
av_free_packet(&packet); (free 1)
andav_free_packet(&packet); (free 2)
. And the result is the application was crashed with the message"Heap Corruption..."
If I do not free the
packet
, the memory leak is occur.Note that the above code is successful when decode
H264
stream, the main problem is memory leak and crashed when I try to free thepacket
Someone can show me the problems in my code.
Many thanks,
T&T