Recherche avancée

Médias (91)

Autres articles (89)

  • Le profil des utilisateurs

    12 avril 2011, par

    Chaque utilisateur dispose d’une page de profil lui permettant de modifier ses informations personnelle. Dans le menu de haut de page par défaut, un élément de menu est automatiquement créé à l’initialisation de MediaSPIP, visible uniquement si le visiteur est identifié sur le site.
    L’utilisateur a accès à la modification de profil depuis sa page auteur, un lien dans la navigation "Modifier votre profil" est (...)

  • Configurer la prise en compte des langues

    15 novembre 2010, par

    Accéder à la configuration et ajouter des langues prises en compte
    Afin de configurer la prise en compte de nouvelles langues, il est nécessaire de se rendre dans la partie "Administrer" du site.
    De là, dans le menu de navigation, vous pouvez accéder à une partie "Gestion des langues" permettant d’activer la prise en compte de nouvelles langues.
    Chaque nouvelle langue ajoutée reste désactivable tant qu’aucun objet n’est créé dans cette langue. Dans ce cas, elle devient grisée dans la configuration et (...)

  • La sauvegarde automatique de canaux SPIP

    1er avril 2010, par

    Dans le cadre de la mise en place d’une plateforme ouverte, il est important pour les hébergeurs de pouvoir disposer de sauvegardes assez régulières pour parer à tout problème éventuel.
    Pour réaliser cette tâche on se base sur deux plugins SPIP : Saveauto qui permet une sauvegarde régulière de la base de donnée sous la forme d’un dump mysql (utilisable dans phpmyadmin) mes_fichiers_2 qui permet de réaliser une archive au format zip des données importantes du site (les documents, les éléments (...)

Sur d’autres sites (12859)

  • Artisan Fatal error when trying to install Laravel FFMpeg

    26 janvier 2017, par Chris Palmer Breuer

    I am trying to include pbmedia/laravel-ffmpeg package in my Laravel app but for some reason when I run composer require pbmedia/laravel-ffmpeg I receive this error :

    composer require pbmedia/laravel-ffmpeg
    Using version ^1.1 for pbmedia/laravel-ffmpeg
    ./composer.json has been updated
    Loading composer repositories with package information
    Updating dependencies (including require-dev)
    Nothing to install or update
    Generating autoload files
    > Illuminate\Foundation\ComposerScripts::postUpdate
    > php artisan optimize
    PHP Fatal error:  Uncaught Symfony\Component\Debug\Exception\FatalThrowableError: Class 'PHPExcel_Shared_Font' not found in /Users/chrisbreuer/code/clooud/config/excel.php:182
    Stack trace:
    #0 /Users/chrisbreuer/code/clooud/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/LoadConfiguration.php(60): require()
    #1 /Users/chrisbreuer/code/clooud/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/LoadConfiguration.php(38): Illuminate\Foundation\Bootstrap\LoadConfiguration->loadConfigurationFiles(Object(Illuminate\Foundation\Application), Object(Illuminate\Config\Repository))
    #2 /Users/chrisbreuer/code/clooud/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(203): Illuminate\Foundation\Bootstrap\LoadConfiguration->bootstrap(Object(Illuminate\Foundation\Application))
    #3 /Users/chrisbreuer/code/clooud/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(267): Illuminate\Foundation\Application->bootstrapWith(Array)
    #4 /Users/chrisbreuer/code/clooud/vendor/laravel/framework/src/Illu in /Users/chrisbreuer/code/clooud/config/excel.php on line 182

    Fatal error: Uncaught Symfony\Component\Debug\Exception\FatalThrowableError: Class 'PHPExcel_Shared_Font' not found in /Users/chrisbreuer/code/clooud/config/excel.php:182
    Stack trace:
    #0 /Users/chrisbreuer/code/clooud/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/LoadConfiguration.php(60): require()
    #1 /Users/chrisbreuer/code/clooud/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/LoadConfiguration.php(38): Illuminate\Foundation\Bootstrap\LoadConfiguration->loadConfigurationFiles(Object(Illuminate\Foundation\Application), Object(Illuminate\Config\Repository))
    #2 /Users/chrisbreuer/code/clooud/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(203): Illuminate\Foundation\Bootstrap\LoadConfiguration->bootstrap(Object(Illuminate\Foundation\Application))
    #3 /Users/chrisbreuer/code/clooud/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(267): Illuminate\Foundation\Application->bootstrapWith(Array)
    #4 /Users/chrisbreuer/code/clooud/vendor/laravel/framework/src/Illu in /Users/chrisbreuer/code/clooud/config/excel.php on line 182
    Script php artisan optimize handling the post-update-cmd event returned with error code 255

    Installation failed, reverting ./composer.json to its original content.

    my composer.json file looks like this :

    {
       "name": "laravel/laravel",
       "description": "The Laravel Framework.",
       "keywords": ["framework", "laravel"],
       "license": "MIT",
       "type": "project",
       "require": {
           "php": ">=5.6.4",
           "laravel/framework": "5.3.*"
       },
       "require-dev": {
           "fzaninotto/faker": "~1.4",
           "mockery/mockery": "0.9.*",
           "phpunit/phpunit": "~5.0",
           "symfony/css-selector": "3.1.*",
           "symfony/dom-crawler": "3.1.*"
       },
       "autoload": {
           "classmap": [
               "database"
           ],
           "psr-4": {
               "App\\": "app/"
           }
       },
       "autoload-dev": {
           "classmap": [
               "tests/TestCase.php"
           ]
       },
       "scripts": {
           "post-root-package-install": [
               "php -r \"file_exists('.env') || copy('.env.example', '.env');\""
           ],
           "post-create-project-cmd": [
               "php artisan key:generate"
           ],
           "post-install-cmd": [
               "Illuminate\\Foundation\\ComposerScripts::postInstall",
               "php artisan optimize"
           ],
           "post-update-cmd": [
               "Illuminate\\Foundation\\ComposerScripts::postUpdate",
               "php artisan optimize"
           ]
       },
       "config": {
           "preferred-install": "dist",
           "sort-packages": true
       }
    }

    Any help would be greatly appreciated !

    Thanks so much,
    Chris

  • Powerpoint can't show a video with headers. I see green screen

    28 novembre 2017, par zinon

    I’ve created a video using ffmpeg that contains headers.

    My script for creating it is :

    ffmpeg.exe -f rawvideo -vcodec rawvideo -s 560x448 -r 40 -pix_fmt yuv420p -i C_L_560x448_40_static_maxSSIM_QP23_B2.yuv -vcodec rawvideo -qscale 0 -filter_complex "drawtext=fontsize=32: fontfile=FreeSerif.ttf: text='SSIM=0.961': x=(w-tw)/2: y=(lh/2): fontcolor=orange, drawtext=fontsize=22: fontfile=FreeSerif.ttf: text='Bitrate≤1800 [1873 kbps], Frame rate≥40 [43.98 fps]': x=(w-tw)/2: y=(lh/2+30): fontcolor=orange : box=1: boxcolor=0x00000099, drawbox=x=80:y=160:w=220:h=135:color=red@0.5" C_L_560x448_40_static_maxSSIM_QP23_B2_new.avi

    Firstly, media player showed it as green screen. I downloaded

    Media Player Codec Pack

    and now show its correclty.

    However, when I insert it in powerpoint 2016 I have the same problem of green screen. Do you know how to fix this ?

    vlc player can play it correctly. Is there any way to change the player of excel and use vlc player instead ?

  • FFMPEG Audio decode and draw waveform

    7 avril 2016, par Haris

    I am trying to decode the audio and draw the waveform using ffmpeg, and the input audio data is AV_SAMPLE_FMT_S16P, basically I am following the tutorial here, and the audio is playing fine with libao. Now I need to plot the waveform using decoded data, currently I am writing left and right channel to separate csv file and plotting on excel. But the waveform is something different from the waveform shown in Audacity using the same audio clip. When I analyzed the value written on csv most of the values are close to maximum of uint16_t(65535), but there are some other lower values, but majority is high peak.

    Here is the source code,

       const char* input_filename="/home/user/Music/Clip.mp3";
       av_register_all();
       AVFormatContext* container=avformat_alloc_context();
       if(avformat_open_input(&container,input_filename,NULL,NULL)<0){
           endApp("Could not open file");
       }

       if(avformat_find_stream_info(container, NULL)<0){
           endApp("Could not find file info");
       }

       av_dump_format(container,0,input_filename,false);

       int stream_id=-1;
       int i;
       for(i=0;inb_streams;i++){
           if(container->streams[i]->codec->codec_type==AVMEDIA_TYPE_AUDIO){
               stream_id=i;
               break;
           }
       }
       if(stream_id==-1){
           endApp("Could not find Audio Stream");
       }

       AVDictionary *metadata=container->metadata;

       AVCodecContext *ctx=container->streams[stream_id]->codec;
       AVCodec *codec=avcodec_find_decoder(ctx->codec_id);

       if(codec==NULL){
           endApp("cannot find codec!");
       }

       if(avcodec_open2(ctx,codec,NULL)<0){
           endApp("Codec cannot be found");
       }



       AVPacket packet;
       av_init_packet(&packet);

       //AVFrame *frame=avcodec_alloc_frame();
       AVFrame *frame=av_frame_alloc();

       int buffer_size=AVCODEC_MAX_AUDIO_FRAME_SIZE+ FF_INPUT_BUFFER_PADDING_SIZE;

       // MSVC can't do variable size allocations on stack, ohgodwhy
       uint8_t *buffer = new uint8_t[buffer_size];
       packet.data=buffer;
       packet.size =buffer_size;

       int frameFinished=0;

       int plane_size;

       ofstream fileCh1,fileCh2;
       fileCh1.open ("ch1.csv");
       fileCh2.open ("ch2.csv");

       AVSampleFormat sfmt=ctx->sample_fmt;

       while(av_read_frame(container,&packet)>=0)
       {

           if(packet.stream_index==stream_id){
               int len=avcodec_decode_audio4(ctx,frame,&frameFinished,&packet);
               int data_size = av_samples_get_buffer_size(&plane_size, ctx->channels,
                                                   frame->nb_samples,
                                                   ctx->sample_fmt, 1);


               if(frameFinished){
                   int write_p=0;
                   // QTime t;
                   switch (sfmt){

                       case AV_SAMPLE_FMT_S16P:

                           for (int nb=0;nbsizeof(uint16_t);nb++){
                               for (int ch = 0; ch < ctx->channels; ch++) {
                                   if(ch==0)
                                       fileCh1 <<((uint16_t *) frame->extended_data[ch])[nb]<<"\n";
                                   else if(ch==1)
                                       fileCh2 <<((uint16_t *) frame->extended_data[ch])[nb]<<"\n";
                               }
                           }

                           break;

                   }
               } else {
                   DBG("frame failed");
               }
           }


           av_free_packet(&packet);
       }
       fileCh1.close();
       fileCh2.close();
       avcodec_close(ctx);
       avformat_close_input(&container);
       delete buffer;
       return 0;

    Edit :

    I have attached the waveform image draw using opencv, here I scaled the sample value to 0-255 range, and took value 127 as 0(Y-axis). Now for each sample draw line from (x,127) to (x,sample value) where x=1,2,3,...

    enter image description here