
Recherche avancée
Autres articles (78)
-
Organiser par catégorie
17 mai 2013, parDans MédiaSPIP, une rubrique a 2 noms : catégorie et rubrique.
Les différents documents stockés dans MédiaSPIP peuvent être rangés dans différentes catégories. On peut créer une catégorie en cliquant sur "publier une catégorie" dans le menu publier en haut à droite ( après authentification ). Une catégorie peut être rangée dans une autre catégorie aussi ce qui fait qu’on peut construire une arborescence de catégories.
Lors de la publication prochaine d’un document, la nouvelle catégorie créée sera proposée (...) -
Récupération d’informations sur le site maître à l’installation d’une instance
26 novembre 2010, parUtilité
Sur le site principal, une instance de mutualisation est définie par plusieurs choses : Les données dans la table spip_mutus ; Son logo ; Son auteur principal (id_admin dans la table spip_mutus correspondant à un id_auteur de la table spip_auteurs)qui sera le seul à pouvoir créer définitivement l’instance de mutualisation ;
Il peut donc être tout à fait judicieux de vouloir récupérer certaines de ces informations afin de compléter l’installation d’une instance pour, par exemple : récupérer le (...) -
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 à (...)
Sur d’autres sites (3821)
-
Commit fix to Moz Bugzilla #719612 (along with spec update in previous commit)
20 janvier 2012, par Monty -
crossorigin header in php is not working after previous php exec ffmpeg command
17 avril 2022, par ivyyeziyangI am using php exec function to execute a FFMPEG command, but I am also using Javascript to send the request and they are cross origin requests, but after the exec command, while I start to send next cross origin request, it shows
Access to XMLHttpRequest at 'https://www..com:550/api/adminapi' from origin 'https://www..com:8081' has been blocked by CORS policy : No 'Access-Control-Allow-Origin' header is present on the requested resource.
which means the cross origin header is not working in the next cross origin request after exec command,
below is the code :


if (isset($_POST['crossorigin'])) {
$crossoriginallow = array();
$crossoriginallow = [
'https://www.***.com:8080', 
'https://www.***.com:8081', 
'https://www.***.com:8082'];
for ($i = 0; $i < sizeof($crossoriginallow); $i++) {
if ($crossoriginallow[$i] == $_POST['crossorigin']) {
 $crossorigin = $_POST['crossorigin'];
 break;
 }
}
header("Access-Control-Allow-Origin:$crossorigin");
header("Access-Control-Allow-Methods:GET, POST, OPTIONS, DELETE");
header("Access-Control-Allow-Headers:DNT,X-Mx-ReqToken,Keep- 
Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache- 
Control,Content-Type, Accept-Language, Origin, Accept-Encoding");
}

exec("ffmpeg -i " . $infilepath . " -c:v mpeg4 -preset veryslow - 
 c:a mp3 -q 0 " . $outfilepath /* . " 2>&1" *//* , $out */);

 $infilepathsep = explode('/', $infilepath);
 $folderpath = '';
 for ($i = 0; $i < sizeof($infilepathsep) - 1; $i++) {
 $folderpath = $folderpath . $infilepathsep[$i];
 $folderpath = $folderpath . '/';
}

 $opendirhandle = opendir($folderpath);
 closedir($opendirhandle);
 $openfilehandle = fopen($infilepath, 'r');
 fclose($openfilehandle);
 unlink(iconv("utf-8", "gbk", $infilepath));
 $result['data'] = $outfilepath;
 $result['msg'] = 'success';
 $jsonresult = json_encode($result);
 echo $jsonresult;
 ob_get_contents();
 ob_end_flush();



I does not encounter this problem before using the same code,but after I reinstall the computer it happens, May I please ask the reason if you know the problem ? Thank you very much for your help !


-
ffmpeg : Is there a way to decode a video frame, given the previous frame, motion vectors, and a residual image ?
20 décembre 2018, par aarzchanAssume we are given the following numpy arrays : the BGR video frame for timestep t-1, the motion vectors for timestep t, and the residual image for timestep t. Also, assume the video frame, motion vectors, and residual iamge, come from a video which was compressed using mpeg-4.
Using these inputs, how would we use ffmpeg to decode the BGR video frame for timestep t ?
I tried manually reconstructing the t frame by : (1) creating a reference frame, which is just a copy of the t-1 frame ; (2) performing motion compensation by copying 16x16 pixel blocks from the t-1 frame to the reference frame, based on the motion vectors ; (3) adding the residual image to the motion-compensated reference frame.
However, the resulting predicted t frame doesn’t exactly match the actual t frame, so I feel that this might not be the right way to do it.