
Recherche avancée
Médias (1)
-
Revolution of Open-source and film making towards open film making
6 octobre 2011, par
Mis à jour : Juillet 2013
Langue : English
Type : Texte
Autres articles (81)
-
Websites made with MediaSPIP
2 mai 2011, parThis page lists some websites based on MediaSPIP.
-
Amélioration de la version de base
13 septembre 2013Jolie sélection multiple
Le plugin Chosen permet d’améliorer l’ergonomie des champs de sélection multiple. Voir les deux images suivantes pour comparer.
Il suffit pour cela d’activer le plugin Chosen (Configuration générale du site > Gestion des plugins), puis de configurer le plugin (Les squelettes > Chosen) en activant l’utilisation de Chosen dans le site public et en spécifiant les éléments de formulaires à améliorer, par exemple select[multiple] pour les listes à sélection multiple (...) -
Creating farms of unique websites
13 avril 2011, parMediaSPIP platforms can be installed as a farm, with a single "core" hosted on a dedicated server and used by multiple websites.
This allows (among other things) : implementation costs to be shared between several different projects / individuals rapid deployment of multiple unique sites creation of groups of like-minded sites, making it possible to browse media in a more controlled and selective environment than the major "open" (...)
Sur d’autres sites (15394)
-
use BytesIO into python-ffmpeg or other
3 mai 2022, par Tlaloc-ESHello I have the following poc to develop


Given two S3 paths, origin and destination, I need to download from origin apply a conversion and upload to destination.


The idea is not to use a temporary local folder and use stream data ur another better option if you know.


In order to do this I have the following code :


import ffmpeg
import boto3
from io import BytesIO

origin = 'ah/a.mkv'
destination = 'av/a.mp4'

s3_client = boto3.client('s3')

f = BytesIO()
s3_client.download_fileobj('bucket', origin, f)

stream = ffmpeg.input(f)
stream = ffmpeg.output(stream, 'a.mp4', codec='copy')

(stream.run())



The problem is that


Input doesn' this library looks like that this operation is not possible.


https://kkroening.github.io/ffmpeg-python/




TypeError : expected str, bytes or os.PathLike object, not _io.BytesIO




But when another library like


https://github.com/aminyazdanpanah/python-ffmpeg-video-streaming#opening-a-resource


I don't know how do the conversion too.


So do you know any way of do this ?


Thanks


-
Discord audio playing issue
24 avril 2022, par ItsNaif.Explanation


I have this code that plays youtube video audio in voice channels.


When it joins the channel I get an error that says "ffmpeg not found". I ran the terminal command "npm i ffmpeg-static" and it worked fine but after a couple of minutes I get a long error and the music stops playing.


This is my code :


client.on("ready", async () => {

 for (const channelId of Channels) {
 joinChannel(channelId);

 await new Promise(res => setTimeout(()=>res(2), 500))
 }
 
 function joinChannel(channelId) {
 client.channels.fetch(channelId).then(channel => {

 const VoiceConnection = joinVoiceChannel({
 channelId: channel.id,
 guildId: channel.guild.id,
 adapterCreator: channel.guild.voiceAdapterCreator
 });
 const resource = createAudioResource(ytdl("https://youtu.be/0J2gdL87fVs", {
 filter: "audioonly"
 }), {
 inlineVolume: true
 });
 resource.volume.setVolume(0.2);
 const player = createAudioPlayer()
 VoiceConnection.subscribe(player);
 player.play(resource);
 player.on("idle", () => {
 try {
 player.stop()
 }catch (e) {}
 try {
 VoiceConnection.destory()
 }catch (e) {}
 joinChannel(channelId)
 })
 }).catch(console.error)
 }
})



-
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 !