Recherche avancée

Médias (91)

Autres articles (77)

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

  • Mise à disposition des fichiers

    14 avril 2011, par

    Par défaut, lors de son initialisation, MediaSPIP ne permet pas aux visiteurs de télécharger les fichiers qu’ils soient originaux ou le résultat de leur transformation ou encodage. Il permet uniquement de les visualiser.
    Cependant, il est possible et facile d’autoriser les visiteurs à avoir accès à ces documents et ce sous différentes formes.
    Tout cela se passe dans la page de configuration du squelette. Il vous faut aller dans l’espace d’administration du canal, et choisir dans la navigation (...)

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

  • Golang and ffmpeg realtime streaming input/output

    25 avril 2017, par Anderson Scouto da Silva

    I’m new to Go !

    I’m doing a simple test that is reading the output from ffmpeg and writing to a file.

    I know I can do it in a different way, simply convert, but this is the beginning of a project where I want to later manipulate the bytes read, changing them and then sending them to the output. And the input will be UDP and output will be UDP too, that is, I will get the ffmpeg output I will treat the bytes as I wish to do and then I will throw these bytes as input into another ffmpeg process which output is UDP as well.

    With this simple test the result of the file does not run in VLC, I believe I’m writing the bytes in the output file correctly, but the output file always has 1MB less than the input file.

    I would like some help to elucidate what would be the best way to write this test that I am doing, based on that I can get out of the place. I do not know if it’s exactly wrong, but I have the impression that it is.

    The input file is a video in 4K, h264, I believe the output should be the same, because in this simple test I am simply reading what goes out in the cmd writing in the file.

    Follow the code for analysis :

    package main

    import (
       "os/exec"
       "os"
    )

    func verificaErro(e error) {
       if e != nil {
           panic(e)
       }
    }

    func main() {
       dir, _ := os.Getwd()

       cmdName := "ffmpeg"
       args := []string{
           "-hide_banner",
           "-re",
           "-i",
           dir + "\\teste-4k.mp4",
           "-preset",
           "superfast",
           "-c:v",
           "h264",
           "-crf",
           "0",
           "-c",
           "copy",
           "-f", "rawvideo", "-",
       }
       cmd := exec.Command(cmdName, args...)

       stdout, err := cmd.StdoutPipe()
       verificaErro(err)
       err2 := cmd.Start()
       verificaErro(err2)

       fileOutput := dir + "/out.raw"
       var _, err3 = os.Stat(fileOutput)

       if os.IsNotExist(err3) {
           var file, err = os.Create(fileOutput)
           verificaErro(err)
           defer file.Close()
       }

       f, err4 := os.OpenFile(dir+"/out.raw", os.O_RDWR|os.O_APPEND, 0666)

       verificaErro(err4)

       bytes := make([]byte, 1024)
       for {
           _, err5 := stdout.Read(bytes)
           if err5 != nil {
               continue
           }
           if len(bytes) > 0 {
               _, err6 := f.Write(bytes)
               verificaErro(err6)
           } else {
               break
           }
       }

       f.Close()
    }
  • In method chaining, how to realize response in a JavaScript callback ?

    13 avril 2017, par CHBS

    I write for myself a module on node js, I can not implement the save() function

    module.exports = function(filename, callback){
       this.callback = callback(require(filename));
       return {
           save: function() {
               console.log(this);
               //fs.writeFile(filename, 'Hello Node.js');
           }
       };
    }

    File('file.json', function(data){
       data['blablabla'] = 12345;
    }).save();

    How from a callback, to transfer the changed copy of a file in save (), and there already to save it through fs ?
    I’m interested in the implementation of the fluent-ffmpeg function save ()

    ffmpeg('/path/to/file.avi')
    .videoCodec('libx264')
    .audioCodec('libmp3lame')
    .size('320x240')
    .on('error', function(err) {
      console.log('An error occurred: ' + err.message);
    })
    .on('end', function() {
      console.log('Processing finished !');
    })
    .save('/path/to/output.mp4');

    And as well as implemented on() ?

    on('end'),  
    on('error'),  
    on('response'),

    I will be grateful for the information provided.

  • Can the outputFile of MediaRecorder be a named pipe ?

    13 avril 2017, par Harrison

    Following
    Android Camera Capture using FFmpeg
    and
    feed raw yuv frame to ffmpeg with timestamp

    I successfully put raw frames of Android phone camera into a named pipe made by mkfifo, and used ffmpeg to process them and generated a video file.

    But the problem is that by ffmpeg, the encoding is very slow, it can only process 3 5 frames per second. The reason I have to use ffmpeg instead of MediaRecorder is that later I need to use ffmpeg to generate HLS segments and m3u8 file.

    So I have to turn to use native encoder like MediaRecorder and try to set its OutputFile to a named pipe following
    How to use unix pipes in Android

    My code likes this,

    private String pipe = "/data/data/com.example/v_pipe1";
    ...
    mMediaRecorder.setOutputFile(pipe);
    ...
    mMediaRecorder.start();

    Also I have a ffmpeg thread to use this pipe as the input.

    But when I call mMediaRecorder.start() ; It will throw java.lang.IllegalStateException. I’ve tried to put ffmpeg thread before or after calling mMediaRecorder.start(), but with the same error.

    I have no idea about this now. Could someone tell me how to solve this ?
    Any suggestions are welcome and appreciated. Thanks.