Recherche avancée

Médias (1)

Mot : - Tags -/epub

Autres articles (63)

  • Demande de création d’un canal

    12 mars 2010, par

    En fonction de la configuration de la plateforme, l’utilisateur peu avoir à sa disposition deux méthodes différentes de demande de création de canal. La première est au moment de son inscription, la seconde, après son inscription en remplissant un formulaire de demande.
    Les deux manières demandent les mêmes choses fonctionnent à peu près de la même manière, le futur utilisateur doit remplir une série de champ de formulaire permettant tout d’abord aux administrateurs d’avoir des informations quant à (...)

  • MediaSPIP v0.2

    21 juin 2013, par

    MediaSPIP 0.2 est la première version de MediaSPIP stable.
    Sa date de sortie officielle est le 21 juin 2013 et est annoncée ici.
    Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
    Comme pour la version précédente, il est nécessaire d’installer manuellement l’ensemble des dépendances logicielles sur le serveur.
    Si vous souhaitez utiliser cette archive pour une installation en mode ferme, il vous faudra également procéder à d’autres modifications (...)

  • MediaSPIP version 0.1 Beta

    16 avril 2011, par

    MediaSPIP 0.1 beta est la première version de MediaSPIP décrétée comme "utilisable".
    Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
    Pour avoir une installation fonctionnelle, il est nécessaire d’installer manuellement l’ensemble des dépendances logicielles sur le serveur.
    Si vous souhaitez utiliser cette archive pour une installation en mode ferme, il vous faudra également procéder à d’autres modifications (...)

Sur d’autres sites (14018)

  • How to stop perl buffering ffmpeg output

    4 février 2017, par Sebastian King

    I am trying to have a Perl program process the output of an ffmpeg encode, however my test program only seems to receive the output of ffmpeg in periodic chunks, thus I am assuming there is some sort of buffering going on. How can I make it process it in real-time ?

    My test program (the tr command is there because I thought maybe ffmpeg’s carriage returns were causing perl to see one big long line or something) :

    #!/usr/bin/perl

    $i = "test.mkv"; # big file, long encode time
    $o = "test.mp4";

    open(F, "-|", "ffmpeg -y -i '$i' '$o' 2>&1 | tr '\r' '\n'")
           or die "oh no";

    while(<f>) {
           print "A12345: $_"; # some random text so i know the output was processed in perl
    }
    </f>

    Everything works fine when I replace the ffmpeg command with this script :

    #!/bin/bash

    echo "hello";

    for i in `seq 1 10`; do
           sleep 1;
           echo "hello $i";
    done

    echo "bye";

    When using the above script I see the output each second as it happens. With ffmpeg it is some 5-10 seconds or so until it outputs and will output sometimes 100 lines each output.

    I have tried using the program unbuffer ahead of ffmpeg in the command call but it seems to have no effect. Is it perhaps the 2>&amp;1 that might be buffering ?
    Any help is much appreciated.

    If you are unfamiliar with ffmpeg’s output, it outputs a bunch of file information and stuff to STDOUT and then during encoding it outputs lines like

    frame=  332 fps= 93 q=28.0 size=     528kB time=00:00:13.33 bitrate= 324.2kbits/s speed=3.75x

    which begin with carriage returns instead of new lines (hence tr) on STDERR (hence 2>&amp;1).

  • ffmpeg : Generate empty audio and video (working for video)

    17 septembre 2021, par David Ferris

    I'm trying to generate a black video with FFMPEG. I have accomplished this with the following :

    &#xA;

    ffmpeg -t 5 -f lavfi -i color=c=black:s=1920x1080 -c:v libx264 -tune stillimage -pix_fmt yuv420p out.mp4&#xA;

    &#xA;

    Unfortunately this video doesn't have any audio tracks. Following this, I have tried to insert -i anullsrc=channel_layout=stereo:sample_rate=44100 :

    &#xA;

    ffmpeg -t 5 -i anullsrc=channel_layout=stereo:sample_rate=44100 -f lavfi -i color=c=black:s=1920x1080 -c:v libx264 -tune stillimage -pix_fmt yuv420p out.mp4&#xA;

    &#xA;

    Unfortunately this gives the error :

    &#xA;

    &#xA;

    anullsrc=channel_layout=stereo:sample_rate=44100 : No such file or&#xA;directory

    &#xA;

    &#xA;

    How can I modify my initial script to generate a video with empty audio ?

    &#xA;

  • Video player scroll doesn't work after ffmpeg audio and video merge (NodeJS)

    1er novembre 2022, par Pietro Leto

    I made youtube downloader to download video from youtube using nodejs library ytdl-core. If I wanted to download video with best quality I had to download them without sound. So, in my script, I download audio and video separately and I merge them into an mp4 file.&#xA;What's the problem ? Video player scroll doesn't work. I can see the video but I can't going back or move on, and I can't see video duration.

    &#xA;

    const express = require("express");&#xA;const cors = require("cors");&#xA;const app = express();&#xA;const ffmpeg = require(&#x27;ffmpeg-static&#x27;);&#xA;const cp = require(&#x27;child_process&#x27;);&#xA;const ytdl = require("ytdl-core");&#xA;&#xA;app.use(cors());&#xA;&#xA;app.listen(3000, () => {&#xA;    console.log("Server is working at port 3000 !!");&#xA;});&#xA;&#xA;app.get(&#x27;/download&#x27;, (req,res) => {&#xA;    var url = req.query.URL;&#xA;    var formato = req.query.FORMAT;&#xA;&#xA;    try {&#xA;        let vid = ytdl(url,{filter:&#x27;videoonly&#x27;, quality:&#x27;highestvideo&#x27;})&#xA;        let aud = ytdl(url, {filter: &#x27;audioonly&#x27;, quality:&#x27;highestaudio&#x27;});&#xA;&#xA;        ytdl.getInfo(url).then(info => {&#xA;            titolo = info.videoDetails.title;&#xA;&#xA;            res.header("Content-Disposition", &#x27;attachment;  filename=&#x27; &#x2B; titolo &#x2B; &#x27;.mp4&#x27;);&#xA;&#xA;            const ffmpegProcess = cp.spawn(ffmpeg, [&#xA;                &#x27;-i&#x27;, `pipe:3`,&#xA;                &#x27;-i&#x27;, `pipe:4`,&#xA;                &#x27;-map&#x27;,&#x27;0:v:0&#x27;,&#xA;                &#x27;-map&#x27;,&#x27;1:a:0&#x27;,&#xA;                &#x27;-c:v&#x27;, &#x27;copy&#x27;,&#xA;                &#x27;-c:a&#x27;, &#x27;aac&#x27;,&#xA;                &#x27;-crf&#x27;,&#x27;27&#x27;,&#xA;                &#x27;-preset&#x27;,&#x27;veryfast&#x27;,&#xA;                &#x27;-movflags&#x27;,&#x27;frag_keyframe&#x2B;empty_moov&#x27;,&#xA;                &#x27;-f&#x27;,&#x27;mp4&#x27;,&#xA;                &#x27;-loglevel&#x27;,&#x27;error&#x27;,&#xA;                &#x27;-&#x27;&#xA;            ], {&#xA;                stdio: [&#xA;                &#x27;pipe&#x27;, &#x27;pipe&#x27;, &#x27;pipe&#x27;, &#x27;pipe&#x27;, &#x27;pipe&#x27;,&#xA;                ],&#xA;            });&#xA;              &#xA;            aud.pipe(ffmpegProcess.stdio[4]);&#xA;            vid.pipe(ffmpegProcess.stdio[3]);&#xA;            ffmpegProcess.stdio[1].pipe(res);&#xA;        });&#xA;    }&#xA;    catch(err) {&#xA;        console.log("Error with URL: " &#x2B; url &#x2B; "\nERROR: " &#x2B; err &#x2B; "\n\n");&#xA;    }&#xA;});&#xA;

    &#xA;

    I have not found alternatives to do this. I need a working script to download youtube videos with good quality.

    &#xA;