Recherche avancée

Médias (0)

Mot : - Tags -/upload

Aucun média correspondant à vos critères n’est disponible sur le site.

Autres articles (35)

  • Gestion de la ferme

    2 mars 2010, par

    La ferme est gérée dans son ensemble par des "super admins".
    Certains réglages peuvent être fais afin de réguler les besoins des différents canaux.
    Dans un premier temps il utilise le plugin "Gestion de mutualisation"

  • ANNEXE : Les extensions, plugins SPIP des canaux

    11 février 2010, par

    Un plugin est un ajout fonctionnel au noyau principal de SPIP. MediaSPIP consiste en un choix délibéré de plugins existant ou pas auparavant dans la communauté SPIP, qui ont pour certains nécessité soit leur création de A à Z, soit des ajouts de fonctionnalités.
    Les extensions que MediaSPIP nécessite pour fonctionner
    Depuis la version 2.1.0, SPIP permet d’ajouter des plugins dans le répertoire extensions/.
    Les "extensions" ne sont ni plus ni moins que des plugins dont la particularité est qu’ils se (...)

  • Personnaliser les catégories

    21 juin 2013, par

    Formulaire de création d’une catégorie
    Pour ceux qui connaissent bien SPIP, une catégorie peut être assimilée à une rubrique.
    Dans le cas d’un document de type catégorie, les champs proposés par défaut sont : Texte
    On peut modifier ce formulaire dans la partie :
    Administration > Configuration des masques de formulaire.
    Dans le cas d’un document de type média, les champs non affichés par défaut sont : Descriptif rapide
    Par ailleurs, c’est dans cette partie configuration qu’on peut indiquer le (...)

Sur d’autres sites (5110)

  • download and fill file on fly

    4 mai 2017, par Gianluca Calabria

    I’m trying to create a service for a client which takes some audio chunks and concatenate them. For this I’m using FFmpeg. The user should also be able to download the result on the fly without waiting for the conversion/concatenation to finish. The idea is to "fill" the file as the process goes on. I cannot work my way around it, is it possible to do ? I’m using a RESTful service which calls a class like this one

    public ReadableRepresentation serveDownloadRequest(Representation entity) throws SystemInitializationException {
       InputStreamChannel inputStreamChannel;
       Form reqParameters=getQuery();
       try {

           String parameters = readStringParameter(reqParameters, AudioCutAndJoinParameters.PARAMETERS, AudioCutAndJoinParameters.PARAMETERS_MANDATORY);
           trace.debug(this.getClass().getSimpleName() + " parameter " + AudioCutAndJoinParameters.PARAMETERS + "=" + parameters);

           String inputUri = readStringParameter(reqParameters, AudioCutAndJoinParameters.INPUT_URI, AudioCutAndJoinParameters.INPUT_URI_MANDATORY);
           trace.debug(this.getClass().getSimpleName() + " parameter " + AudioCutAndJoinParameters.INPUT_URI + "=" + inputUri);

           String markInRelative = readStringParameter(reqParameters, AudioCutAndJoinParameters.MARKIN_ID_RELATIVE, AudioCutAndJoinParameters.MARKIN_ID_RELATIVE_MANDATORY);
           trace.debug(this.getClass().getSimpleName() + " parameter " + AudioCutAndJoinParameters.MARKIN_ID_RELATIVE + "=" + markInRelative);

           String parametersString = readStringParameter(reqParameters, AudioCutAndJoinParameters.PARAMETERS_STRING, AudioCutAndJoinParameters.PARAMETERS_STRING_MANDATORY);
           trace.debug(this.getClass().getSimpleName() + " parameter " + AudioCutAndJoinParameters.PARAMETERS_STRING + "=" + parametersString);

           String cmdFolder = readStringParameter(reqParameters, AudioCutAndJoinParameters.COMMAND_FOLDER, AudioCutAndJoinParameters.COMMAND_FOLDER_MANDATORY);
           trace.debug(this.getClass().getSimpleName() + " parameter " + AudioCutAndJoinParameters.COMMAND_FOLDER + "=" + cmdFolder);

           Map markInIdRelativeMap=JsonEntityManager.getInstance().deserializeMap(markInRelative);
           Map parametersMap=JsonEntityManager.getInstance().deserializeMap(parameters);
           List <string> InputUri= JsonEntityManager.getInstance().deserializeList(inputUri);

           InputStream transcodeOutput = Services.getInstance().runAudioCutAndJoin(parametersMap,markInIdRelativeMap,InputUri,parametersString,cmdFolder);
           inputStreamChannel = new InputStreamChannel(transcodeOutput);

           ReadableRepresentation result = new ReadableRepresentation(inputStreamChannel, MediaType.AUDIO_ALL);

           Disposition disp = new Disposition(Disposition.TYPE_ATTACHMENT);

           disp.setFilename("test-cut.wav");
           result.setDisposition(disp);

           return result;
    </string>

    I’m using the process.getInputStream() as return of my runAudioCutAndJoin but no download happens until the process of conversion/concatenation is done. Can somebody please help me out ?

  • How to find and download m3u8 file from websites's link like hotstar, voot and sonyliv in php, javascript or nodejs or python [on hold]

    10 juillet 2018, par gaurav pandey

    I’m trying to download the m3u8 file from website’s(Like hotstar, voot etc) video link using php or javascript or nodejs or python.

    Please help.
    Thanks

  • Attempting to use recursion, why does my code only download 4 videos and exit ?

    16 avril 2024, par Andrew Atwood

    I am attempting to download videos from an API that I have access to. This should loop through all of the videos that were returned from the API call, save them to disc, use ffmpeg to verify the meta data from the API (this step is necessary because the API is sometimes returning incorrect information), then save attribution information and continue on if no error. However, my output from the below code is simple this :

    &#xA;

    []&#xA;Download Done: 0&#xA;Saved &#x27;Owner: Anthony �; Owner URL: https://www.pexels.com/@inspiredimages&#x27; to animals.txt     &#xA;13&#xA;0&#xA;Download Done: 1&#xA;Saved &#x27;Owner: PMA; Owner URL: https://www.pexels.com/@pma-1470250&#x27; to animals.txt&#xA;35&#xA;1&#xA;Download Done: 2&#xA;Saved &#x27;Owner: Pressmaster; Owner URL: https://www.pexels.com/@pressmaster&#x27; to animals.txt      &#xA;65&#xA;2&#xA;Download Done: 3&#xA;Saved &#x27;Owner: Ruvim Miksanskiy; Owner URL: https://www.pexels.com/@digitech&#x27; to animals.txt    &#xA;75&#xA;3&#xA;

    &#xA;

    No errors, no exit code. Just stops running. I've walked through the process in my head a few times, and I can't figure out why it only gets called 4 times. Would anyone have any insight as to where I could try troubleshooting ?

    &#xA;

    Code Here :

    &#xA;

    require("dotenv").config();&#xA;const axios = require("axios");&#xA;const concat = require("ffmpeg-concat");&#xA;const fluent = require("fluent-ffmpeg");&#xA;const fs = require("fs");&#xA;&#xA;const PEXELS_API_KEY = process.env.PEXELS_API_KEY;&#xA;&#xA;const SUBTOPIC = "animals";&#xA;&#xA;const URLBase = `https://api.pexels.com/videos/search?query=${SUBTOPIC}&amp;per_page=80&amp;size=medium&amp;orientation=landscape`;&#xA;let rVideos;&#xA;let videosToConcat = [];&#xA;let duration = 0;&#xA;let current = 0;&#xA;&#xA;const fetchVideos = async () => {&#xA;  const response = await axios.get(URLBase, {&#xA;    headers: {&#xA;      Authorization: PEXELS_API_KEY,&#xA;    },&#xA;  });&#xA;&#xA;  return response.data.videos;&#xA;};&#xA;&#xA;const writeVideoToDisc = async (videoObj) => {&#xA;  let found = false;&#xA;  videoObj.forEach(async (file, index) => {&#xA;    if (&#xA;      found === false &amp;&amp;&#xA;      file.quality === "hd" &amp;&amp;&#xA;      file.width === 1920 &amp;&amp;&#xA;      file.height === 1080 &amp;&amp;&#xA;      file.file_type === "video/mp4"&#xA;    ) {&#xA;      found = true;&#xA;      let writer = fs.createWriteStream("raw/" &#x2B; current &#x2B; ".mp4");&#xA;      let streamResponse = await axios({&#xA;        url: rVideos[current].video_files[index].link,&#xA;        method: "get",&#xA;        responseType: "stream",&#xA;      });&#xA;      streamResponse.data.pipe(writer);&#xA;      writer.on("finish", () => {&#xA;        console.log(`Download Done: ${current}`);&#xA;        fluent.ffprobe(`./raw/${current}.mp4`, (err, metadata) => {&#xA;          if (err) {&#xA;            console.error(err);&#xA;          } else {&#xA;            if (&#xA;              metadata.streams[0].width !== 1920 ||&#xA;              metadata.streams[0].height !== 1080&#xA;            ) {&#xA;              fs.unlink(`./raw/${current}.mp4`, (err) => {&#xA;                if (err) throw err;&#xA;                console.log("File deleted!");&#xA;              });&#xA;            } else {&#xA;              duration &#x2B;= rVideos[current].duration;&#xA;              videosToConcat.push(`./raw/${current}.mp4`);&#xA;              fs.appendFile(&#xA;                `./attribution/${SUBTOPIC}.txt`,&#xA;                `Owner: ${rVideos[current].user.name}; Owner URL: ${rVideos[current].user.url} \n`,&#xA;                function (err) {&#xA;                  if (err) throw err;&#xA;                  console.log(&#xA;                    `Saved &#x27;Owner: ${rVideos[current].user.name}; Owner URL: ${rVideos[current].user.url}&#x27; to ${SUBTOPIC}.txt`&#xA;                  );&#xA;                  if (duration &lt; 600) {&#xA;                    console.log(duration);&#xA;                    console.log(current);&#xA;                    current&#x2B;&#x2B;;&#xA;                    writeVideoToDisc(rVideos[current].video_files);&#xA;                  }&#xA;                }&#xA;              );&#xA;            }&#xA;          }&#xA;        });&#xA;      });&#xA;      writer.on("error", () => console.error("Error while dowloading video"));&#xA;    }&#xA;  });&#xA;};&#xA;&#xA;const main = async () => {&#xA;  rVideos = await fetchVideos();&#xA;  console.log(rVideos.length);&#xA;  await writeVideoToDisc(rVideos[current].video_files);&#xA;  console.log(videosToConcat);&#xA;  // concat videos together&#xA;};&#xA;&#xA;main();&#xA;

    &#xA;