Recherche avancée

Médias (1)

Mot : - Tags -/remix

Autres articles (70)

  • Les tâches Cron régulières de la ferme

    1er décembre 2010, par

    La gestion de la ferme passe par l’exécution à intervalle régulier de plusieurs tâches répétitives dites Cron.
    Le super Cron (gestion_mutu_super_cron)
    Cette tâche, planifiée chaque minute, a pour simple effet d’appeler le Cron de l’ensemble des instances de la mutualisation régulièrement. Couplée avec un Cron système sur le site central de la mutualisation, cela permet de simplement générer des visites régulières sur les différents sites et éviter que les tâches des sites peu visités soient trop (...)

  • Mediabox : ouvrir les images dans l’espace maximal pour l’utilisateur

    8 février 2011, par

    La visualisation des images est restreinte par la largeur accordée par le design du site (dépendant du thème utilisé). Elles sont donc visibles sous un format réduit. Afin de profiter de l’ensemble de la place disponible sur l’écran de l’utilisateur, il est possible d’ajouter une fonctionnalité d’affichage de l’image dans une boite multimedia apparaissant au dessus du reste du contenu.
    Pour ce faire il est nécessaire d’installer le plugin "Mediabox".
    Configuration de la boite multimédia
    Dès (...)

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

  • How can I pipe output of ffmpeg to ffplay in java ?

    30 septembre 2020, par guidop21

    currently i have created a java project that allows me to use ffmpeg to split a live video coming from a webcam and fragment it into many 60 second video clips.
These are the main methods :

    


        @Override
public boolean startRecording(String fileName, Integer clipPrefix, String folderClipName) {
    final String methodName = "startRecording(fileName, folderClipPath)";
    this.startLog(methodName, fileName, folderClipName);
    try {
        File folder = new File(folderClipName + System.getProperty("file.separator") +fileName);
        if( !folder.exists() ) {
            folder.mkdir();
        }
    }catch(Exception e) {
        e.printStackTrace();
    }
    String fileNameFull = buildFileName(fileName, clipPrefix);
    String[] cmd = buildCommandArray(fileNameFull);
    logger.debug("{} - executing FfmpegStartRecordingCommand with cmd:{}", methodName, Arrays.toString(cmd));
    Process p = new FfmpegStartRecordingCommand().execute(cmd);
    try {
        Thread.sleep(1000);
    } catch (InterruptedException e) {
        // TODO Auto-generated catch block
        e.printStackTrace();
    }
    return p.isAlive();
}

public String[] buildCommandArray(String fileNameFull) {
    String cmd[] = new String[37];
    cmd[0] = "-f";
    cmd[1] = "dshow";
    cmd[2] = "-rtbufsize";
    cmd[3] = "2000M";
    cmd[4] = "-i";
    cmd[5] = cameraName;
    cmd[6] = "-preset";
    cmd[7] = "slow";
    cmd[8] = "-codec:a";
    cmd[9] = "libfdk_aac";
    cmd[10] = "-b:a";
    cmd[11] = "128k";
    cmd[12] = "-codec:v";
    cmd[13] = "libx264";
    cmd[14] = "-pix_fmt";
    cmd[15] = "yuv420p";
    cmd[16] = "-b:v";
    cmd[17] = "1000k";
    cmd[18] = "-minrate";
    cmd[19] = "500k";
    cmd[20] = "-maxrate";
    cmd[21] = "2000k";
    cmd[22] = "-bufsize";
    cmd[23] = "2000k";
    cmd[24] = "-vf";
    cmd[25] = "scale=854:480";
    cmd[26] = "-f";
    cmd[27] = "segment";
    cmd[28] = "-segment_time";
    cmd[29] = "60";
    cmd[30] = "-reset_timestamps";
    cmd[31] = "1";
    cmd[32] = "-flush_packets";
    cmd[33] = "1";
    cmd[34] = "-loglevel";
    cmd[35] = "quiet";
    cmd[36] = fileNameFull;
    return cmd;
}


    


    To these I wish I could use a method that allows me to use ffplay at the same time in order to see what I am acquiring ?
On the internet I found the following command

    


    ffmpeg -i <video> out.mp4 | ffplay -i video&#xA;</video>

    &#xA;

    but i don't know how to implement it in java.&#xA;Some idea ??&#xA;Thanks in advance

    &#xA;

  • Not able to pipe gstreamer output into ffmpeg

    13 janvier, par Henry Soang

    has anybody gotten gstreamer to successfully pipe it's video output into ffmpeg ?

    &#xA;

    I've tried playing with /dev/stdout and I keep getting errors :

    &#xA;

    gst-launch -e v4l2src device=/dev/video0 \&#xA;! &#x27;video/x-raw-yuv,width=1920,height=1080,framerate=5/1&#x27;  \&#xA;! nv_omx_h264enc quality-level=2 ! mp4mux \&#xA;! filesink location=/dev/stdout \&#xA; | ffmpeg -y -i - -codec copy   -f flv test.flv&#xA;

    &#xA;

    ...&#xA;[aac @ 0xebc4c0] Could not find codec parameters for stream 0 (Audio: aac (Main), 7.1, fltp, 1351 kb/s): unspecified sample rate&#xA;Consider increasing the value for the &#x27;analyzeduration&#x27; and &#x27;probesize&#x27; options&#xA;pipe:: could not find codec parameters&#xA;Input #0, aac, from &#x27;pipe:&#x27;:&#xA;  Duration: N/A, bitrate: 1351 kb/s&#xA;    Stream #0:0: Audio: aac (Main), 7.1, fltp, 1351 kb/s&#xA;[flv @ 0xec9280] sample rate not set&#xA;Output #0, flv, to &#x27;test.flv&#x27;:&#xA;    Stream #0:0: Audio: aac, 7.1, 1351 kb/s&#xA;Stream mapping:&#xA;  Stream #0:0 -> #0:0 (copy)&#xA;Could not write header for output file #0 (incorrect codec parameters ?): Invalid argument&#xA;

    &#xA;

    Running the commands separately (replacing /dev/stdout with a file) works fine.

    &#xA;

    If you got it to work and can share how you did it, that would be great.

    &#xA;

    Thanks.

    &#xA;

  • Batch Script + FFmpeg — Use FOR loop to pipe AND concat all files found except last file

    11 octobre 2020, par slyfox1186

    Im trying to convert all '.mp4' files in a folder into '.ts' files so I can use FFmpeg.exe to combine them all into one long '.mp4' video.

    &#xA;

    I have to use the concat command to combine the .ts files when using ffmpeg.

    &#xA;

    Below is a working line of code to do this the long way.... I want to use a for loop in case I have way more than just 3 files to combine.

    &#xA;

    ffmpeg.exe -hide_banner -y -i concat:"a.ts|b.ts|c.ts" -c copy -bsf:a aac_adtstoasc "COMBINED.mp4"&#xA;

    &#xA;

    I can make this loop work by using the below for command but the last file found can not have a pipe after it | like c.ts" above didn't.

    &#xA;

        FOR /F "USEBACKQ TOKENS=* DELIMS= ,|" %%I IN (&#x27;%%~dpnG.ts&#x27;) DO (&#xA;    SET FNAME=%%~dpnI&#xA;    ECHO.&#xA;    ECHO !FNAME!&#xA;    PAUSE>NUL&#xA;    EXIT&#xA;)&#xA;

    &#xA;

    Does anyone know if it's even possible (maybe with tokens) to do this in a batch file ? If not any suggestions ? PowerShell ?

    &#xA;

    In response to Compo's question here is my working script :

    &#xA;

    @ECHO OFF&#xA;SETLOCAL&#xA;COLOR 0A&#xA;TITLE CONCAT MULTIPLE MP4 FILES&#xA;&#xA;PUSHD "%~dp0"&#xA;&#xA;SET FF="C:\MAB\local64\bin-video\ffmpeg.exe"&#xA;&#xA;:: SET VIDEO NAME WITHOUT EXTENSION (.MP4)&#xA;SET IN01=a&#xA;SET IN02=b&#xA;SET IN03=c&#xA;SET COMBINED=FULL&#xA;&#xA;:: CREATE TEMP .TS VIDEOS OF THE FILES YOU WANT TO COMBINE&#xA;%FF% -hide_banner -y -i "%IN01%.mp4" -c copy -bsf:v h264_mp4toannexb -f mpegts "%IN01%.ts"&#xA;%FF% -hide_banner -y -i "%IN02%.mp4" -c copy -bsf:v h264_mp4toannexb -f mpegts "%IN02%.ts"&#xA;%FF% -hide_banner -y -i "%IN03%.mp4" -c copy -bsf:v h264_mp4toannexb -f mpegts "%IN03%.ts"&#xA;&#xA;:: COMBINE TEMP .TS FILES INTO COMBINED .MP4&#xA;%FF% -hide_banner -y -i concat:"%IN01%.ts|%IN02%.ts|%IN03%.ts" -c copy -bsf:a aac_adtstoasc "%COMBINED%.mp4"&#xA;&#xA;ECHO.&#xA;PAUSE&#xA;EXIT&#xA;

    &#xA;