Recherche avancée

Médias (1)

Mot : - Tags -/MediaSPIP 0.2

Autres articles (43)

  • Supporting all media types

    13 avril 2011, par

    Unlike most software and media-sharing platforms, MediaSPIP aims to manage as many different media types as possible. The following are just a few examples from an ever-expanding list of supported formats : images : png, gif, jpg, bmp and more audio : MP3, Ogg, Wav and more video : AVI, MP4, OGV, mpg, mov, wmv and more text, code and other data : OpenOffice, Microsoft Office (Word, PowerPoint, Excel), web (html, CSS), LaTeX, Google Earth and (...)

  • MediaSPIP v0.2

    21 juin 2013, par

    MediaSPIP 0.2 is the first MediaSPIP stable release.
    Its official release date is June 21, 2013 and is announced here.
    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 (...)

  • Installation en mode ferme

    4 février 2011, par

    Le mode ferme permet d’héberger plusieurs sites de type MediaSPIP en n’installant qu’une seule fois son noyau fonctionnel.
    C’est la méthode que nous utilisons sur cette même plateforme.
    L’utilisation en mode ferme nécessite de connaïtre un peu le mécanisme de SPIP contrairement à la version standalone qui ne nécessite pas réellement de connaissances spécifique puisque l’espace privé habituel de SPIP n’est plus utilisé.
    Dans un premier temps, vous devez avoir installé les mêmes fichiers que l’installation (...)

Sur d’autres sites (5540)

  • Connection to tcp ://localhost:8090 failed : Connection refused

    29 décembre 2020, par Scanty

    I am running into the following error when running this command to read a RTSP input for a HTTP output :

    


    ffmpeg -i /root/videos/walker.mkv http://localhost:8090/feed.ffm


    


    The following error I got :

    


    Connection to tcp://localhost:8090 failed: Connection refused
http://localhost:8090/feed.ffm: Connection refused


    


    /etc/ffsever.conf

    


    Port 8090&#xA;BindAddress 0.0.0.0&#xA;MaxClients 100&#xA;MaxBandwidth 20000&#xA;NoDaemon&#xA;&#xA;<feed>&#xA;ACL allow 127.0.0.1&#xA;ACL allow localhost&#xA;File /tmp/feed.ffm&#xA;FileMaxSize 3M&#xA;</feed>&#xA;<stream>&#xA;&#xA;Feed feed.ffm&#xA;Format flv&#xA;VideoCodec flv&#xA;VideoFrameRate 30&#xA;VideoBufferSize 80000&#xA;VideoBitRate 200&#xA;&#xA;VideoQMin 1&#xA;VideoQMax 5&#xA;&#xA;VideoSize 352x288&#xA;PreRoll 1&#xA;&#xA;Noaudio&#xA;</stream>&#xA;&#xA;<stream>&#xA;Feed feed.ffm&#xA;</stream>

    &#xA;

  • FFmpeg encoding aac audio, encoded file can not be played

    9 décembre 2020, par cs guy

    I am trying to encodea aac audio. Example of MP2 here. I followed this documentation. I encode the audio with the code below by calling startEncoding and after 2 seconds I call stopEncoding. Everything seems to work fine I get an file with some size but the problem is I can not open or play it. I dont know why. I must be doing something wrong in the code.

    &#xA;

    header :

    &#xA;

    class MediaEncoder {&#xA;public:&#xA;    MediaEncoder(char *filePath);&#xA;&#xA;    void startEncoding();&#xA;    void stopEncoding();&#xA;&#xA;    void encode(AVFrame *frame);&#xA;    bool isEncoding() const;&#xA;&#xA;    void startEncoderWorker();&#xA;&#xA;    int32_t check_sample_fmt(enum AVSampleFormat sample_fmt);&#xA;    &#xA;    bool signalExitFuture = false;&#xA;    int32_t ret;&#xA;&#xA;private:&#xA;    std::future<void> encodingFuture;&#xA;    AVCodecContext *avCodecContext;&#xA;    AVFrame *avFrame;&#xA;    AVPacket *avPacket;&#xA;    AVCodec *codec;&#xA;    FILE* file;&#xA;};&#xA;</void>

    &#xA;

    cpp :

    &#xA;

    MediaEncoder::MediaEncoder(char *filePath){&#xA;    buffer = std::make_unique>(recorderBufferSize);&#xA;&#xA;    /* find the encoder */&#xA;    codec = avcodec_find_encoder(AV_CODEC_ID_AAC);&#xA;    avCodecContext = avcodec_alloc_context3(codec);&#xA;&#xA;    avCodecContext->bit_rate = 64000;&#xA;&#xA;    /* check that the encoder supports given sample format */&#xA;    avCodecContext->sample_fmt = AVSampleFormat::AV_SAMPLE_FMT_FLTP;&#xA;    &#xA;    /* select other audio parameters supported by the encoder */&#xA;    avCodecContext->sample_rate = defaultSampleRate;&#xA;    avCodecContext->channel_layout = AV_CH_LAYOUT_STEREO;&#xA;    avCodecContext->channels = av_get_channel_layout_nb_channels(avCodecContext->channel_layout);&#xA;&#xA;    /* open it */&#xA;    avcodec_open2(avCodecContext, codec, nullptr)&#xA;    &#xA;    file = fopen(filePath, "wb");&#xA;    &#xA;    /* packet for holding encoded output */&#xA;    avPacket = av_packet_alloc();&#xA;    &#xA;    /* frame containing input raw audio */&#xA;    avFrame = av_frame_alloc();&#xA;    &#xA;    avFrame->nb_samples = avCodecContext->frame_size;&#xA;    avFrame->format = avCodecContext->sample_fmt;&#xA;    avFrame->channel_layout = avCodecContext->channel_layout;&#xA;&#xA;    /* allocate the data buffers */&#xA;    av_frame_get_buffer(avFrame, 0);&#xA;}&#xA;&#xA;&#xA;void MediaEncoder::startEncoding() {&#xA;    // set flags for decoding thread&#xA;    signalExitFuture = false;&#xA;&#xA;    encodingFuture = std::async(std::launch::async, &amp;MediaEncoder::startEncoderWorker, this);&#xA;}&#xA;&#xA;void MediaEncoder::stopEncoding() {&#xA;    signalExitFuture = true;&#xA;}&#xA;&#xA;bool MediaEncoder::isEncoding() const {&#xA;    return !signalExitFuture;&#xA;}&#xA;&#xA;void MediaEncoder::encode(AVFrame *frame) {&#xA;    /* send the frame for encoding */&#xA;    ret = avcodec_send_frame(avCodecContext, frame);&#xA;    if (ret &lt; 0) {&#xA;        LOGE("Error sending the frame to the encoder %s",&#xA;             av_err2str(ret));&#xA;        *recorderStatePointer = MediaEncoderState::RUNTIME_FAIL;&#xA;        return;&#xA;    }&#xA;&#xA;    /* read all the available output packets (in general there may be any&#xA;     * number of them */&#xA;    while (ret >= 0) {&#xA;        ret = avcodec_receive_packet(avCodecContext, avPacket);&#xA;        if (ret == AVERROR(EAGAIN) || ret == AVERROR_EOF) {&#xA;            return;&#xA;        } else if (ret &lt; 0) {&#xA;            LOGE("Error encoding audio frame %s",&#xA;                 av_err2str(ret));&#xA;            *recorderStatePointer = MediaEncoderState::RUNTIME_FAIL;&#xA;            return;&#xA;        }&#xA;       &#xA;        /* Solution begins here&#xA;        int aac_profile = 2;           // AAC LC&#xA;        int frequencey_index = 4;      // 44,100Hz&#xA;        int channel_configuration = 2; // stereo (left, right)&#xA;&#xA;        int frame_length = avPacket->size &#x2B; 7;              // your frame length&#xA;     &#xA;        unsigned char adts_header[7];&#xA;&#xA;        // fill in ADTS data&#xA;        adts_header[0] = (unsigned char) 0xFF;&#xA;        adts_header[1] = (unsigned char) 0xF9;&#xA;        adts_header[2] = (unsigned char) (((aac_profile -1) &lt;&lt; 6 ) &#x2B; (frequencey_index &lt;&lt; 2) &#x2B; (channel_configuration >> 2));&#xA;        adts_header[3] = (unsigned char) (((channel_configuration &amp; 3) &lt;&lt; 6) &#x2B; (frame_length >> 11));&#xA;        adts_header[4] = (unsigned char) ((frame_length &amp; 0x7FF) >> 3);&#xA;        adts_header[5] = (unsigned char) (((frame_length &amp; 7) &lt;&lt; 5) &#x2B; 0x1F);&#xA;        adts_header[6] = (unsigned char) 0xFC;&#xA;&#xA;        fwrite(adts_header, 1, 7, file); &#xA;        Solution ends here */ &#xA;        fwrite(avPacket->data, 1, avPacket->size, file);&#xA;        av_packet_unref(avPacket);&#xA;    }&#xA;}&#xA;&#xA;void MediaEncoder::startEncoderWorker() {&#xA;    try {&#xA;        float *leftChannel;&#xA;        float *rightChannel;&#xA;        float val;&#xA;&#xA;        while (!signalExitFuture) {&#xA;            ret = av_frame_make_writable(avFrame);&#xA;            if (ret &lt; 0) {&#xA;                LOGE("av_frame_make_writable Can not Ensure that the frame data is writable. %s",&#xA;                     av_err2str(ret));&#xA;                *recorderStatePointer = MediaEncoderState::RUNTIME_FAIL;&#xA;                return;&#xA;            }&#xA;&#xA;            leftChannel = (float *) avFrame->data[0];&#xA;            rightChannel = (float *) avFrame->data[1];&#xA;&#xA;            for (int32_t i = 0; i &lt; avCodecContext->frame_size; &#x2B;&#x2B;i) {&#xA;               &#xA;                leftChannel[i] = 0.4;&#xA;                rightChannel[i] = 0.4;&#xA;            }&#xA;&#xA;            encode(avFrame);&#xA;        }&#xA;&#xA;        /* flush the encoder */&#xA;        encode(nullptr);&#xA;&#xA;        fclose(file);&#xA;        LOGE("Encoding finished!");&#xA;&#xA;        av_frame_free(&amp;avFrame);&#xA;        av_packet_free(&amp;avPacket);&#xA;        avcodec_free_context(&amp;avCodecContext);&#xA;    } catch (std::exception &amp;e) {&#xA;        LOGE("startEncoderWorker uncaught exception %s", e.what());&#xA;    }&#xA;&#xA;    LOGE("Deleting Media Encoder!");&#xA;&#xA;}&#xA;

    &#xA;

    Here is an recorded 11 seconds of an aac file recorded with real float pcm data rather than 0.4 as it is in the code I posted. Google Drive Link

    &#xA;

    The code above works. Thanks to the legend @Markus-Schumann

    &#xA;

  • Evolution #4063 : Position de la prévisualisation / ergo presentation formulaire forum

    10 mars 2021, par cedric -

    b_b il y a pas de prévisu dans mon screenshot : mon propos c’est que de base le formulaire forum est bien bancal
    - il se prend des margin en cascade sur les fieldset qui laissent des gros espaces blancs
    - toutes les legend sont masquées et c’est du coup à peu près incompréhensible si tu as pas que le textarea (ie si tu as des mots clés notamment)
    - le textarea a été déplacé en bas, mais pas la legend, ou alors du coup c’est les mots clés qui sont plus au bon endroit, et du coup ça a ni queue ni tête si j’affiche les legend (tu as "Votre message", puis les mots clés, puis le textarea)

    - et cerise sur le gateau, quand je scroll pour aller cliquer sur le bouton "prévisualiser", la prévisu apparait en dessous - et donc hors écran chez moi je vois que le haut du fieldset - sans aucun scroll.

    Donc je veux bien qu’on dise "on va tout changer" mais alors please, prenez le temps de tester et d’ajuster visuellement pour les différents cas (avec / sans mot clé, avec/sans le bloc d’URL, avec/sans le bloc "votre nom", avec/sans les documents joints)

    C’est bien chiant, certes, et on est bien d’accord que le scénario nominal c’est plutôt une version simple, mais de là à accepter que ça ait l’air complètement cassé et incompréhensible quand on est dans un autre cas ça me parait pas OK.

    Donc pour moi soit quelqu’un prends le temps de mettre au propre et de remettre ça d’équerre, soit on revert et on revient à ce qu’on avait avant, qui certes n’était pas parfait mais au moins marchait à peu près dans tous les cas...