Recherche avancée

Médias (91)

Autres articles (22)

  • Création définitive du canal

    12 mars 2010, par

    Lorsque votre demande est validée, vous pouvez alors procéder à la création proprement dite du canal. Chaque canal est un site à part entière placé sous votre responsabilité. Les administrateurs de la plateforme n’y ont aucun accès.
    A la validation, vous recevez un email vous invitant donc à créer votre canal.
    Pour ce faire il vous suffit de vous rendre à son adresse, dans notre exemple "http://votre_sous_domaine.mediaspip.net".
    A ce moment là un mot de passe vous est demandé, il vous suffit d’y (...)

  • Les tâches Cron régulières de la ferme

    1er décembre 2010, par

    La gestion de la ferme passe par l’exécution à intervalle régulier de plusieurs tâches répétitives dites Cron.
    Le super Cron (gestion_mutu_super_cron)
    Cette tâche, planifiée chaque minute, a pour simple effet d’appeler le Cron de l’ensemble des instances de la mutualisation régulièrement. Couplée avec un Cron système sur le site central de la mutualisation, cela permet de simplement générer des visites régulières sur les différents sites et éviter que les tâches des sites peu visités soient trop (...)

  • Taille des images et des logos définissables

    9 février 2011, par

    Dans beaucoup d’endroits du site, logos et images sont redimensionnées pour correspondre aux emplacements définis par les thèmes. L’ensemble des ces tailles pouvant changer d’un thème à un autre peuvent être définies directement dans le thème et éviter ainsi à l’utilisateur de devoir les configurer manuellement après avoir changé l’apparence de son site.
    Ces tailles d’images sont également disponibles dans la configuration spécifique de MediaSPIP Core. La taille maximale du logo du site en pixels, on permet (...)

Sur d’autres sites (3784)

  • OBS and OBS Portable Recording Into Same File Simultaneously

    26 juin 2020, par aerodavo

    Corrupted video file, FFprobe output text file, and FFmpeg output text files are all available to download here :
https://drive.google.com/drive/folders/1R0Y5plgkhTWWFNNKgSNJ5yitpKQbIKgg?usp=sharing

    


    I'm hoping there is a way to extract good video and audio from this video file, this was for a very important job that is impossible to do again. The video linked is a 1 minute recreation of the exact same problem... the actual video file is confidential (for a legal court case) and is much longer/larger. I used the exact same settings, the only difference was the window OBS was capturing (I used a YouTube video as opposed to the videoconference software window used for the deposition).

    


    Here's what happened :

    


    In OBS and OBS Portable, I had the save location set to the same exact folder (this was not how I intended it to be, but I made a last minute change to accommodate what I suspected was a faulty hard drive). I also had a hotkey to start recording on both apps simultaneously. I left the auto-naming scheme in place for both instances of OBS since they were supposed to be saving to two totally different external hard drives. I have since changed the auto-naming so it won't happen again, but this perfect storm resulted in both recordings being written into a single file (see link above), instead of two files as intended. It is unplayabe in VLC.

    


    I ran an FFprobe (available via link above), and found that there are 8 streams in the file. Each file should have had 4 streams (1 video and 3 audio streams per my setup in OBS), so at first glance it looks like all the data is there in some form/arrangement.

    


    I tried to map the 0:0 stream to a new file and tried the same thing with the 0:4 stream (these are the video streams), but did not have any luck extracting good video. Here are the two things I ran (again see link above for text files with full FFmpeg ouput of each) :

    


    ffmpeg -i C :\Users\David\Videos\2020-06-23_17-39-32_corrupted.mkv -map 0:0 -c copy C :\Users\David\Videos\2020-06-23_17-39-32_corrupted_map0-0.mkv

    


    ffmpeg -i C :\Users\David\Videos\2020-06-23_17-39-32_corrupted.mkv -map 0:4 -c copy C :\Users\David\Videos\2020-06-23_17-39-32_corrupted_map0-4.mkv

    


    It seems the audio is intact, as I was able to map one of the audio streams into a wav file... although there seemed to be extra/repeated audio tacked onto where the video/audio should have ended...

    


    It looks to me like both video streams got written into stream 0:0, while stream 0:4 looks empty (because this map results in a very small file). However the thing that's weird (and maybe promising) is that when I play the corrupted file in VLC, it mostly looks like smeared digital colors, but if I click around to different times in the video, it sometimes shows good video, even though it won't show any good video if you just play it from the beginning.

    


    My life would saved if there is a way to extract good video/audio from this corrupted file. Any help would be greatly appreciated, thanks in advance !

    


  • What ffmpeg command to use to convert a list of unsigned integers into an audio file ?

    21 mars 2019, par John

    I have a file that contains a list of about forty thousand integers that are space delimited, with each integer between the value of 0 and 255. It is this file here :

    https://github.com/johnlai2004/sound-project/blob/master/integers.txt

    If you connect a speaker to an ESP32 breakout board, then run this list of integers through the digital to analog converter at a frequency of 24kHz, you will hear the sentence, "That’s not the post that you missed."

    What I want to know is how do you use FFMPEG to convert this list of integers into a sound file that other computer can play to hear the same phrase ? I tried this command :

    ffmpeg -f u8 -ac 1 -ar 24000 -i integers.txt -y audio.wav

    But my audio.wav just sounds like white noise. I tried a few other values for -f and for -ar, but all I hear are different frequencies of white noise and maybe some extra buzzing.

    Is it possible to use ffmpeg to translate my list of integers into an audio file for other computers to play ? If so, what’s the correct ffmpeg command to do this ?

    OTHER NOTES

    If it helps, this is the sketch file that I upload to an ESP32 if I want to hear the audio :

    https://github.com/johnlai2004/sound-project/blob/master/play-audio.ino

    In short, the file looks like this :

    #define speakerPin 25                          //The pins to output audio on. (9,10 on UNO,Nano)
    #define bufferTotal 1347
    #define buffSize 32

    byte buffer[bufferTotal][buffSize];
    int buffItemN = 0;
    int bufferN = 0;

    hw_timer_t * timer = NULL;
    portMUX_TYPE timerMux = portMUX_INITIALIZER_UNLOCKED;

    void IRAM_ATTR onTimer() {
     portENTER_CRITICAL_ISR(&timerMux);


     byte v = buffer[bufferN][buffItemN];
     dacWrite(speakerPin,v);

     buffItemN++;

     if(buffItemN >= buffSize){                                      //If the buffer is empty, do the following
       buffItemN = 0;                                              //Reset the sample count
       bufferN++;
       if(bufferN >= bufferTotal)
         bufferN = 0;
     }

     portEXIT_CRITICAL_ISR(&timerMux);

    }

    void setup() {      

    /* buffer records */
    buffer[0][0]=88;  // I split the long list of integers and load it into a 2D array
    buffer[0][1]=88;
    buffer[0][2]=86;
    buffer[0][3]=85;
    //etc....
    buffer[1346][28]=94;
    buffer[1346][29]=92;
    buffer[1346][30]=92;
    buffer[1346][31]=95;


    /* end buffer records */

     timer = timerBegin(0, 80, true);
     timerAttachInterrupt(timer, &onTimer, true);
     timerAlarmWrite(timer, 41, true);
     timerAlarmEnable(timer);

    }

    void loop() {

    }

    The buffer... is the list of integers found in the integers.txt file.

  • How to handle DHAV (.dav) video streams ?

    16 juin 2022, par Mateus Henrique

    I have a WPF app where I need to handle DHAV (.dav) video stream on runtime from a Digital Video Recorder (DVR). I'm using an SDK that can be found here Dahua SDK search

    


    SDK: General_NetSDK_Eng_Win64_IS_V3.052.0000002.0.R.201103


    


    I need to handle every single frame from the video stream, convert it to a BitmapImage and then displays it in a WPF Image control. Something like : MJPEG Decoder

    


    The problem is that I can't find any documentation on how to handle that data and the samples from the SDK doesn't show that either, instead they are built with WinForms and they only pass the Window Handle of the PictureBox's control to an exported DLL function and 'magically' shows the video stream :

    


    [DllImport(LIBRARYNETSDK)]
public static extern IntPtr CLIENT_RealPlayEx(IntPtr lLoginID, int nChannelID, IntPtr hWnd, EM_RealPlayType rType);


    


    


    OBS : 'hWnd' param is the Window Handle to display the video in.

    


    


    The problem with this approach is that I don't have any control over the video stream.

    


    I have tried many FFMPEG wrappers for .NET but they only parse the data if I first write it to disk and only then I can convert it to some type I can handle.

    


    This is the callback function that is called contantly during the application's runtime with the data I need to handle :

    


        private void RealDataCallback(IntPtr lRealHandle, uint dwDataType, IntPtr pBuffer, uint dwBufSize, IntPtr param, IntPtr dwUser)
    {
        switch (dwDataType)
        {
            case 0: // original data
                break;
            case 1: // frame data
                HandleFrameData(lRealHandle, dwDataType, pBuffer, dwBufSize, param, dwUser);
                break;
            case 2: // yuv data
                break;
            case 3: // pcm audio data
                break;
        }
    }

    private void HandleFrameData(IntPtr lRealHandle, uint dwDataType, IntPtr pBuffer, uint dwBufSize, IntPtr param, IntPtr dwUser)
    {
        // The pBuffer parameter format is DHAV (.dav) 
        byte[] buff = new byte[dwBufSize];
        Marshal.Copy(pBuffer, buff, 0, (int)dwBufSize);

        using (var ms = new MemoryStream(buff))
        {
        }
    }


    


    UPDATE

    


    I'm able to convert the YUV data provided in the callback funcion to RGB but that is not the ideal solution. It would be so much better (and faster) if I can convert the original (.dav) data.

    


    The RealDataCallback, in fact, only returns 1 frame per callback, but I don't know how to convert that frame to Bitmap. Any help would be appreciated.