Recherche avancée

Médias (1)

Mot : - Tags -/pirate bay

Autres articles (37)

  • XMP PHP

    13 mai 2011, par

    Dixit Wikipedia, XMP signifie :
    Extensible Metadata Platform ou XMP est un format de métadonnées basé sur XML utilisé dans les applications PDF, de photographie et de graphisme. Il a été lancé par Adobe Systems en avril 2001 en étant intégré à la version 5.0 d’Adobe Acrobat.
    Étant basé sur XML, il gère un ensemble de tags dynamiques pour l’utilisation dans le cadre du Web sémantique.
    XMP permet d’enregistrer sous forme d’un document XML des informations relatives à un fichier : titre, auteur, historique (...)

  • Websites made ​​with MediaSPIP

    2 mai 2011, par

    This page lists some websites based on MediaSPIP.

  • ANNEXE : Les extensions, plugins SPIP des canaux

    11 février 2010, par

    Un plugin est un ajout fonctionnel au noyau principal de SPIP. MediaSPIP consiste en un choix délibéré de plugins existant ou pas auparavant dans la communauté SPIP, qui ont pour certains nécessité soit leur création de A à Z, soit des ajouts de fonctionnalités.
    Les extensions que MediaSPIP nécessite pour fonctionner
    Depuis la version 2.1.0, SPIP permet d’ajouter des plugins dans le répertoire extensions/.
    Les "extensions" ne sont ni plus ni moins que des plugins dont la particularité est qu’ils se (...)

Sur d’autres sites (5052)

  • An efficient way to use Windows Named Pipe for IPC

    26 juillet 2020, par Ehsan5

    I am using jna module to connect two processes that both perform FFMPEG commands. Send SDTOUT of FFMPEG command on the server side to NampedPipe and receive STDIN from that NampedPipe for other FFMPEG command on the Client side.

    


    this is how I capture STDOUT and send into the pipe in server Side :

    


    InputStream out = inputProcess.getInputStream();
byte[] buffer = new byte[maxBufferSize];
while (inputProcess.isAlive()) {
     int no = out.available();
     if (no > 0 && no > maxBufferSize) {
        int n = out.read(buffer, 0,maxBufferSize);
        IntByReference lpNumberOfBytesWritten = new IntByReference(maxBufferSize);
        Kernel32.INSTANCE.WriteFile(pipe, buffer, buffer.length, lpNumberOfBytesWritten, null);
     }
}


    


    And this is how I capture STDIN and feed it to the Client Side :

    


    OutputStream in = outputProcess.getOutputStream();
while (pipeOpenValue >= 1 && outputProcess.isAlive() && ServerIdState) {
      // read from pipe
      resp = Kernel32.INSTANCE.ReadFile(handle, readBuffer,readBuffer.length, lpNumberOfBytesRead, null);
      // Write to StdIn inputProcess
      if (outputProcess != null) {
          in.write(readBuffer);
          in.flush();
      }
      // check pipe status
      Kernel32.INSTANCE.GetNamedPipeHandleState(handle, null,PipeOpenStatus, null, null, null, 2048);
      pipeOpenValue = PipeOpenStatus.getValue();
      WinDef.ULONGByReference ServerId = new WinDef.ULONGByReference();
      ServerIdState = Kernel32.INSTANCE.GetNamedPipeServerProcessId(handle, ServerId);
}


    


    But I faced two problems :

    


      

    1. High CPU usage due to iterating two loops in Server and Client. (find by profiling resources by VisualVM)
    2. 


    3. Slower operation than just connecting two FFMPEG command with regular | in command prompt. Speed depends on buffer size but large buffer size blocks operation and small buffer size reduce speed further.
    4. 


    


    Questions :

    


      

    1. Is there any way not to send and receive in chunks of bytes ? Just stream STDOUT to the Namedpipe and capture it in Client. (Eliminate two Loops)
    2. 


    3. If I cant use NampedPipe, is there any other way to Connect two FFMPEG process that runs in different java modules but in the same machine ?
    4. 


    


    Thanks

    


  • Node.js merge audio and video streams and pipe it to the client

    29 mars 2023, par nick

    I am working with ytdl-core library and it cannot download high quality videos with audio included because youtube has them in sperate files. Therefore, I need to download audio and video seperately then merge them using ffmpeg. An example of this can be seen here. However, using this way I am required to download the files prior to merging them and I was wondering is there is a way to merge audio and video streams and send the result to the client directly ?

    


    If you believe there is a more efficent way to achieve this, I would like to hear your approach.

    


    Thanks in advance.

    


  • Get ffmpeg info from Pipe (stdout)

    12 août 2020, par Peter Silie

    I want to call ffmpeg to get the duration of a video file. When using the command in OSX Terminal everything works fine :

    


    ffmpeg -i MyVideo.MOV 2>&1 | grep "Duration"


    


    I get this :

    


      Duration: 00:01:23.53, start: 0.000000, bitrate: 39822 kb/s


    


    It is perfect for me. But now I tried this call from within my code :

    


    func shell(launchPath: String, arguments: [String]) -> String
{
    let task = Process()
    task.launchPath = launchPath
    task.arguments  = arguments

    let pipe = Pipe()
    task.standardOutput = pipe
    
    do {
        try task.run()
        // task.launch() till 10.12, but now catchable!
    } catch let error as NSError {
        print(error.localizedDescription)
        return ""
    }
    
    let data = pipe.fileHandleForReading.readDataToEndOfFile()
    let output: String = NSString(data: data, encoding: String.Encoding.utf8.rawValue)! as String

    return output
}


    


    This code works fine for all other external commands. But here I get error :

    


    [NULL @ 0x107808800] Unable to find a suitable output format for '2>&1'
2>&1: Invalid argument


    


    I defined the arguments for ffmpeg like this :

    


    let arguments = ["-i", video.path, "2>&1", "|", "grep \"Duration\"" ]


    


    Even if I put them all in one argument as a larger string, it doesn't work. Using "pipe:1" instead of "2>&1" and rest of arguments results also in an error.

    


    Any idea, how I get it to work ?