Recherche avancée

Médias (91)

Autres articles (89)

  • Gestion des droits de création et d’édition des objets

    8 février 2011, par

    Par défaut, beaucoup de fonctionnalités sont limitées aux administrateurs mais restent configurables indépendamment pour modifier leur statut minimal d’utilisation notamment : la rédaction de contenus sur le site modifiables dans la gestion des templates de formulaires ; l’ajout de notes aux articles ; l’ajout de légendes et d’annotations sur les images ;

  • Contribute to documentation

    13 avril 2011

    Documentation is vital to the development of improved technical capabilities.
    MediaSPIP welcomes documentation by users as well as developers - including : critique of existing features and functions articles contributed by developers, administrators, content producers and editors screenshots to illustrate the above translations of existing documentation into other languages
    To contribute, register to the project users’ mailing (...)

  • Submit bugs and patches

    13 avril 2011

    Unfortunately a software is never perfect.
    If you think you have found a bug, report it using our ticket system. Please to help us to fix it by providing the following information : the browser you are using, including the exact version as precise an explanation as possible of the problem if possible, the steps taken resulting in the problem a link to the site / page in question
    If you think you have solved the bug, fill in a ticket and attach to it a corrective patch.
    You may also (...)

Sur d’autres sites (4638)

  • Debayer video with ffmpeg

    23 février 2023, par Andrew Spence

    Looking to debayer video with ffmpeg. I can't find a way to do it without piping raw video between two instances of ffmpeg, because I can't change the pixel format of my input video "in place" from gray to bayer_gbrg8. So, this command works :

    


    ffmpeg -i fr_losslessmovie_png_codec.avi -f image2pipe -pix_fmt gray \
-vcodec rawvideo - | ffmpeg -r 25 -f rawvideo -s 2048x700 \
-pix_fmt bayer_gbrg8 -i pipe:0 -y -pix_fmt yuv420p -b:v 25000k \
fr_debayer_compressed.mp4


    


    I would have given the source movie this pixel format, but didn't realize ffmpeg suported bayered pixel formatting.

    


    Didn't see this exact question online, and have not found a way to change the pixel format with video filters etc. without ffmpeg thinking i'm trying to convert the data. I just want to change the pixel format that the already existing gray data has been assigned.

    


    Thanks in advance !

    


  • C# ffmpeg how to read input from stream

    28 novembre 2022, par thiago kaique

    I'm trying to read use the pipe feature of ffmpeg to not have to write files in the disk.

    


    my inputs implementations are :

    


    public FFMPEG input(string path)
{
    parameters.Add($"-i {path}");
    return this;
}
public FFMPEG input(byte[] file)
{
    parameters.Add("-i pipe:.mp4");
    files.Add(file);
    return this;
}


    


    my output implementation is :

    


    public FFMPEG output(string format)
{
    _output = $"-f {format} -";
    return this;
}


    


    my run implementation is :

    


    public byte[] run()
{
    if (_output == "")
    {
        throw new Exception("missing output format");
    }

    var process = new Process()
    {
        StartInfo =
        {
            FileName = @"ffmpeg.exe",
            Arguments = String.Join(" ", parameters) + " " + _output,
            RedirectStandardOutput = true,
            RedirectStandardInput = true,
            UseShellExecute = false,
        }
    };

    process.Start();

    foreach (var item in files)
    {
        process.StandardInput.BaseStream.Write(item);
    }

    byte[] result;
    using(var memstream = new MemoryStream())
    {
        process.StandardOutput.BaseStream.CopyTo(memstream);
        result = memstream.ToArray();
    }
    process.WaitForExit();

    return result;
}


    


    which works perfectly if I use a file as input :

    


    var result = new FFMPEG()
.input("./assets/video.mp4")
.output("avi")
.run();


    


    but when I try to use bytes input :

    


    var result = new FFMPEG()
    .input(File.ReadAllBytes("./assets/video.mp4"))
    .output("avi")
    .run();


    


    I get the following error :

    


    [mov,mp4,m4a,3gp,3g2,mj2 @ 00000137385a10c0] stream 1, offset 0x30: partial file
Error demuxing input file 0: Invalid data found when processing input
pipe:.mp4: Invalid data found when processing input
Cannot determine format of input stream 0:0 after EOF
Error marking filters as finished


    


  • ffmpeg/ffprobe input as buffer stream, get an error always

    13 décembre 2023, par hhk

    


    Code to reproduce

    


    I attached the test.gif file on https://github.com/fluent-ffmpeg/node-fluent-ffmpeg/assets/122068264/e1f3aa31-5386-4dab-a409-9a224e0610fe

    


    
const ffprobeInstaller = require('@ffprobe-installer/ffprobe');
const ffmpeg = require('fluent-ffmpeg');
const { Readable } = require('stream');
const fs = require('fs');


(async () => {

    const buffer = fs.readFileSync('test.gif');
    let readableStream = new Readable();
    readableStream._read = () => { };
    readableStream.push(buffer);
    readableStream.push(null);

    // console.log(ffprobe.path, ffprobe.version);
    ffmpeg.setFfprobePath(ffprobeInstaller.path);
    let metadata = await get_video_meta_data(readableStream);

    async function get_video_meta_data(stream) {
        return new Promise((resolve, reject) => {
            new ffmpeg()
                .input(stream)
                .ffprobe((err, data) => {
                    // console.log(err);
                });
            resolve();
        });
    }
})();





    


    (note : if the problem only happens with some inputs, include a link to such an input file)

    


    Expected results

    


    data should include duration but empty.

    


    Observed results

    


    data is empty and err happens.
Here is error data :

    


    
  libavutil      58.  1.100 / 58.  1.100
  libavcodec     60.  2.100 / 60.  2.100
  libavformat    60.  2.100 / 60.  2.100
  libavdevice    60.  0.100 / 60.  0.100
  libavfilter     9.  1.100 /  9.  1.100
  libswscale      7.  0.100 /  7.  0.100
  libswresample   4.  9.100 /  4.  9.100
  libpostproc    57.  0.100 / 57.  0.100
pipe:0: Input/output error


    


    I only need the metadta for the input gif file. specifically, duration field.