Recherche avancée

Médias (2)

Mot : - Tags -/media

Autres articles (83)

  • Les autorisations surchargées par les plugins

    27 avril 2010, par

    Mediaspip core
    autoriser_auteur_modifier() afin que les visiteurs soient capables de modifier leurs informations sur la page d’auteurs

  • 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 (...)

  • Des sites réalisés avec MediaSPIP

    2 mai 2011, par

    Cette page présente quelques-uns des sites fonctionnant sous MediaSPIP.
    Vous pouvez bien entendu ajouter le votre grâce au formulaire en bas de page.

Sur d’autres sites (9481)

  • Deprecation error when using imageio.ffmpeg.download()

    29 novembre 2022, par SHASHIKUMAR B J

    I'm trying to merge the prerecorded videos using python Opencv.
But i'm getting the error while importing.

    



    "Traceback (most recent call last):&#xA;  File "video.py", line 4, in <module>&#xA;    from moviepy. editor import VideoFileClip,concatenate_videoclips &#xA;  File "/home/pi/.virtualenvs/cv/lib/python3.5/site-packages/moviepy/editor.py", line 26, in <module>&#xA;    imageio.plugins.ffmpeg.download()&#xA;  File "/home/pi/.virtualenvs/cv/lib/python3.5/site-packages/imageio/plugins/ffmpeg.py", line 40, in download&#xA;    "imageio.ffmpeg.download() has been deprecated. "&#xA;RuntimeError: imageio.ffmpeg.download() has been deprecated. Use &#x27;pip install imageio-ffmpeg&#x27; instead.&#x27;"&#xA;</module></module>

    &#xA;&#xA;

    would anyone please help to get out of this problem

    &#xA;&#xA;

    Here is the code :

    &#xA;&#xA;

    import cv2 &#xA;import os &#xA;import time &#xA;from moviepy.editor import VideoFileClip,concatenate_videoclips &#xA;def vidcapt():&#xA;    a = time.strftime("%H,%M,%S")&#xA;    cap = cv2.VideoCapture(0)&#xA;    fourcc = cv2.VideoWriter_fourcc(*&#x27;XVID&#x27;)&#xA;    out = cv2.VideoWriter(a&#x2B;&#x27;.avi&#x27;, fourcc, 24.0, (640,480))&#xA;    t1 = time.time()&#xA;    while(cap.isOpened()):&#xA;            ret, frame = cap.read() &#xA;            if ret == True:&#xA;                    out.write(frame)&#xA;                    cv2.imshow(&#x27;frame&#x27;,frame)&#xA;                    t2 = time.time()&#xA;                    time_diff = t2-t1&#xA;                    if time_diff >= 5:&#xA;                            break&#xA;            else:&#xA;                    break&#xA;    cap.release()&#xA;    out.release()&#xA;    cv2.destroyAllWindows()&#xA;&#xA;while True:&#xA;        vidcapt()&#xA;&#xA;&#xA;clip1 = VideoFileClip("11,05,42.avi")&#xA;clip2 = VideoFileClip("11,05,47.avi").subclip(50,60)&#xA;final_clip = concatenate_videoclips([clip1,clip2])&#xA;final_clip.write_videofile("merged.avi")&#xA;

    &#xA;

  • Is there a way to stream download a mp3 file that is being converted on a nodejs server ?

    19 février 2019, par Thriskel

    I am looking for a way to send the url to the nodejs server and respond the user with the mp3 file download.

    I searched some examples, and read about requests and responses, but I am not sure what the problem really is.

    This is the Javascript for the HTML :

       var downloadBtn = document.querySelector('.download_button');
       var URLinput = document.querySelector('#myUrl');

       downloadBtn.addEventListener('click', () => {
           console.log(`URL: ${URLinput.value}`);
           sendURL(URLinput.value);
       });

       function sendURL(URL) {
           window.location.href = `http://localhost:4000/download?URL=${URL}`;
       }

    This is the Javascript for the Nodejs server :

    const express = require('express');
    const cors = require('cors');
    const ytdl = require('ytdl-core');
    const app = express();
    const ffmpeg = require('fluent-ffmpeg')
    app.use(cors());

    app.listen(4000, () => {
       console.log('Server Works !!! At port 4000');
    });

    app.get('/download', (req,res) => {
    var URL = req.query.URL;

    res.header('Content-Disposition', 'attachment; filename="file.mp3"');
    let stream = ytdl(URL, {
     quality: 'highestaudio',
    }); //HERE THE STREAM FILE IS SELECTED TO BE CONVERTED TO MP3

    ffmpeg(stream)
     .audioBitrate(128)
     .pipe(res); // HERE IS CONVERTED AND WHERE I WANT IT TO SEND IT AS A DOWNLOAD TO THE USER.
    });

    I expected it to stream download the file but instead it gets me to the nodejs server page to /download/url_to_vid

  • How to download m3u8 to mkv in nodejs

    10 février 2019, par Gabgab2003

    Im trying to download an mkv file from an m3u8 stream. I have the m3u8 as url, but can download it to a file if need be. I would like to solve this only with node and node modules.

    I have already tried to use wget lib, but cant get ffmpeg (node library, not the standalone binary) to work with the file.

    if anyone is interested, the url im trying to download is this
    (Im writing a crunchyroll downloader application)