Recherche avancée

Médias (0)

Mot : - Tags -/clipboard

Aucun média correspondant à vos critères n’est disponible sur le site.

Autres articles (112)

  • Personnaliser en ajoutant son logo, sa bannière ou son image de fond

    5 septembre 2013, par

    Certains thèmes prennent en compte trois éléments de personnalisation : l’ajout d’un logo ; l’ajout d’une bannière l’ajout d’une image de fond ;

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

Sur d’autres sites (14984)

  • How to resize an mp4 video and reduce frame rate while keeping quality ?

    1er décembre 2019, par Jules

    I’m trying to resize (keeping quality) and reduce frame rate to 30, I’ve seen various command but I’m having difficulty.

    This seems to resize nicely

    ffmpeg -i final-video.mp4 -aspect 886:1920 -c copy final-resized.mp4

    I’ve also see -r 30 and -filter:v fps=fps=30

    But neither seem to work in-conjunction with the resize command.

    I’ve seen posts like this
    Re-sampling H264 video to reduce frame rate while maintaining high image quality
    But this takes a long time.

  • How to apply 'simple 'opacity to combined(layered) mp4s in FFMPEG

    27 mai 2021, par Cam

    I am not getting the final image results I need when layering together multiple mp4s of the same length and format into a single output MP4. I am using ffmpeg to create a pseudo 'motion blur' effect on animation, and need to layer mp4s together with identical opacities to produce the final video.

    


    I am using a base 'black' MP4 as the first layer for a background, and then adding a series of source mp4s with equal opacity over the top in each pass. Here I am showing a photoshop mockup using their 'normal' blending mode which is exactly the blending effect I am trying to replicate with ffmpeg. I understand that the final composite is less "bright" but that's fine (unless you have any ideas).
photoshop mockup

    


    Instead of looking like the result above, I am getting output where the colors are either all pink, garbled, super dark or generally hugely overbright etc based on trying different blend modes.

    


    Here are the commands I am using :

    


    To create the original (uncompressed ?) 'black' MP4 from a sequence of black pngs :

    


    ffmpeg -start_number 0 -r 24 -f image2 -s 1920x1080 -i black_seq.%04d.png -vcodec libx264 -crf 0 -pix_fmt yuv420p   black_seq.mp4 -y


    


    I then take that "black_seq.mp4" and blend a set of n number of source mp4s over the top with an opacity value. This runs in a loop and the output.mp4 of each pass becomes the input.mp4 of the next pass until it completes. In this example a total of 10 source mp4s assigns their opacity to 0.1 for each pass, and this is a single pass (below). The source mp4s are all very similar in their appearance and color, essentially just the same sequence of animation but offset in time by fractions of a single frame and have been generated from color pngs, using the same code that produced the first black layer (above).

    


    ffmpeg i input.mp4 -i n_layer.mp4 -vcodec libx264 -crf 0 -pix_fmt yuv420p   -filter_complex "blend=all_mode='overlay':all_opacity=0.1" output.mp4 -y


    


    Then finally add some compression to the result as the final "blur.mp4"

    


    ffmpeg -i "output.mp4" -vcodec libx264 -crf 25 -pix_fmt yuv420p "blur.mp4" -y


    


    And yes, this is certainly highly inefficient as an approach, but I am learning. The main issue I am trying to solve is, despite the final blur.mp4 being less "bright", it has colors that are not matching the original animation and instead looks like the animation has been hue shifted somehow.

    


    This image shows a cropped output for comparison (the processed blur is set to zero for clarity)
input and output example pic

    


    I would love some insight.

    


  • make fifo pipe in java(windows), write some data into it, let other process read the pipe

    9 novembre 2017, par vs93

    My objective is to create a named pipe(fifo) in windows(java), write some data(coming from camera) into that and invoke ffmpeg command to make mp4 from that data. But I suspect that it is not opening a fifo pipe, rather it is opening a file. How can I make it open a fifo pipe ?
    Here is the code :

    public void run () {
    String mp4Folder = "C://Users/user_2/Desktop/streamDestination";            // Where the MP4 is to be kept
    VFrame frame = null;
    int actualPipeValLen = 0;
    FileOutputStream requestStream = null;
    long lastProcessedTS = 0;
    final String FIFOPATH = "D://FIFO//";
    final String PIPE_NAME = FIFOPATH + "myfifo";
    final String MKFIFOCOMMAND = "mkfifo -m=rw " + PIPE_NAME;
    final String DELFIFOCOMMAND = "rm -r " + PIPE_NAME;
    String mp4FileName = mp4Folder + File.separator + "1.mp4";
    mp4FileName = mp4FileName.replace("\\", "/");
    long firstTimeStamp = 0;
    try {
       Runtime.getRuntime().exec(MKFIFOCOMMAND);
    } catch (IOException e1) {
       e1.printStackTrace();
    }
    if(firstTimeStamp == 0) {
       firstTimeStamp = frame.getTimestamp();
    }
    if((frame.getTimestamp() - firstTimeStamp) > (15 * 1000)) {
       if(requestStream != null) {
           requestStream.close();
           requestStream = null;
       }
       if(actualPipeValLen > 0) {
           String[] ffmpeg = new String[] {"ffmpeg", "-i", PIPE_NAME , "-vcodec", "copy", mp4FileName };
           Process ffmpegProcess = Runtime.getRuntime().exec(ffmpeg);
           actualPipeValLen = 0;
           firstTimeStamp = lastProcessedTS;
           Thread.sleep(2 * 1000);
           try {
               Runtime.getRuntime().exec(DELFIFOCOMMAND);
           } catch (IOException e1) {
               e1.printStackTrace();
           }
           System.exit(0);
       }
    } else {
       System.out.println("Writing into pipe : " + actualPipeValLen);
       if(requestStream == null) {
           requestStream = new  FileOutputStream(PIPE_NAME);
       }
       requestStream.write(frame.getFrame());
       actualPipeValLen += frame.getFrame().length;
       lastProcessedTS = frame.getTimestamp();
    }

    }