Recherche avancée

Médias (91)

Autres articles (36)

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

  • 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" ;

  • Other interesting software

    13 avril 2011, par

    We don’t claim to be the only ones doing what we do ... and especially not to assert claims to be the best either ... What we do, we just try to do it well and getting better ...
    The following list represents softwares that tend to be more or less as MediaSPIP or that MediaSPIP tries more or less to do the same, whatever ...
    We don’t know them, we didn’t try them, but you can take a peek.
    Videopress
    Website : http://videopress.com/
    License : GNU/GPL v2
    Source code : (...)

Sur d’autres sites (6561)

  • Acess to path is denied in ffmpeg conversion

    17 décembre 2013, par user1830062

    I have Windows 2008 R2 server, and am trying to convert my videos from any type to mp4 format. Everything is fine when running locally.

    However, when I try to do the same on the live web server, I am able to upload the file, but then when I try to convert the file, it says the file access is denied.

    Steps that I tried to sort but no clue pops the same server.

    1. changed the identity to network service /localhost
    2. gave full permission to the folder
    3. created virtual directory.
    4. impersonation is true.

    I have done all these things, but no response. One thing which I found was for eg :

    c:\inetpub\vhosts\mydomainname\httpdocs\myfolder_to save_uploaded_file

    which is readonly by default, I couldn't change them to all permission. Please advice how to change them to read/write.

    By the way, I am trying to save the converted file to

    c:\inetpub\vhosts\mydomainname\httpdocs\test_folder

  • avcodec/s3tc : fix alpha decoding when dimensions are not a multiple of 4

    7 mai 2015, par Tom Butterworth
    avcodec/s3tc : fix alpha decoding when dimensions are not a multiple of 4
    

    Fix alpha position error for edge blocks of odd-dimensioned frames

    Signed-off-by : Michael Niedermayer <michaelni@gmx.at>

    • [DH] libavcodec/s3tc.c
  • ffmpeg/c++ Encode additional information of video frame with ffmpeg

    29 janvier 2018, par 8793

    I am new with ffmpeg & video encoding, after looking for some related questions on this page, I found this post which is very useful to understand the overview process of ffmpeg.

    However, my work not only needs to manipulate with Mat frame, after extract important information from video (extract edge, position of edge block, type of each edge block, block number, motion vector), I have to encode and send them to client. I tried to find an example code for this part but it seems nobody have done it before.

    My problems is how to encode these additional information along with video frame, and send both to client. I read about Huffman Coding which can help lossless compression, But is it possible encode edge & motion data using huffman coding while encoding video frame using ffmpeg ? I’m doing experiment using udp protocol.

    I can not find any information about this.
    I read into metadata & side information in ffmpeg but it’s not what I want to do.

    I hope if you can give me an advice or a directions to research into this area, so I can understand and try to implement it. If there is any example code for this case, I would be very grateful for your sharing.

    Thank you so much.

    Below is encoder part on server side :

    int encode(Mat&amp; input_frame, EncodedCallback callback, void* userdata = nullptr) {
       AVPacket pkt;
       /* encode 1 second of video */
       av_init_packet(&amp;pkt);
       pkt.data = NULL; // packet data will be allocated by the encoder
       pkt.size = 0;
       int size = 0;
       fflush(stdout);
       cvtFrame2AVFrameYUV420(input_frame, &amp;frame);

       static int time;
       frame->pts = time++;
       /* encode the image */
       ret = avcodec_send_frame(c, frame);
       if (ret &lt; 0) {
           fprintf(stderr, "Error avcodec_send_frame\n");
           exit(1);
       }
       nbFramesEncoded++;
       ret = avcodec_receive_packet(c, &amp;pkt);
       if (!isFirstFrameEmmited) {
           nbNeededFramesInBuffer++;

           printf("nbNeededFramesInBuffer: %d\n", nbNeededFramesInBuffer);
       }
       if (ret &lt; 0) {
           if (ret == -EAGAIN) {
               //output is not available, we must send more input
           } else {
               fprintf(stderr, "Error avcodec_receive_packet %d\n", ret);
               exit(1);
           }
       } else {

           if (callback) {
               callback(pkt, userdata);
           }
           size = pkt.size + 4;
           av_packet_unref(&amp;pkt);
       }

       return size;
    }

    Below is code to handle frame processing (presently we check & send motioned block to client)

    void updateFrame(Mat&amp; frame) {
       //Get all Streams ready
       bool isReady = true;
       if (!frameStreamer->encoder->isFirstFrameEmmited) {
           frameStreamer->sendFrame(frame);
           isReady = false;
       }
       for (int yidx = 0; yidx &lt; gridSize.height; yidx++) {
           for (int xidx = 0; xidx &lt; gridSize.width; xidx++) {
               StreamPtr&amp; stream = streamGrid[yidx][xidx];
               if (!stream->encoder->isFirstFrameEmmited) {
                   Mat block = frame(stream->irect);
                   stream->sendFrame(block);
                   isReady = false;
               }
           }
       }
       if (isReady == false) {
           return;
       }

       if (pGray.empty()) {

           frameStreamer->sendFrame(frame);
           frameStreamer->sendFrame(frame);

           cvtColor(frame, pGray, CV_BGR2GRAY);
           return;
       }

       //Motion Detection
       Mat gray;
       cvtColor(frame, gray, CV_BGR2GRAY);
       Mat diff;
       absdiff(gray, pGray, diff);
       threshold(diff, diff, NOISE_THRESHOLD, 255, CV_THRESH_BINARY);
       if (HEAT_IMAGE) {
           gray.copyTo(diff, diff);
           imshow("Gray", gray);
           threshold(diff, diff, HEAT_THRESH, 255, CV_THRESH_TOZERO);
       }
       if (USE_MORPH_NOISE) {
           Morph_Noise(diff);
       }

       Mat motionImg = Mat::zeros(frameSize, CV_8UC3);
       //Block Classification
       int nbModifiedBlocks = 0;
       for (int yidx = 0; yidx &lt; gridSize.height; yidx++) {
           for (int xidx = 0; xidx &lt; gridSize.width; xidx++) {
               Rect irect(xidx * blockSize.width, yidx * blockSize.height,
                       blockSize.width, blockSize.height);
               int blockDiff = sum(diff(irect))[0];
               if (blockDiff > BLOCK_THRESHOLD * 255) {
                   this->blockCls.at<uchar>(yidx, xidx) = MODI_BLOCK;
                   nbModifiedBlocks++;
               } else {
                   this->blockCls.at<uchar>(yidx, xidx) = SKIP_BLOCK;
               }
           }
       }

       //Send
       if (nbModifiedBlocks > this->nbBlocksThresh) {
           nbSentBytes += this->frameStreamer->sendFrame(frame);
       } else {
           for (int yidx = 0; yidx &lt; gridSize.height; yidx++) {
               for (int xidx = 0; xidx &lt; gridSize.width; xidx++) {
                   uchar cls = this->blockCls.at<uchar>(yidx, xidx);
                   StreamPtr&amp; stream = streamGrid[yidx][xidx];
                   bool send = false;
                   if (cls == MODI_BLOCK) {
                       if (DEBUG_NETWORK) {
                           printf("Normal (%d, %d): ", xidx, yidx);
                       }
                       send = true;
                       stream->encoder->nbFramesBuffered = stream->encoder->nbNeededFramesInBuffer;

                       rectangle(motionImg, stream->irect, Scalar(0, 0, 255), CV_FILLED);

                   } else if (stream->encoder->nbFramesBuffered > 0) {
                       if (DEBUG_NETWORK) {
                           printf("Extra (%d, %d): ", xidx, yidx);
                       }
                       send = true;
                       stream->encoder->nbFramesBuffered--;
                       stream->encoder->nbFlushFrames++;
                       rectangle(motionImg, stream->irect, Scalar(0, 255, 0), CV_FILLED);
                   }

                   if (send) {
                       Mat block = frame(stream->irect);
                       nbSentBytes += stream->sendFrame(block);
                       gray(stream->irect).copyTo(pGray(stream->irect));
                   }
               }
           }
       }
    </uchar></uchar></uchar>

    }