Recherche avancée

Médias (1)

Mot : - Tags -/musée

Autres articles (35)

  • Websites made ​​with MediaSPIP

    2 mai 2011, par

    This page lists some websites based on MediaSPIP.

  • Encodage et transformation en formats lisibles sur Internet

    10 avril 2011

    MediaSPIP transforme et ré-encode les documents mis en ligne afin de les rendre lisibles sur Internet et automatiquement utilisables sans intervention du créateur de contenu.
    Les vidéos sont automatiquement encodées dans les formats supportés par HTML5 : MP4, Ogv et WebM. La version "MP4" est également utilisée pour le lecteur flash de secours nécessaire aux anciens navigateurs.
    Les documents audios sont également ré-encodés dans les deux formats utilisables par HTML5 :MP3 et Ogg. La version "MP3" (...)

  • Récupération d’informations sur le site maître à l’installation d’une instance

    26 novembre 2010, par

    Utilité
    Sur le site principal, une instance de mutualisation est définie par plusieurs choses : Les données dans la table spip_mutus ; Son logo ; Son auteur principal (id_admin dans la table spip_mutus correspondant à un id_auteur de la table spip_auteurs)qui sera le seul à pouvoir créer définitivement l’instance de mutualisation ;
    Il peut donc être tout à fait judicieux de vouloir récupérer certaines de ces informations afin de compléter l’installation d’une instance pour, par exemple : récupérer le (...)

Sur d’autres sites (5900)

  • Live streaming .webm file with ffmpeg and nginx

    9 décembre 2017, par seekahead

    Hi I am new to ffmpeg and I need some help with live streaming of .webm file which is still being written into. I have a .webm file containing only video in vp9 codecwhich needs to be live streamed (preferably without transcoding and streamed using DASH`. I have compiled nginx along with nginx-ts-module from (https://github.com/arut/nginx-ts-module#features) with the following configuration

    nginx version: nginx/1.12.1
    built by gcc 4.8.4 (Ubuntu 4.8.4-2ubuntu1~14.04.3)
    built with OpenSSL 1.0.1f 6 Jan 2014
    TLS SNI support enabled
    configure arguments: --with-cc-opt='-g -O2 -fPIE -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -fPIC -D_FORTIFY_SOURCE=2' --with-ld-opt='-Wl,-Bsymbolic-functions -fPIE -pie -Wl,-z,relro -Wl,-z,now -fPIC' --prefix=/usr/share/nginx --conf-path=/etc/nginx/nginx.conf --http-log-path=/var/log/nginx/access.log --error-log-path=/var/log/nginx/error.log --lock-path=/var/lock/nginx.lock --pid-path=/run/nginx.pid --modules-path=/usr/lib/nginx/modules --http-client-body-temp-path=/var/lib/nginx/body --http-fastcgi-temp-path=/var/lib/nginx/fastcgi --http-proxy-temp-path=/var/lib/nginx/proxy --http-scgi-temp-path=/var/lib/nginx/scgi --http-uwsgi-temp-path=/var/lib/nginx/uwsgi --with-debug --with-pcre-jit --with-http_ssl_module --with-http_stub_status_module --with-http_realip_module --with-http_auth_request_module --with-http_v2_module --with-http_dav_module --with-http_slice_module --with-threads --with-http_addition_module --with-http_gunzip_module --with-http_gzip_static_module --with-http_sub_module --with-stream=dynamic --with-stream_ssl_module --with-stream_ssl_preread_module --with-mail=dynamic --with-mail_ssl_module --add-dynamic-module=/home/ubuntu/NGINX/nginx-ts-module-master

    The mediafile has the following properties(obtained with mediainfo) :

    General
    Complete name                            : video_4_1_Admin_0.webm
    Format                                   : WebM
    Format version                           : Version 2
    File size                                : 19.7 MiB
    Duration                                 : 1ms
    Overall bit rate                         : 165 Gbps
    Writing library                          : libwebm-0.2.1.0
    Video
    ID                                       : 1
    Format                                   : VP9
    Codec ID                                 : V_VP9
    Width                                    : 320 pixels
    Height                                   : 180 pixels
    Display aspect ratio                     : 16:9
    Frame rate mode                          : Variable
    Language                                 : English
    Default                                  : Yes
    Forced                                   : No

    I am trying to stream the file with the following

    ffmpeg -re -i video_4_1_Admin_0.webm -bsf:v vp9_superframe -c copy -f webm_chunk  http://127.0.0.1:8000/publish/sintel

    And I am getting the following error

    Input #0, matroska,webm, from 'video_4_1_Admin_0.webm':
     Metadata:
       encoder         : libwebm-0.2.1.0
     Duration: 00:00:00.00, start: 0.000000, bitrate: 174444152 kb/s
       Stream #0:0(eng): Video: vp9 (Profile 0), yuv420p(tv), 320x180, SAR 1:1 DAR 16:9, 30 fps, 30 tbr, 1k tbn, 1k tbc (default)
    Output #0, webm_chunk, to 'http://127.0.0.1:8000/publish/sintel':
    Output file #0 does not contain any stream

    I am not sure what are the exact options to be passed to ffmpeg so that it creates the .mpd and needed chunks which will allow me to LiveStream the media, I tried replacing the options given in the example (https://github.com/arut/nginx-ts-module#features) with what seems like vp9 equivalent., but, I am not sure. Can someone help me out here ? Thanks in advance

  • 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

  • Merge commit '883ce264d9ffc5bdaf477e09ee155b03339c46a6'

    23 octobre 2017, par James Almer
    Merge commit '883ce264d9ffc5bdaf477e09ee155b03339c46a6'
    

    * commit '883ce264d9ffc5bdaf477e09ee155b03339c46a6' :
    vf_showinfo : Display spherical properties

    Merged-by : James Almer <jamrial@gmail.com>

    • [DH] libavfilter/vf_showinfo.c