Recherche avancée

Médias (3)

Mot : - Tags -/collection

Autres articles (53)

  • L’agrémenter visuellement

    10 avril 2011

    MediaSPIP est basé sur un système de thèmes et de squelettes. Les squelettes définissent le placement des informations dans la page, définissant un usage spécifique de la plateforme, et les thèmes l’habillage graphique général.
    Chacun peut proposer un nouveau thème graphique ou un squelette et le mettre à disposition de la communauté.

  • Other interesting software

    13 avril 2011, par

    We don’t claim to be the only ones doing what we do ... and especially not to assert claims to be the best either ... What we do, we just try to do it well and getting better ...
    The following list represents softwares that tend to be more or less as MediaSPIP or that MediaSPIP tries more or less to do the same, whatever ...
    We don’t know them, we didn’t try them, but you can take a peek.
    Videopress
    Website : http://videopress.com/
    License : GNU/GPL v2
    Source code : (...)

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

Sur d’autres sites (5883)

  • Connect external cameras to iOS and decompress to a usable form

    27 septembre 2017, par Ping Chen

    I want to create a 2 camera setup which can send 1 of the camera views out as an RTMP stream depending on the motion intensity detected. The chosen camera view can change if motion intensity on the views changes.

    I imagine that I could use an iPhone/iPad as encoding/streaming hub as well as 1 of the cameras. And connect a WiFi camera to the iPad/iPhone to feed the 2nd camera view.

    My goals for the iOS side are :

    1. Connect with a WiFi camera on the local network
    2. Decode the data and run motion intensity detection on the WiFi camera feed AND the iPhone/iPad’s own camera feed with Brad Larson’s GPUImage framework https://github.com/BradLarson/GPUImage
    3. Stream out the chosen camera view. depending on motion detected

    Larson’s GPUImage framework works with an AVCaptureSession subclass. I’m only familiar with AVFoundation objects, but am a complete noob with it comes to VideoToolbox and some of the lower level iOS video stuff. Through googling, I kind of know that VTDecompressionSession is what I’d get from the WiFi camera. I have no clue how I can manipulate that to a usable form for my purposes.

    I’ve dug through stackoverflow answers such as : https://stackoverflow.com/a/29525001/7097455

    Very informative, but maybe I don’t even know to ask the correct questions

  • Windows(WASAPI):Converting IEEE float PCM to PCM 16bit

    10 octobre 2017, par Michael IV

    I do a hook into some of WASAPI methods to read out audio buffer that contains system sound.

    The source is WAV with audio format = WAVE_FORMAT_IEEE_FLOAT and

    subformat = KSDATAFORMAT_SUBTYPE_IEEE_FLOAT

    I am trying to convert it to PCM 16bit on the fly using FFMPEG libswresample. The resulting soundtrack has alot of forground noise with the original track’s data playing in the background.

    Here is how I do it (I skip WASAPI init part) :

    First,the source WAVEFORMATEX struct has the following properties :

    Format tag:65534
    Sample rate:44100
    Num channels:2
    CB size:22
    Average bytes per sec:352800
    Block align:8
    Bits per sample:32

    Where 65534 stands for WAVE_FORMAT_IEEE_FLOAT.

    WAVEFORMATEX *w;//filled with the props above
    int samples = 0;  
    int bufferSize = 0;
    int buffer_frames = 0;
    int bWritten = 0;
    char* bufferIn = NULL;
    char* bufferOut = NULL;
    BYTE* wavBuffer = NULL;
    void InitSWRContext()
    {
       swrctx = swr_alloc_set_opts(NULL,
       AV_CH_LAYOUT_STEREO, //stereo layout
       AV_SAMPLE_FMT_S16, // sample out format
       44100, // out sample rate
       2, //number of channels
       AV_SAMPLE_FMT_FLT, //sample in format
       w->nSamplesPerSec ,//in sample rate
       0,
      NULL);

       swr_init(swrctx);

    //also tried like this:
     /*
      swrctx = swr_alloc();
      av_opt_set_int(swrctx, "in_channel_layout", CA2SWR_chlayout(w->nChannels), 0);
      av_opt_set_int(swrctx, "out_channel_layout", AV_CH_LAYOUT_STEREO, 0);
      av_opt_set_int(swrctx, "in_sample_rate", 44100, 0);
      av_opt_set_int(swrctx, "out_sample_rate", 44100, 0);
      av_opt_set_sample_fmt(swrctx, "in_sample_fmt", AV_SAMPLE_FMT_FLT, 0);
      av_opt_set_sample_fmt(swrctx, "out_sample_fmt", AV_SAMPLE_FMT_S16, 0);

      */

       samples = (int)av_rescale_rnd(CA_MAX_SAMPLES, 44100, w->nSamplesPerSec,
       AV_ROUND_UP);
       bufferSize = av_samples_get_buffer_size(NULL,2, samples * 2,AV_SAMPLE_FMT_S16, 1/*no-alignment*/);
       bufferOut = ( char *)malloc(bufferSize ))

    }

    These two methods are invoked by the system and I hook them to access audio buffer :

     DEXPORT HRESULT __stdcall
    _GetBuffer(
    IAudioRenderClient *thiz,
    UINT32 NumFramesRequested,
    BYTE **ppData)
    {
       HRESULT hr;
       hr = orig_GetBuffer(thiz, NumFramesRequested, ppData);
       bufferIn = (char*)*ppData;
       buffer_frames = NumFramesRequested;
       return S_OK;
    }

    Then on buffer release I perform the conversion and readout.

    DEXPORT HRESULT __stdcall
    _ReleaseBuffer(IAudioRenderClient *thiz,
    UINT32 NumFramesWritten, DWORD dwFlags)
    {
       const unsigned char *srcplanes[2];
       unsigned char *dstplanes[2];
       int samples;
       srcplanes[0] = (unsigned char*)bufferIn;
       srcplanes[1] = NULL;
       dstplanes[0] = (unsigned char*)bufferOut;
       dstplanes[1] = NULL;
       samples = (int)av_rescale_rnd(NumFramesWritten, 44100, 44100, AV_ROUND_UP);
       int samplesConverted = swr_convert(swrctx, dstplanes, samples , srcplanes, NumFramesWritten);
       int framesize = (/*PCM16*/16 / 8) * pwfx->nChannels * NumFramesWritten;
       if (!wavBuffer)
       {
         wavBuffer = (BYTE*)malloc(4096 * 1000); //write out a few seconds
       }
       //copy converted buffer into wavBuffer
       memcpy(wavBuffer + bWritten, bufferOut, framesize);
       bWritten += framesize;
       if (bWritten > 4096 * 1000)
       {
           pwfx->wFormatTag = WAVE_FORMAT_PCM;
           pwfx->wBitsPerSample = 16;
           pwfx->nBlockAlign = (pwfx->nChannels * pwfx->wBitsPerSample) / 8;
           pwfx->cbSize = 0;
           SaveWaveData(wavBuffer, bWritten, pwfx, L"test.wav");

           exit(0);
        }

     }

    SaveWaveData borrowed from here.

    Resulting sound file(WAV)

    Original file : a2002011001-e02.wav

    I tried to play and analyze the output in VLC,Audacity, and FMOD Studio.
    The strange thing is that VLC show (codec info) that it is PCM16, while FMOD studio interprets the data as PCM32. I also tried to store without conversion the original buffer which also produces a sound with noise,though not as significant as when converting to PCM16

  • FFmpeg HLS Live Stream Stuck with iOS 11

    1er novembre 2017, par Lamorun

    I’ve exp with FFmpeg but i recent problem with iOS 11 (Recent release for Apple)

    I used FFmpeg for stream HLS Live Stream for only iPhone and iPad in closed app for online courses. My problem is the next :

    I used this code for HLS Live Stream :

    ffmpeg -i "Input" -preset fast -c:v libx264 -c:a aac -ac 1 -strict -2 -crf 18 -profile:v baseline -maxrate 1000k -bufsize 1835k -pix_fmt yuv420p -b:a 64k -flags -global_header -hls_time 20 -hls_list_size 6 -hls_wrap 10 -start_number 1 /m3u8/test.m3u8

    This work perfect in iOS 8, 9 and 10 devices. But with new version iOS 11, video is stuck after about 30 to 40 seconds, as seen in the image :

    ios11stuck

    I have searched for hours and hours. I have done many tests, but I can not get it out, since it works perfectly with iOS 8,9 and 10 (test in somes devices, even working perfectly on a device with iOS 10, update to iOS 11, and stop working immediately, downgrade to iOS 10 and work again)

    I hope someone can help me out, thank you and greetings to all