Recherche avancée

Médias (91)

Autres articles (111)

  • Ajouter des informations spécifiques aux utilisateurs et autres modifications de comportement liées aux auteurs

    12 avril 2011, par

    La manière la plus simple d’ajouter des informations aux auteurs est d’installer le plugin Inscription3. Il permet également de modifier certains comportements liés aux utilisateurs (référez-vous à sa documentation pour plus d’informations).
    Il est également possible d’ajouter des champs aux auteurs en installant les plugins champs extras 2 et Interface pour champs extras.

  • Script d’installation automatique de MediaSPIP

    25 avril 2011, par

    Afin de palier aux difficultés d’installation dues principalement aux dépendances logicielles coté serveur, un script d’installation "tout en un" en bash a été créé afin de faciliter cette étape sur un serveur doté d’une distribution Linux compatible.
    Vous devez bénéficier d’un accès SSH à votre serveur et d’un compte "root" afin de l’utiliser, ce qui permettra d’installer les dépendances. Contactez votre hébergeur si vous ne disposez pas de cela.
    La documentation de l’utilisation du script d’installation (...)

  • Librairies et binaires spécifiques au traitement vidéo et sonore

    31 janvier 2010, par

    Les logiciels et librairies suivantes sont utilisées par SPIPmotion d’une manière ou d’une autre.
    Binaires obligatoires FFMpeg : encodeur principal, permet de transcoder presque tous les types de fichiers vidéo et sonores dans les formats lisibles sur Internet. CF ce tutoriel pour son installation ; Oggz-tools : outils d’inspection de fichiers ogg ; Mediainfo : récupération d’informations depuis la plupart des formats vidéos et sonores ;
    Binaires complémentaires et facultatifs flvtool2 : (...)

Sur d’autres sites (8891)

  • iOS - How can I stream Encoded Video Frames(from AVFoundation and VideoToolBox) from device to server via RTP

    2 octobre 2015, par ASP Peek

    I am trying to stream live video from my iPhone device to server using RTP.
    Using AVFoundation’s AVCaptureVideoDataOutput, I was able to get CMSampleBuffer for video. I then feed these frames as they arrive into VideoToolBox’s VTCompressionSessionEncodeFrame() and is able to get Encoded CMSampleBuffer.

    Now to send these encoded Frames via RTP, I came across FFMPEG and found its built library for iOS device. (https://github.com/kewlbear/FFmpeg-iOS-build-script)

    However I am not able to find any iOS example or sample code or any documentation that explains the process of sending the encoded frames via RTP for iOS apps.

    Is there any existing example or documentation that can explain me how can I send the encoded CMSampleBuffers to server via RTP using FFMPEG.

    Thanks in Advance :)

  • Encoding video settings with Transloadit and FFMPEG

    2 octobre 2015, par David Soler

    I’m using Transloadit to convert and compress videos from .mov to .ts format. I’m using the json templates but unfortunately the docs are not too extensive. The thing is the quality I’m getting rigth now is very poor and pixeled. If I do it through console with ffmpeg command and including some parameters as crf (Constant Rate Factor) the quality gets a lot better but I dont know how edit it in transloadit template to get the same result.

    This is the ffmpeg command I’m using to convert the video in console

    ./ffmpeg -i ../canales.mov -c:v libx264 -crf 23 -bsf:a aac_adtstoasc output.ts

    And this is the json template I’m using right now. I guess I should add parameters to ffmpeg hash but I don’t know which settings are allowed

    {
     "steps": {
       "file": {
         "robot": "/file/filter",
         "accepts": [
           [
             "${file.mime}",
             "regex",
             "video"
           ]
         ],
         "declines": [
           [
             "${file.size}",
             ">",
             "10485760"
           ],
           [
             "${file.meta.duration}",
             ">",
             "16"
           ]
         ],
         "error_on_decline": true
       },
       "segments": {
         "robot": "/video/encode",
         "preset": "iphone-high",
         "width": 1242,
         "height": 2208,
         "use": "file",
         "segment": true,
         "segment_duration": 10,
         "ffmpeg_stack": "v2.2.3",
         "ffmpeg": {
           "b": "1200K",
           "crf": 23
         }
       },
       "thumb": {
         "robot": "/video/thumbs",
         "use": "file",
         "count": 1
       },
       "store": {
         "robot": "/s3/store",
         "use": [
           "segments",
           "thumb"
         ],
         "key": "key",
         "secret": "Secret",
         "bucket": "bucket"
       }
     }
    }
  • AVAssetWriter creating mp4 with no sound in last 50msec

    12 août 2015, par Joseph K

    I’m working on a project involving live streaming from the iPhone’s camera.

    To minimize loss during AVAssetWriter finishWriting, I use an array of 2 asset writers and swap them whenever I need to create an mp4 fragment out of the recorded buffers.

    Code responsible for capturing Audio & Video sample buffers

    func captureOutput(captureOutput: AVCaptureOutput!, didOutputSampleBuffer sampleBuffer: CMSampleBuffer!, fromConnection connection: AVCaptureConnection!) {

       if CMSampleBufferDataIsReady(sampleBuffer) <= 0 {
               println("Skipped sample because it was not ready")
               return
           }

       if captureOutput == audioOutput  {

           if audioWriterBuffers[0].readyForMoreMediaData() {
               if !writers[0].appendAudio(sampleBuffer) { println("Failed to append: \(recordingPackages[0].name). Error: \(recordingPackages[0].outputWriter.error.localizedDescription)") }
               else {
                   writtenAudioFrames++

                   if writtenAudioFrames == framesPerFragment {
                       writeFragment()
                   }
               }
           }
           else {
               println("Skipped audio sample; it is not ready.")
           }
       }

       else if captureOutput == videoOutput {
           //Video sample buffer
           if videoWriterBuffers[0].readyForMoreMediaData() {
               //Call startSessionAtSourceTime if needed
               //Append sample buffer with a source time
           }
       }
    }

    Code responsible for the writing and swapping

    func writeFragment() {
       writtenAudioFrames = 0

       swap(&writers[0], &writers[1])
       if !writers[0].startWriting() {println( "Failed to start OTHER writer writing") }
       else { startTime  = CFAbsoluteTimeGetCurrent() }

       audioWriterBuffers[0].markAsFinished()
       videoWriterBuffers[0].markAsFinished()

       writers[1].outputWriter.finishWritingWithCompletionHandler { () -> Void in
           println("Finish Package record Writing, now Resetting")
           //
           // Handle written MP4 fragment code
           //

           //Reset Writer
           //Basically reallocate it as a new AVAssetWriter with a given URL and MPEG4 file Type and add inputs to it
           self.resetWriter()
       }

    The issue at hand

    The written MP4 fragments are being sent over to a local sandbox server to be analyzed.

    When MP4 fragments are stitched together using FFMpeg, there is a noticeable glitch in sound due to the fact that there is not audio at the last 50msec of every fragment.

    My audio AVAssetWriterInput’s settings are the following :

    static let audioSettings: [NSObject : AnyObject]! =
    [
       AVFormatIDKey : NSNumber(integer: kAudioFormatMPEG4AAC),
       AVNumberOfChannelsKey : NSNumber(integer: 1),
       AVSampleRateKey : NSNumber(int: 44100),
       AVEncoderBitRateKey : NSNumber(int: 64000),
    ]

    As such, I encode 44 audio sample buffers every second. They are all being successfully appended.

    Further resources

    Here’s a waveform display of the audio stream after concatenating the mp4 fragments

    Waveform of audio stream

     !! Note that my fragments are about 2secs in length.
     !! Note that I’m focusing on audio since video frames are extremely smooth when jumping from one fragment to another.

    Any idea as to what is causing this ? I can provide further code or info if needed.