Recherche avancée

Médias (91)

Autres articles (102)

  • Websites made ​​with MediaSPIP

    2 mai 2011, par

    This page lists some websites based on MediaSPIP.

  • Creating farms of unique websites

    13 avril 2011, par

    MediaSPIP platforms can be installed as a farm, with a single "core" hosted on a dedicated server and used by multiple websites.
    This allows (among other things) : implementation costs to be shared between several different projects / individuals rapid deployment of multiple unique sites creation of groups of like-minded sites, making it possible to browse media in a more controlled and selective environment than the major "open" (...)

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

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

    


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

    


    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.

    


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


    


    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.

    


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


    


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

    


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

    


    @ECHO OFF
SETLOCAL
COLOR 0A
TITLE CONCAT MULTIPLE MP4 FILES

PUSHD "%~dp0"

SET FF="C:\MAB\local64\bin-video\ffmpeg.exe"

:: SET VIDEO NAME WITHOUT EXTENSION (.MP4)
SET IN01=a
SET IN02=b
SET IN03=c
SET COMBINED=FULL

:: CREATE TEMP .TS VIDEOS OF THE FILES YOU WANT TO COMBINE
%FF% -hide_banner -y -i "%IN01%.mp4" -c copy -bsf:v h264_mp4toannexb -f mpegts "%IN01%.ts"
%FF% -hide_banner -y -i "%IN02%.mp4" -c copy -bsf:v h264_mp4toannexb -f mpegts "%IN02%.ts"
%FF% -hide_banner -y -i "%IN03%.mp4" -c copy -bsf:v h264_mp4toannexb -f mpegts "%IN03%.ts"

:: COMBINE TEMP .TS FILES INTO COMBINED .MP4
%FF% -hide_banner -y -i concat:"%IN01%.ts|%IN02%.ts|%IN03%.ts" -c copy -bsf:a aac_adtstoasc "%COMBINED%.mp4"

ECHO.
PAUSE
EXIT


    


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

    


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

    


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


    


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


    


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

    


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

    


    Thanks.

    


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