Recherche avancée

Médias (91)

Autres articles (103)

  • List of compatible distributions

    26 avril 2011, par

    The table below is the list of Linux distributions compatible with the automated installation script of MediaSPIP. Distribution nameVersion nameVersion number Debian Squeeze 6.x.x Debian Weezy 7.x.x Debian Jessie 8.x.x Ubuntu The Precise Pangolin 12.04 LTS Ubuntu The Trusty Tahr 14.04
    If you want to help us improve this list, you can provide us access to a machine whose distribution is not mentioned above or send the necessary fixes to add (...)

  • MediaSPIP Core : La Configuration

    9 novembre 2010, par

    MediaSPIP Core fournit par défaut trois pages différentes de configuration (ces pages utilisent le plugin de configuration CFG pour fonctionner) : une page spécifique à la configuration générale du squelettes ; une page spécifique à la configuration de la page d’accueil du site ; une page spécifique à la configuration des secteurs ;
    Il fournit également une page supplémentaire qui n’apparait que lorsque certains plugins sont activés permettant de contrôler l’affichage et les fonctionnalités spécifiques (...)

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

Sur d’autres sites (9727)

  • Discovering our premium on-premise features

    28 novembre 2023, par Erin — Community, Plugins

    In our latest release (Matomo 4.16), we’ve enhanced visibility to the premium On-Premise features within Matomo. Now, it’s easier to maximise the potential of your Matomo On-Premise setup while also supporting our open-source project.

    By default, Matomo On-Premise instances will now display available premium features in the left-menu navigation bar. If you prefer, we’ve made it easy to hide or disable the menu items (steps provided below). Note that no features were removed and you still have full access to the same features as before.

    We would encourage you to check out our premium features, as thousands of users already find them powerful additions to their analytics.

    How to hide or disable menu items

    We understand that not everyone will need these premium features listed in their left-menu navigation. That’s why we’ve made it very easy to remove them. 

    • If you prefer not to see these features listed, each user can hide them by clicking the link “hide this section”. This option is available in each of the new feature pages.
    • Alternatively, for administrators wanting to disable these features at an organisational level and for all users at once, you simply need to follow these steps :
      • Login as Super User (to your On-Premise Matomo instance)
      • Go to Administration > System > Plugins
      • Scroll down to the “ProfessionalServices” plugin, and click “Deactivate”

    The revenue from premium features helps us innovate and improve Matomo, fueling our strong commitment to the open-source ethos that’s at the heart of everything we do.

    Explore the complete range of Matomo On-Premise premium features, developed by Matomo and our passionate community, available in our marketplace. Start a 30-day free trial today and unlock a new level of analytics excellence.

  • How to extract grayscale image from a video with ffmpeg-library ?

    9 mars 2016, par user1587451

    I’v compiled and tested this tutorial from here which works just fine. After I tried to edit the tutorial to read/convert frames into grayscale. I just changed pFrameRGB to pFrameGray, PIX_FMT_RGB24 to PIX_FMT_GRAY16 and to save just the 200th frame. It compiles and run but the image don’t show the expected. What’s wrong ?

    The image :
    image

    The edited code :

    #include <libavcodec></libavcodec>avcodec.h>
    #include <libavformat></libavformat>avformat.h>
    #include <libswscale></libswscale>swscale.h>

    #include

    // compatibility with newer API
    #if LIBAVCODEC_VERSION_INT &lt; AV_VERSION_INT(55,28,1)
    #define av_frame_alloc avcodec_alloc_frame
    #define av_frame_free avcodec_free_frame
    #endif

    void SaveFrame(AVFrame *pFrame, int width, int height, int iFrame) {
     FILE *pFile;
     char szFilename[32];
     int  y;

     // Open file
     sprintf(szFilename, "frame%d.ppm", iFrame);
     pFile=fopen(szFilename, "wb");
     if(pFile==NULL)
       return;

     // Write header
     fprintf(pFile, "P6\n%d %d\n255\n", width, height);

     // Write pixel data
     for(y=0; ydata[0]+y*pFrame->linesize[0], 1, width*3, pFile);

     // Close file
     fclose(pFile);
    }

    int main(int argc, char *argv[]) {
     // Initalizing these to NULL prevents segfaults!
     AVFormatContext   *pFormatCtx = NULL;
     int               i, videoStream;
     AVCodecContext    *pCodecCtxOrig = NULL;
     AVCodecContext    *pCodecCtx = NULL;
     AVCodec           *pCodec = NULL;
     AVFrame           *pFrame = NULL;
     AVFrame           *pFrameGRAY = NULL;
     AVPacket          packet;
     int               frameFinished;
     int               numBytes;
     uint8_t           *buffer = NULL;
     struct SwsContext *sws_ctx = NULL;

     if(argc &lt; 2) {
       printf("Please provide a movie file\n");
       return -1;
     }
     // Register all formats and codecs
     av_register_all();

     // Open video file
     if(avformat_open_input(&amp;pFormatCtx, argv[1], NULL, NULL)!=0)
       return -1; // Couldn't open file

     // Retrieve stream information
     if(avformat_find_stream_info(pFormatCtx, NULL)&lt;0)
       return -1; // Couldn't find stream information

     // Dump information about file onto standard error
     av_dump_format(pFormatCtx, 0, argv[1], 0);

     // Find the first video stream
     videoStream=-1;
     for(i=0; inb_streams; i++)
       if(pFormatCtx->streams[i]->codec->codec_type==AVMEDIA_TYPE_VIDEO) {
         videoStream=i;
         break;
       }
     if(videoStream==-1)
       return -1; // Didn't find a video stream

     // Get a pointer to the codec context for the video stream
     pCodecCtxOrig=pFormatCtx->streams[videoStream]->codec;
     // Find the decoder for the video stream
     pCodec=avcodec_find_decoder(pCodecCtxOrig->codec_id);
     if(pCodec==NULL) {
       fprintf(stderr, "Unsupported codec!\n");
       return -1; // Codec not found
     }
     // Copy context
     pCodecCtx = avcodec_alloc_context3(pCodec);
     if(avcodec_copy_context(pCodecCtx, pCodecCtxOrig) != 0) {
       fprintf(stderr, "Couldn't copy codec context");
       return -1; // Error copying codec context
     }

     // Open codec
     if(avcodec_open2(pCodecCtx, pCodec, NULL)&lt;0)
       return -1; // Could not open codec

     // Allocate video frame
     pFrame=av_frame_alloc();

     // Allocate an AVFrame structure
     pFrameGRAY=av_frame_alloc();
     if(pFrameGRAY==NULL)
       return -1;

     // Determine required buffer size and allocate buffer
     numBytes=avpicture_get_size(PIX_FMT_GRAY16, pCodecCtx->width,
                     pCodecCtx->height);
     buffer=(uint8_t *)av_malloc(numBytes*sizeof(uint8_t));

     // Assign appropriate parts of buffer to image planes in pFrameGRAY
     // Note that pFrameGRAY is an AVFrame, but AVFrame is a superset
     // of AVPicture
     avpicture_fill((AVPicture *)pFrameGRAY, buffer, PIX_FMT_GRAY16,
            pCodecCtx->width, pCodecCtx->height);

     // initialize SWS context for software scaling
     sws_ctx = sws_getContext(pCodecCtx->width,
                  pCodecCtx->height,
                  pCodecCtx->pix_fmt,
                  pCodecCtx->width,
                  pCodecCtx->height,
                  PIX_FMT_GRAY16,
                  SWS_BILINEAR,
                  NULL,
                  NULL,
                  NULL
                  );

     // Read frames and save first five frames to disk
     i=0;
     while(av_read_frame(pFormatCtx, &amp;packet)>=0) {
       // Is this a packet from the video stream?
       if(packet.stream_index==videoStream) {
         // Decode video frame
         avcodec_decode_video2(pCodecCtx, pFrame, &amp;frameFinished, &amp;packet);

         // Did we get a video frame?
         if(frameFinished) {
       // Convert the image from its native format to GRAY
       sws_scale(sws_ctx, (uint8_t const * const *)pFrame->data,
             pFrame->linesize, 0, pCodecCtx->height,
             pFrameGRAY->data, pFrameGRAY->linesize);

       // Save the frame to disk
       if(++i==200)
         SaveFrame(pFrameGRAY, pCodecCtx->width, pCodecCtx->height,
               i);
         }
       }

       // Free the packet that was allocated by av_read_frame
       av_free_packet(&amp;packet);
     }

     // Free the GRAY image
     av_free(buffer);
     av_frame_free(&amp;pFrameGRAY);

     // Free the YUV frame
     av_frame_free(&amp;pFrame);

     // Close the codecs
     avcodec_close(pCodecCtx);
     avcodec_close(pCodecCtxOrig);

     // Close the video file
     avformat_close_input(&amp;pFormatCtx);

     return 0;
    }
  • Playing audio file using libavcodec and libao

    21 août 2013, par sarah john

    Myself trying to play an audio file using libavcodec in qt5 .While trying to play i am unable to play the the file.
    while decoding the file using av_read_frame()
    audioStream->index=0
    and packet.stream_index is some higher nos .so avcodec_decode_audio4() is not getting executed.Why is it so ?
    I am getting output as
    My output


    File Opend

    Input #0, ogg, from &#39;/home/tel/Downloads/desktop-login.ogg&#39;:
    Duration: 00:00:07.72, start: 0.000000, bitrate: 108 kb/s
    Stream #0:0: Audio: vorbis, 44100 Hz, stereo, fltp, 112 kb/s
    audioStream 0x88b3f20
    Stream id: 0
    Codec ptr: 0x88b4100
    Codec Opened
    DRIVER ID 1
    Sample format 3
    Sample format:AV_SAMPLE_FMT_FLT 32
    Sample format channels 0
    Sample format rate 0
    Sample format  4
    buffersize  192008

    This is my program. My output is also given below.Please help me in solving this.

    for(i=0; i &lt; container->nb_streams; i++){

       if(container->streams[i]->codec->codec_type==AVMEDIA_TYPE_AUDIO){
            stream_id=i;
            audioStream=container->streams[i];

            qWarning() &lt;&lt;"audioStream"&lt;streams[stream_id]->codec;
    qWarning() &lt;&lt;"Codec ptr:"&lt;&lt; ctx;
    AVCodec *codec=avcodec_find_decoder(ctx->codec_id);
    if(codec==NULL){
           die("cannot find codec!");
    }

    if(avcodec_open2(ctx,codec,NULL)&lt;0){
           die("Codec cannot be opended!");
    }
    else
           qWarning()&lt;&lt;"Codec Opened";


           ao_initialize();
           driver = ao_default_driver_id();
           qWarning()&lt;&lt;"DRIVER ID" &lt;sample_fmt;
           qWarning()&lt;&lt;"Sample format"&lt;channels;
      qWarning()&lt;&lt;"Sample format channels"&lt;sample_rate;
     qWarning()&lt;&lt;"Sample format rate"&lt;codec;
     while(av_read_frame(container,&amp;packet)>=0)
     {

           if(packet.stream_index==audioStream->index){
           len=avcodec_decode_audio4(ctx,frame,&amp;frameFinished,&amp;packet);
           qWarning()&lt;&lt;"Enterd if loop";

           if(frameFinished){
               qWarning()&lt;&lt;"PLAYING";
               ao_play(audio_device, (char*)frame->extended_data[0],frame->linesize[0] );
           }
     }