Recherche avancée

Médias (91)

Autres articles (69)

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

  • ANNEXE : Les plugins utilisés spécifiquement pour la ferme

    5 mars 2010, par

    Le site central/maître de la ferme a besoin d’utiliser plusieurs plugins supplémentaires vis à vis des canaux pour son bon fonctionnement. le plugin Gestion de la mutualisation ; le plugin inscription3 pour gérer les inscriptions et les demandes de création d’instance de mutualisation dès l’inscription des utilisateurs ; le plugin verifier qui fournit une API de vérification des champs (utilisé par inscription3) ; le plugin champs extras v2 nécessité par inscription3 (...)

  • Creating farms of unique websites

    13 avril 2011, par

    MediaSPIP platforms can be installed as a farm, with a single "core" hosted on a dedicated server and used by multiple websites.
    This allows (among other things) : implementation costs to be shared between several different projects / individuals rapid deployment of multiple unique sites creation of groups of like-minded sites, making it possible to browse media in a more controlled and selective environment than the major "open" (...)

Sur d’autres sites (9406)

  • Recording Audio on website : Red5 stream or posting the audio data ?

    7 septembre 2011, par 8vius

    Let me first establish what I want to do :

    My user is able to record voicenotes on my website, add tags to said notes for indexing as well as a title. When the note is saved I save the path of the note along with the other info in my DB.

    Now, I have 2 choices to do the recording, both involve a .swf embedded in my site :

    1) I could use Red5 server to stream the audio to my server and save the file and return the path to said file to my app to do the DB saving, seems rather complicated since I would have to convert the audio and move it to the appropriate folder that belongs to the user in a server side Red5 app, which I'm not very aware of how to build.

    2) I could simply record the audio and grab its byte array, do a Base64 encoding on it and send it to PHP along with the rest of the data that is necessary (be it by a simple POST or an AJAX call), decode it on the server and make the file with the appropriate extension, audio conversion would also occur here using ffmpeg, this option seems simpler but I do not know how viable it is.

    What option would you say is more viable and easier to develop ? Thanks in advance

  • Recording a mp3 stream with FFMPEG and drop-outs

    14 mars 2013, par Rob Oliver

    I hope someone can give me pointer, I have a php script that runs the command below to record an live radio mp3 stream to create hour long mp3 recordings. It works very well for my purpose. The only issue is occasionally no recording is made. As far as I can tell its because the stream has dropped out and ffmpeg just aborts.

    /usr/local/bin/ffmpeg -i http://www.mystream.com:8000/radiostream.mp3 -t 60:00 -acodec copy /var/www/mydomain/audio/".$recorded_audio_title;

    So my question, is there anyway to tell ffmpeg to continuously record for the 60:00 minutes to make a recording even if their are drop outs ? I'd be happy with a odd bit of silence providing it completed the recording.

    I hope this makes sense and I'd appreciate even a pointer to a FFMPEG option or flag. Having Google'd I havnt seen anything that would fit the bill.

    Many thanks in advance

    rob

  • Encoding Raw PCM data to AAC using ffmpeg in Android

    10 janvier 2012, par NISHAnT

    Now, i m using libfaac directly to convert raw PCM data to AAC in JNI. Frames Encoded successfully still bytesWritten is always 0 it means there will b some problem in code Here is my Code.

    JNIEXPORT
    jbyteArray JNICALL Java_com_encodePCMFrame(JNIEnv * env,
       jclass clazz,short* data,jint bitRate,jint sampleSize,jint channelConfig)
    {


     faacEncHandle hEncoder;
       unsigned long samplesInput, maxBytesOutput, totalBytesWritten;
       faacEncConfigurationPtr faacPtr;
       char *faac_id_string;
       char *faac_copyright_string;
       unsigned long inputsamples;
       unsigned long maxoutputbytes;
       unsigned char* bitbuf;
       int bytesWritten;
       jbyteArray AACframe;
       jsize size;


       if(faacEncGetVersion(&faac_id_string, &faac_copyright_string) == FAAC_CFG_VERSION)
       {
         __android_log_print(ANDROID_LOG_VERBOSE, APPNAME, "\nFAAC_ID_STRING %s\n\n ", faac_id_string);
       }


       hEncoder = faacEncOpen(sampleSize, channelConfig,&inputsamples, &maxoutputbytes);

       if(hEncoder)
       {
          __android_log_print(ANDROID_LOG_VERBOSE, APPNAME, "AAC Codec Open (samplesize = %d)\n (channelConfig = %d)\n (input Samples = %d)\n(Max OUTPUT BYTES = %d)\n (bitRate = %d)...",sampleSize,channelConfig,inputsamples,maxoutputbytes,bitRate);
       }


       faacPtr = faacEncGetCurrentConfiguration(hEncoder);

       faacPtr->aacObjectType = MAIN;
       faacPtr->mpegVersion = MPEG2;
       faacPtr->outputFormat = 1; //ADTS
       faacPtr->bitRate = bitRate;
       faacPtr->inputFormat = FAAC_INPUT_16BIT;



       if (faacEncSetConfiguration(hEncoder, faacPtr)==0)
       {
            __android_log_print(ANDROID_LOG_VERBOSE, APPNAME,"fail to set");
            faacEncClose ( hEncoder );
            hEncoder =0;
       }



           bitbuf = (unsigned char*)malloc(maxoutputbytes*sizeof(unsigned char));

          bytesWritten = faacEncEncode(hEncoder,(int32_t *)data,inputsamples,bitbuf,maxoutputbytes);


       if(bytesWritten<=0)
       {
               __android_log_print(ANDROID_LOG_VERBOSE, APPNAME, "Can Not Encode Frame... bytesWritten = %d ",bytesWritten);
               faacEncClose(hEncoder);
       }
       else
       {
              __android_log_print(ANDROID_LOG_VERBOSE, APPNAME, "Bytes Written = %d ",bytesWritten);

              __android_log_print(ANDROID_LOG_VERBOSE, APPNAME, "Encoding frame %d ",bitbuf);
       }


       AACframe = (*env)->NewByteArray(env,maxoutputbytes);

       (*env)->SetByteArrayRegion(env,AACframe, 0,maxoutputbytes, bitbuf);

       __android_log_print(ANDROID_LOG_VERBOSE, APPNAME, "Buffer AAC Frame == %d    Allocated...  Size == %d ",AACframe,maxoutputbytes);


       return AACframe;

       av_free(bitbuf);
       av_free(data);
       (*env)->ReleaseByteArrayElements(env, AACframe, 0, JNI_ABORT);

    }

    Thanks in Advance.