Recherche avancée

Médias (91)

Autres articles (80)

  • Websites made ​​with MediaSPIP

    2 mai 2011, par

    This page lists some websites based on MediaSPIP.

  • 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

  • Contribute to a better visual interface

    13 avril 2011

    MediaSPIP is based on a system of themes and templates. Templates define the placement of information on the page, and can be adapted to a wide range of uses. Themes define the overall graphic appearance of the site.
    Anyone can submit a new graphic theme or template and make it available to the MediaSPIP community.

Sur d’autres sites (17291)

  • Download a part of youtube video using a powershell script

    26 octobre 2024, par Nguyễn Đức Minh

    I'm writing this Powershell script :

    


    $URL = "https://www.youtube.com/watch?v=KbuwueqEJL0"
$from = 00:06:15
$to = 00:09:17

$cmdOutput = (youtube-dl --get-url $URL) 

ffmpeg -ss $from -to $to -i  -ss $from -to $to -i  output.mkv


    


    This script's purpose is to download a part of a Youtube video. I've set the variable $URL to specify the Youtube URL, while $from and $to is the start and end time of the part I want to download.

    


    $cmdOutput is used to output the stream URL. The output would have two lines : the first one is the URL for the video stream, while the second one is the audio stream URL.

    


    Currently, I don't know how to use the output as a variable and specify the line number of $cmdOutput to put it into the correct stream. I guess and would be replaced by something like $cmdOutput[line 1], and $cmdOutput[line 2], though I know that those are incorrect.

    


    I've consulted this answer, and it is handy for me to write this script. I've also read Boris Lipschitz's answer on how to do the same thing with Python, but his answer does not work.

    


    In that script, the -ss flag inputs the seeking point, and the -t <duration></duration> flag tells FFmpeg to stop encoding after the specified duration. For example, if the start time is 00:02:00 and the duration is 00:03:00, FFmpeg would download from 00:02:00 to 00:05:00, which is not the expected outcome. For some reason, his Python script skips the first 5 seconds of output, even if I replace the -t flag with -to . I've tried to edit his script, but it does not work unless you explicitly specify the time for both video and audio stream, as well as their respective stream URL.

    &#xA;

  • Youtube-dl : Download video with maximum FPS and change FPS using OpenCV

    8 mai 2021, par MmBaguette

    I'm trying to download a YouTube video using YouTube-dl and specifying a maximum FPS. I don't want the lowest FPS, but I also don't want an FPS higher than 30. The code below does not work, but it was my best attempt.

    &#xA;

    ydl_opts = {&#xA;    &#x27;format&#x27;: &#x27;(bestvideo[fps&lt;30]/bestvideo)&#x2B;bestaudio/best&#x27;, # CHANGE FOR VIDEO&#xA;    &#x27;outtmpl&#x27;: "youtube_video.%(ext)s",&#xA;}&#xA;print("Downloading YouTube video.")&#xA;                &#xA;with youtube_dl.YoutubeDL(ydl_opts) as ydl:&#xA;     ydl.download([text])&#xA;

    &#xA;

    If not, can I change the FPS of a video using OpenCV ? I tried using cap.set(cv2.CAP_PROP_FPS) but this doesn't work either.

    &#xA;

    cap = cv2.VideoCapture(file)&#xA;fps = cap.get(cv2.CAP_PROP_FPS)&#xA;print(fps) # prints 60.0&#xA;cap.set(cv2.CAP_PROP_FPS)&#xA;fps = cap.get(cv2.CAP_PROP_FPS)&#xA;print(fps) # 60.0 again&#xA;

    &#xA;

  • Is it possible to download files (MP4) from external server and convert it to MP3 in NodeJS

    19 mai 2021, par GrayGalaxy

    I am currently working on a chrome extension to download songs from JioSaavn.com. In my implementation I use an Vercel instance as a prox. This is a workaround for CORS error in the extension. The server code is shown as below.

    &#xA;

    const axios = require(&#x27;axios&#x27;)&#xA;module.exports = (req, res) => {&#xA;    res.setHeader(&#x27;Access-Control-Allow-Origin&#x27;, &#x27;*&#x27;)&#xA;    res.setHeader(&#x27;Cache-Control&#x27;, &#x27;s-maxage=300, stale-while-revalidate&#x27;)&#xA;    const URL = req.url // requested url&#xA;    // get array buffer&#xA;    if (url === &#x27;/&#x27;) return res.redirect(&#x27;https://github.com/GrayGalaxy/jiosaavn-downloader&#x27;)&#xA;&#xA;    let server_url = `https://snoidcdnems02.cdnsrv.jio.com/c.saavncdn.com/${URL}`&#xA;    axios.get(src_url, { responseType: &#x27;arraybuffer&#x27; })&#xA;        .then(r => r.data)&#xA;        .then(result => res.send(result))&#xA;        .catch(() => {&#xA;            res.status(400).send(&#x27;Cannot access the requested URL&#x27;)&#xA;        })&#xA;    }&#xA;}&#xA;&#xA;

    &#xA;

    This outputs a MP4 file (just with audio). As for example if you put /983/01100b84f61ca8b3a0432f12c564be8e_96.mp4 as the URL parameter it will output as MP4.

    &#xA;

    Now I want to convert that response MP4 to a MP3 file. I tried ffmpeg, fluent-ffmpef and many other implementation. Most of them dose not support ArrayBuffer as an input (I think) it doesn't provide any output as expected. Or it might possible Vercel does not allow file-browser.

    &#xA;

    Please give a solution to that.

    &#xA;