Recherche avancée

Médias (91)

Autres articles (71)

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

  • MediaSPIP 0.1 Beta version

    25 avril 2011, par

    MediaSPIP 0.1 beta is the first version of MediaSPIP proclaimed as "usable".
    The zip file provided here only contains the sources of MediaSPIP in its standalone version.
    To get a working installation, you must manually install all-software dependencies on the server.
    If you want to use this archive for an installation in "farm mode", you will also need to proceed to other manual (...)

  • Amélioration de la version de base

    13 septembre 2013

    Jolie sélection multiple
    Le plugin Chosen permet d’améliorer l’ergonomie des champs de sélection multiple. Voir les deux images suivantes pour comparer.
    Il suffit pour cela d’activer le plugin Chosen (Configuration générale du site > Gestion des plugins), puis de configurer le plugin (Les squelettes > Chosen) en activant l’utilisation de Chosen dans le site public et en spécifiant les éléments de formulaires à améliorer, par exemple select[multiple] pour les listes à sélection multiple (...)

Sur d’autres sites (10419)

  • Revision 6919 : Gros changement... On change le pipeline diogene_champs_sup en ...

    22 août 2012, par kent1 — Log

    Gros changement...
    On change le pipeline diogene_champs_sup en diogene_objets
    Les champs_sup antérieurs $fluxarticle ?truc ? deviennent maintenant $fluxarticle ?champs_sup ?truc ?
    On fait cela pour gérer d’autres propriétés spécifiques par objet comme :
    - $fluxpage ?type_orig ? = ’article’ ; => indique que le type d’origine est article ;
    - $fluxpage ?diogene_max ? = 1 ; => indique que l’on ne peut avoir qu’un seul diogène de ce type ;
    - $fluxpage ?ss_rubrique ? = true ; => indique que ce type de diogène est sans rubrique, ne peut correspondre à 1 secteur ;
    Passage en version 1.2.0

  • How do I get video frame buffer stream from a connected GoPro camera ?

    29 décembre 2024, par cleanrun

    I'm creating an app that can connect to a GoPro camera and I want to get the frame buffer stream from the connected GoPro camera and use it on my iOS app (by converting the buffer data into CMSampleBuffer). I'm currently trying to use the FFmpeg library but so far it doesn't work. Here's the logic I've implemented (I'm using ChatGPT to generate the code) :

    


    import Foundation
import CoreMedia
import AVFoundation
import ffmpegkit


final class FFmpegBufferProcessor: AnyBufferProcessor {
    weak var delegate: BufferProcessorDelegate?
    
    private var pipePath: String = NSTemporaryDirectory() + "ffmpeg_pipe"
    private var isProcessing: Bool = false
    private var videoWidth = 1920
    private var videoHeight = 1080
    private let pixelFormat = kCVPixelFormatType_420YpCbCr8BiPlanarVideoRange
    
    init() {
        setupPipe()
    }
    
    deinit {
        cleanupPipe()
    }
    
    private func setupPipe() {
        do {
            if FileManager.default.fileExists(atPath: pipePath) {
                try FileManager.default.removeItem(atPath: pipePath)
            }
            
            let result = mkfifo(pipePath.cString(using: .utf8), 0o644)
            if result != 0 {
                print("\(#function); Pipe creation failed.")
                return
            }
        } catch {
            print("\(#function); Setup pipe error: \(error.localizedDescription)")
        }
    }
    
    private func cleanupPipe() {
        do {
            try FileManager.default.removeItem(atPath: pipePath)
        } catch {
            print("\(#function); Cleanup pipe error: \(error.localizedDescription)")
        }
    }
    
    func startProcessingStream(from udpURL: String) {
        guard !isProcessing else {
            print("\(#function); Already processing stream.")
            return
        }
        
        isProcessing = true
        let command = """
        -i \(udpURL) -f rawvideo -pix_fmt nv12 \(pipePath)
        """
        
        FFmpegKit.executeAsync(command) { [weak self] session in
            let returnCode = session?.getReturnCode()
            if ReturnCode.isSuccess(returnCode) {
                print("\(#function); FFmpeg session completed.")
            } else {
                print("\(#function); FFmpeg session error: \(String(describing: session?.getFailStackTrace())).")
            }
            
            self?.isProcessing = false
        }
        
        readFromPipe()
    }
    
    func stopProcessingStream() {
        isProcessing = false
        FFmpegKit.cancel()
    }
}

// MARK: - Private methods

private extension FFmpegBufferProcessor {
    func readFromPipe() {
        DispatchQueue.global(qos: .background).async { [unowned self] in
            guard let fileHandle = FileHandle(forReadingAtPath: self.pipePath) else {
                print("\(#function); Fail to read file handle from pipe path.")
                return
            }
            
            autoreleasepool {
                while self.isProcessing {
                    let frameSize = self.videoWidth * self.videoHeight * 3 / 2
                    let rawData = fileHandle.readData(ofLength: frameSize)
                    
                    if rawData.isEmpty {
                        print("\(#function); Pipe closed / no more data to read.")
                        break
                    }
                    
                    self.handleRawFrameData(rawData)
                }
                
                fileHandle.closeFile()
            }
        }
    }
    
    func handleRawFrameData(_ data: Data) {
        let width = 1920
        let height = 1080
        
        // Creating the Pixel Buffer (if possible)
        guard let pixelBuffer = createPixelBuffer(from: data, width: width, height: height) else {
            print("\(#function); Failed to create pixel buffer")
            return
        }
        
        var timing = CMSampleTimingInfo(duration: CMTime(value: 1, timescale: 30), presentationTimeStamp: .zero, decodeTimeStamp: .invalid)
        // Creating the Sample Buffer (if possible)
        guard let sampleBuffer = createSampleBuffer(from: pixelBuffer, timing: &timing) else {
            print("\(#function); Failed to create sample buffer")
            return
        }
        
        delegate?.bufferProcessor(self, didOutput: sampleBuffer)
    }
}


    


    Here's the logs I'm getting from FFMpeg :

    


    Debug log

    


    Also a quick note, I'm using AVSampleBufferDisplayLayer to enqueue and show the buffers, but obviously it doesn't show up.

    


    What should I do to fix this ? Or maybe is there any other way to get the frame buffers from a GoPro camera and show it in iOS ? Any help would be appreciated. Thank you.

    


  • Dropping the latency of streaming in Gopro hero 8 via ffplay and ffmpeg

    13 août 2020, par Shirin

    I'm currently working on a low-latency live streaming using FFplay and FFmpeg library. My target is achieving to 100 or 200 msec latency and for next steps manipulating the latency.
Now I use the followed code and received 800msec-1sec latency in streaming live video but it is not sufficient.

    


    -ffplay -probesize 32 -sync video -an -sn -fast -infbuf -f mpegts -i udp ://127.0.0.1:10000

    


    I was wondering if you help me for dropping the latency.