Recherche avancée

Médias (3)

Mot : - Tags -/collection

Autres articles (56)

  • Personnaliser en ajoutant son logo, sa bannière ou son image de fond

    5 septembre 2013, par

    Certains thèmes prennent en compte trois éléments de personnalisation : l’ajout d’un logo ; l’ajout d’une bannière l’ajout d’une image de fond ;

  • Publier sur MédiaSpip

    13 juin 2013

    Puis-je poster des contenus à partir d’une tablette Ipad ?
    Oui, si votre Médiaspip installé est à la version 0.2 ou supérieure. Contacter au besoin l’administrateur de votre MédiaSpip pour le savoir

  • Contribute to translation

    13 avril 2011

    You can help us to improve the language used in the software interface to make MediaSPIP more accessible and user-friendly. You can also translate the interface into any language that allows it to spread to new linguistic communities.
    To do this, we use the translation interface of SPIP where the all the language modules of MediaSPIP are available. Just subscribe to the mailing list and request further informantion on translation.
    MediaSPIP is currently available in French and English (...)

Sur d’autres sites (5620)

  • 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 :

    


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


    


    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 ?

    


    Code Here :

    


    require("dotenv").config();
const axios = require("axios");
const concat = require("ffmpeg-concat");
const fluent = require("fluent-ffmpeg");
const fs = require("fs");

const PEXELS_API_KEY = process.env.PEXELS_API_KEY;

const SUBTOPIC = "animals";

const URLBase = `https://api.pexels.com/videos/search?query=${SUBTOPIC}&per_page=80&size=medium&orientation=landscape`;
let rVideos;
let videosToConcat = [];
let duration = 0;
let current = 0;

const fetchVideos = async () => {
  const response = await axios.get(URLBase, {
    headers: {
      Authorization: PEXELS_API_KEY,
    },
  });

  return response.data.videos;
};

const writeVideoToDisc = async (videoObj) => {
  let found = false;
  videoObj.forEach(async (file, index) => {
    if (
      found === false &&
      file.quality === "hd" &&
      file.width === 1920 &&
      file.height === 1080 &&
      file.file_type === "video/mp4"
    ) {
      found = true;
      let writer = fs.createWriteStream("raw/" + current + ".mp4");
      let streamResponse = await axios({
        url: rVideos[current].video_files[index].link,
        method: "get",
        responseType: "stream",
      });
      streamResponse.data.pipe(writer);
      writer.on("finish", () => {
        console.log(`Download Done: ${current}`);
        fluent.ffprobe(`./raw/${current}.mp4`, (err, metadata) => {
          if (err) {
            console.error(err);
          } else {
            if (
              metadata.streams[0].width !== 1920 ||
              metadata.streams[0].height !== 1080
            ) {
              fs.unlink(`./raw/${current}.mp4`, (err) => {
                if (err) throw err;
                console.log("File deleted!");
              });
            } else {
              duration += rVideos[current].duration;
              videosToConcat.push(`./raw/${current}.mp4`);
              fs.appendFile(
                `./attribution/${SUBTOPIC}.txt`,
                `Owner: ${rVideos[current].user.name}; Owner URL: ${rVideos[current].user.url} \n`,
                function (err) {
                  if (err) throw err;
                  console.log(
                    `Saved 'Owner: ${rVideos[current].user.name}; Owner URL: ${rVideos[current].user.url}' to ${SUBTOPIC}.txt`
                  );
                  if (duration < 600) {
                    console.log(duration);
                    console.log(current);
                    current++;
                    writeVideoToDisc(rVideos[current].video_files);
                  }
                }
              );
            }
          }
        });
      });
      writer.on("error", () => console.error("Error while dowloading video"));
    }
  });
};

const main = async () => {
  rVideos = await fetchVideos();
  console.log(rVideos.length);
  await writeVideoToDisc(rVideos[current].video_files);
  console.log(videosToConcat);
  // concat videos together
};

main();


    


  • the problem using "yt-dlp —download-sections" [closed]

    15 avril 2024, par talent

    I tried to use "yt-dlp —download-sections" to download specific segment of YouTube video.

    


    But I have confronted some error.

    


    If I use the cammand as followed, it will be ok, and download the whole video successfully.

    


    yt-dlp -P [path] [URL]


    


    But, if I add the "—download-sections" to download specific segment, it seems something wrong.
the command is as followed.

    


    yt-dlp -P [path] --download-sections "*00:08:06-00:08:17" https://www.youtube.com/watch?v=6Vkmb4cUuLs 


    


    the eccor message

    


    Plus, the operation system is Windows. And I have used vpn(proxy).

    


    ffmpeg configuration

    


    I'd be tremendously appreciated if anyone can give me the early response to solve it !!!

    


  • Need to Download Videos From (Ap.lk) This site [closed]

    20 mars 2024, par Seamon

    Getting this error when using the URL with FFmpeg

    


    [https @ 00000191353bfc00] No trailing CRLF found in HTTP header. Adding it
[ in#0 @ 00000191353aa580] Error opening input: Invalid data found when processing input

Error opening input file https://video.ap.lk/stream/ad470e41-5a62-43da-b8ab-6a0e9d0a7316 

Error opening input files: Invalid data found when processing input


    


    This is the regular URL that I use to get the video :

    


    https://video.ap.lk/stream/ad470e41-5a62-43da-b8ab-6a0e9d0a7316

    


    Using this FFmpeg command :

    


    ffmpeg -user_agent "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/121.0.0.0 Safari/537.36 OPR/107.0.0.0" -headers "Cookie: google-analyze=2f506b9c-9387-4727-ab57-821718fedb38; Path=/" -referer "https://ap.lk" -i "https://video.ap.lk/stream/ad470e41-5a62-43da-b8ab-6a0e9d0a7316" -c copy "ad470e41-5a62-43da-b8ab-6a0e9d0a7316.mp4"


    


    What should I do ? Is there anything wrong with URL or what else ?