Recherche avancée

Médias (1)

Mot : - Tags -/copyleft

Autres articles (79)

  • Amélioration de la version de base

    13 septembre 2013

    Jolie sélection multiple
    Le plugin Chosen permet d’améliorer l’ergonomie des champs de sélection multiple. Voir les deux images suivantes pour comparer.
    Il suffit pour cela d’activer le plugin Chosen (Configuration générale du site > Gestion des plugins), puis de configurer le plugin (Les squelettes > Chosen) en activant l’utilisation de Chosen dans le site public et en spécifiant les éléments de formulaires à améliorer, par exemple select[multiple] pour les listes à sélection multiple (...)

  • Emballe médias : à quoi cela sert ?

    4 février 2011, par

    Ce plugin vise à gérer des sites de mise en ligne de documents de tous types.
    Il crée des "médias", à savoir : un "média" est un article au sens SPIP créé automatiquement lors du téléversement d’un document qu’il soit audio, vidéo, image ou textuel ; un seul document ne peut être lié à un article dit "média" ;

  • Le plugin : Gestion de la mutualisation

    2 mars 2010, par

    Le plugin de Gestion de mutualisation permet de gérer les différents canaux de mediaspip depuis un site maître. Il a pour but de fournir une solution pure SPIP afin de remplacer cette ancienne solution.
    Installation basique
    On installe les fichiers de SPIP sur le serveur.
    On ajoute ensuite le plugin "mutualisation" à la racine du site comme décrit ici.
    On customise le fichier mes_options.php central comme on le souhaite. Voilà pour l’exemple celui de la plateforme mediaspip.net :
    < ?php (...)

Sur d’autres sites (4451)

  • How do I correctly convert .avi to .flv with ffmpeg ? [closed]

    25 septembre 2012, par terbooter

    UPDATE
    Shame on me )
    I chacked red5 logs again and found that I placed converted files to wrong place.
    Now all works fine

    I have two red5 apps.

    1. Recorder. It can record live stream and save it to flv file to disk

      private void startRecord(String uid, String name, IConnection connection) {
         // Get a reference to the current broadcast stream.
         ClientBroadcastStream stream = (ClientBroadcastStream) this.getBroadcastStream(
                 connection.getScope(), name);
         try {
             // Save the stream to disk.
             String path = uid + "/" + name;
             stream.saveAs(path, true);

             System.out.println("file..:" + stream.getSaveFilename());

         } catch (Exception e) {
             System.out.println("Error while saving stream: " + name + e);
         }
      }

      private void stopRecord(String name) {
         IConnection conn = Red5.getConnectionLocal();
         System.out.println("Stop recording show for: {}" + conn.getScope().getContextPath());

         ClientBroadcastStream stream = (ClientBroadcastStream) this.getBroadcastStream(conn.getScope(), name);
         // Stop recording.
         if (stream != null) {
             stream.stopRecording();
         }
      }
    2. Second red5 app (Chat) streams recorded flv file to flash client

      public static String serverStreamCreate(String path, String streamName) {

         IServerStream serverStream = StreamUtils.createServerStream(Red5.getConnectionLocal().getScope(), streamName);
         SimplePlayItem item = SimplePlayItem.build(path);

         IPlaylistController controller = new MyPlayListController();

         serverStream.setPlaylistController(controller);
         serverStream.setRepeat(false);
         serverStream.addItem(item);
         serverStream.addItem(item);
         serverStream.start();
         return streamName;
      }

    If I record stream from flash client to flv file with Recorder and after that stream this flv file back to client with Chat, all works fine.

    Now I want to convert avi file to flv and stream it from red5 app to flash client.
    I used ffmpeg

    ffmpeg -i 24.avi -ar 22050 -an -f flv -b 500k -s 320x240 -y 24_c.flv

    But if I stream 24_c.flv from Chat app flash client have no video.
    24_c.flv cant be playd by VLC player and have same code information as flv file created by Recorder red5 app.

    I really dont know where to dig.

  • libavcodec decode AVFrames to FIFO buffer

    6 novembre 2012, par user1175197

    My aim is to decode multiple frames of a video file, accumulate the decoded frames into a FIFO buffer and read them later on. I decode the packet to my AVFRame mFrame :

    avcodec_decode_video2(mCodecContext,mFrame,&frameFinished,&mPacket) ;

    Normally I can just copy the YUV frames from the mFrame->data[n][0] to my FIFO buffer but I am just trying to reduce the memcpy 's as much as possible. So instead of copying mFrame->data[n][0] I just want to store the mFrame (which is much smaller than the frames it points to) in the buffer and when it comes to reading I can just fetch it and reach the data.

    I tried to do this but it did not work. The AVFrames are fetched from the buffer but when you show them on the screen the video is like frozen. You may think that I am using the same mFrame and overwriting it each time I decode a packet but I am not. I am creating a new AVFrame* each time in the decode loop.

    Is this problem related to how avcodec works ? Any ideas ?

    Thanks
    mike

  • ffmpeg get RGB values ?

    13 novembre 2012, par Nav

    I've seen this, this and this but I still can't figure out how to get the RGB values from the tutorial code.

    if(avcodec_open(pCodecCtx, pCodec)&lt;0) {_getch();return -1;}
    pFrame = avcodec_alloc_frame();
    pFrameRGB=avcodec_alloc_frame();
    if(pFrameRGB==NULL)    {_getch();return -1;}
    numBytes=avpicture_get_size(PIX_FMT_RGB24, pCodecCtx->width, pCodecCtx->height);
    buffer=(uint8_t *)av_malloc(numBytes*sizeof(uint8_t));
    // Assign appropriate parts of buffer to image planes in pFrameRGB
    avpicture_fill((AVPicture *)pFrameRGB, buffer, PIX_FMT_RGB24, pCodecCtx->width, pCodecCtx->height);

    i=0;
    int framecounter=0;
    while(av_read_frame(pFormatCtx, &amp;packet)>=0)
    {
     if(packet.stream_index==videoStream)
       {
         // Decode video frame
         //int avcodec_decode_video2(AVCodecContext *avctx, AVFrame *picture, int *got_picture_ptr, const AVPacket *avpkt);
         avcodec_decode_video2(pCodecCtx, pFrame, &amp;frameFinished, &amp;packet);

         if(frameFinished)
         {
            // Convert the image from its native format to RGB
        //img_convert((AVPicture *)pFrameRGB, PIX_FMT_RGB24, (AVPicture*)pFrame, pCodecCtx->pix_fmt, pCodecCtx->width, pCodecCtx->height);
            if(++i&lt;=5)  {SaveFrame(pFrameRGB, pCodecCtx->width, pCodecCtx->height, i);}
         }
       }
     av_free_packet(&amp;packet);
    }

    Since img_convert wasn't available, I took it from here but it threw an unhandled exception error. Why is the RGB format so tough to understand ? Why assign zero to G and B of RGB, as shown here ?

    How can I get my RGB values as a simple R, G and B which spans between 0 and 255 ? Also, I don't understand the use of x and y, when video width and height are already given. y is an increment of height, but what about x ?

    Can anyone please show me a complete working code of obtaining rgb values from a video or at least explain how data and linesize help in storing RGB info ? The lack of tutorials is appalling and the complexity of the API is surprising, after having worked on Processing videos.