Recherche avancée

Médias (0)

Mot : - Tags -/configuration

Aucun média correspondant à vos critères n’est disponible sur le site.

Autres articles (54)

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

  • Contribute to translation

    13 avril 2011

    You can help us to improve the language used in the software interface to make MediaSPIP more accessible and user-friendly. You can also translate the interface into any language that allows it to spread to new linguistic communities.
    To do this, we use the translation interface of SPIP where the all the language modules of MediaSPIP are available. Just subscribe to the mailing list and request further informantion on translation.
    MediaSPIP is currently available in French and English (...)

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

Sur d’autres sites (8692)

  • Make better marketing decisions with attribution modeling

    19 décembre 2017, par InnoCraft — Community, Plugins

    Do you suspect some traffic sources are not getting the rewards they deserve ? Do you want to know how much credit each of your marketing channel actually gets ?

    When you look at which referrers contribute the most to your goal conversions or purchases, Piwik shows you only the referrer of the last visit. However, in reality, a visitor often visits a website multiple times from different referrers before they convert a goal. Giving all credit to the referrer of the last visit ignores all other referrers that contributed to a conversion as well.

    You can now push your marketing analysis to the next level with attribution modeling and finally discover the true value of all your marketing channels. As a result, you will be able to shift your marketing efforts and spending accordingly to maximize your success and stop wasting resources. In marketing, studying this data is called attribution modeling.

    Get the true value of your referrers

    Attribution is a premium feature that you can easily purchase from the Piwik marketplace.

    Once installed, you will be able to :

    • identify valuable referrers that you did not see before
    • invest in potential new partners
    • attribute a new level of conversion
    • make this work very easily by filling just a couple of form information

    Identify valuable referrers that you did not see before

    You probably have hundreds or even thousands of different sources listed within the referrer reports. We also guess that you have the feeling that it is always the same referrers which are credited of conversions.
    Guess what, those data are probably biased or at least are not telling you the whole story.
    Why ? Because by default, Piwik only attributes all credit to the last referrer.

    It is likely that many non credited sources played a role in the conversion process as well as people often visit your website several times before converting and they may come from different referrers.

    This is exactly where attribution modeling comes into play. With attribution modeling, you can decide which touchpoint you want to study. For example, you can choose to give credit to all the referrers a single visitor came from each time the user visits your website, and not only look at the last one. Without this feature, chances are, that you have spent too much money and / or efforts on the wrong referrer channels in the past because many referrers that contributed to conversions were ignored. Based on the insights you get by applying different attribution models, you can make better decisions on where to shift your marketing spending and efforts.

    Invest in potential new partners

    Once you apply different attribution models, you will find out that you need to consider a new list of referrers which you before either over- or under-estimated in terms of how much they contributed to your conversions. You probably did not identify those sources before because Piwik shows only the last referrer before a conversion. But you can now also look at what these newly discovered referrers are saying about your company, looking for any advertising programs they may offer, getting in contact with the owner of the website, and more.

    Apply up to 6 different attribution models

    By default, Piwik is attributing the conversion to the last referrer only. With attribution modeling you can analyze 6 different models :

    • Last Interaction : the conversion is attributed to the last referrer, even if it is a direct access.
    • Last Non-Direct : the conversion is attributed to the last referrer, but not in the case of a direct access.
    • First Interaction : the conversion is attributed to the first referrer which brought you the visit.
    • Linear : whatever the number of referrers which brought you the conversion, they will all get the same value.
    • Position Based : first and last referrer will be attributed 40% each the conversion value, the remaining 60% is divided between the rest of the referrers.
    • Time Decay : this attribution model means that the closer to the date of the conversion is, the more your last referrers will get credit.

    Those attribution models will enable you to analyze all your referrers deeply and increase your conversions.

    Let’s look at an example where we are comparing two models : “last interaction” and “first interaction”. Our goal is to identify whether some referrers that we are currently considering as less important, are finally playing a serious role in the total amount of conversions :

    Comparing Last Interaction model to First Interaction model

    Here it is interesting to observe that the website www.hongkiat.com is bringing almost 90% conversion more with the first interaction model rather than the last one.

    As a result we can look at this website and take the following actions :

    • have a look at the message on this website
    • look at opportunities to change the message
    • look at opportunities to display extra marketing messages
    • get in contact with the owner to identify any other communication opportunities

    The Multi Channel Attribution report

    Attribution modeling in Piwik does not require you to add any tracking code. The only thing you need is to install the plugin and let the magic happen.
    Simple as pie is the word you should keep in mind for this feature. Once installed, you will find the report within the goal section, just above the goals you created :

    The Multi Attribution menu

    There you can select the attribution model you would like to apply or compare.

    Attribution modeling is not just about playing with a new report. It is above all an opportunity to increase the number of conversions by identifying referrers that you may have not recognized as valuable in the past. To grow your business, it is crucial to identify the most (and least) successful channels correctly so you can spend your time and money wisely.

  • Exit Status with ffmpeg Command in Rails

    25 novembre 2012, par DragonFire353

    I am trying to get uploaded videos to be converted in the background, running windows. I am using :

    gem 'paperclip'
    gem 'aasm'
    gem 'delayed_job_active_record'
    gem 'ffmpeg'

    I was using purely paperclip before and making the user wait and it worked great, now I am having problems with the return of the error status for the command, I have tried editing to possible fix the command wondering if it was failing in the first place but I keep getting :

    undefined method `exitstatus' for nil:NilClass

    no matter what. I've tried looking this up and it's supposedly valid syntax that should work... Also I've commented out the actual spawn do part because I get another error if I leave that in :

    wrong number of arguments

    Does anyone know how to properly get this working ? I've went through a few tutorials that have bits and pieces of what I need but I can't get them working together. Here's what I have so far, lemme know if you need more :

    Model :

       class Video < ActiveRecord::Base
     include AASM

     belongs_to :user
     has_many :comments, dependent: :destroy
     attr_accessible :video, :user_id, :video_file_name, :title, :public, :description, :views

     has_attached_file :video, url: "/users/:user_id/videos/:id/:basename_:style.:extension"
     #, :styles => {
        # :video => { geometry: "800x480>", format: 'webm' },
        # :thumb => { geometry: "200x200>", format: 'png', time: 3 },
      # }, processors: [:ffmpeg], url: "/users/:user_id/videos/:id/:basename_:style.:extension"

     #process_in_background :video #causes death

     validates :video, presence: true
     validates :description, presence: true, length: { minimum: 5, maximum: 100}
     validates :title, presence: true, length: { minimum: 1, maximum: 15 }

     validates_attachment_size :video, less_than: 1.gigabytes
     validates_attachment :video, presence: true

     default_scope order: 'created_at DESC'

     Paperclip.interpolates :user_id do |attachment, style|attachment.instance.user_id
     end

     #acts as state machine plugin
     aasm state: :pending do
      state :pending, initial: true
      state :converting
      state :converted
      #, enter: :set_new_filename
      state :error

       event :convert do
        transitions from: :pending, to: :converting
      end

       event :converted do
        transitions from: :converting, to: :converted
      end

       event :failure do
         transitions from: :converting, to: :error
       end
     end

      # This method is called from the controller and takes care of the converting
     def convert
       self.convert!

       #spawn a new thread to handle conversion
       #spawn do
         success = delay.system(convert_command)
         logger.debug 'Converting File: ' + success.to_s
         if success && $?.exitstatus.to_i == 0
           self.converted!
         else
           self.failure!
         end
       #end
     end

     def self.search(search)
       if search
         find(:all, conditions: ["public = 't' AND title LIKE ?", "%#{search}%"], order: "created_at DESC")
       else
         find(:all, conditions: ["public = 't'"], order: "created_at DESC")
       end
     end

     def self.admin_search(search)
       if search
         find(:all, conditions: ['title LIKE ?', "%#{search}%"], order: "created_at DESC")
       else
         find(:all, order: "created_at DESC")
       end
     end

     private
       def convert_command
         #construct new file extension
         webm =  "." + id.to_s + ".webm"

         #build the command to execute ffmpeg
         command = <<-end_command
           ffmpeg -i #{ RAILS_ROOT + '/public/users/:user_id/videos/:id/:basename_:style.:extension' }  -ar 22050 -ab 32 -s 1280x720 -vcodec webm -r 25 -qscale 8 -f webm -y #{ RAILS_ROOT + '/public/users/:user_id/videos/:id/:basename_.webm' }

         end_command

         logger.debug "Converting video...command: " + command
         command
       end

       handle_asynchronously :convert_command

       # This updates the stored filename with the new flash video file
       def set_new_filename
         #update_attribute(:filename, "#{filename}.#{id}.webm")
         update_attribute(:content_type, "video/x-webm")
       end

    end

    Controller :

    class VideosController < ApplicationController
    before_filter :signed_in_user, only: [:upload, :update, :destroy]
    before_filter :admin_user, only: :admin_index

    def upload
       @video = Video.new
       # generate a unique id for the upload
       @uuid = (0..29).to_a.map {|x| rand(10)}
    end

    def create
       @video = Video.new(params[:video])
       @video.user_id = current_user.id

       if @video.save
           @video.convert
           flash[:success] = "Uploaded Succefully!"
           redirect_to @video.user
       else
           render 'upload'
       end
    end

    def show
       @video = Video.find(params[:id])
       @comments = @video.comments.paginate(page: params[:page], per_page: 6)
       if !@video.public
           if !signed_in? || current_user.id != @video.user_id  && !current_user.admin && !current_user.approved?(@video.user)
           flash[:notice] = "Video is private"
           redirect_to root_path
       end
    end
    end

    def update
       @video = Video.find(params[:id])
       if @video.update_attributes(params[:video])
     flash[:success] = "Video preferences saved"
    else
       flash[:fail] = "Failed to update video preferences"
    end
    redirect_to :back
    end

    def destroy
       @video = Video.find(params[:id])
       @video.destroy
       flash[:deleted] = "Deleted Succefully!"
       redirect_to :back
    end

    def index
       @videos = Video.paginate(page: params[:page], per_page: 6).search(params[:search])
    end

    def admin_index
       @videos = Video.paginate(page: params[:page], per_page: 6).admin_search(params[:search])
    end

    def ajax_video_comments
       @video = Video.find(params[:id])
       @comments = @video.comments.paginate(page: params[:page], per_page: 6)

       respond_to do |format|
       format.js   { render partial: 'shared/comments', content_type: 'text/html' }
    end
    end

    def ajax_video_watched
       @video = Video.find(params[:id])
       @video.views += 1
       @video.save
    end

    private

    def signed_in_user
       redirect_to root_path, notice: "Please Login." unless signed_in?
    end

    def admin_user
       redirect_to(root_path) unless current_user.admin?
    end

    end
  • FFmpeg encoding in c

    25 décembre 2012, par barisatbas

    I have been working on a project about video summarization on android platfrom. and I am stuck in encoding. I think ;
    first I must convert my frame into RGB Frame, then convert that RGB FRame into YUV Frame. Then encode the frame. After this operations, The output video was so weird. I think I missed something. Here is my las optimized code. Maybe someone has an experiement in this subject.

    Its syntax is changed according to android ndk syntax :

    jint Java_com_test_Test_encodeVideo(JNIEnv* env, jobject javaThis)
    {
        char *flname, *err, *info;
        AVCodec *codec;
        AVCodecContext *c= NULL;
        int i,out_size, size, x, y,z, outbuf_size;
        int frameCount=99;
        FILE *f;
        AVFrame *picture, *yuvFrame;
        uint8_t *outbuf, *picture_buf;
        PPMImage *img;
        const char *destfilename = "/sdcard/new.mp4";
        int             numBytes;
        uint8_t         *buffer;

        av_register_all();
        // must be called before using avcodec lib
        avcodec_init();

        // register all the codecs
        avcodec_register_all();
        log_message("Video encoding\n");

        // find the H263 video encoder
        codec = avcodec_find_encoder(CODEC_ID_H263);
        if (!codec) {
            sprintf(err, "codec not found\n");
            log_message(err);
        }

        c= avcodec_alloc_context();
        picture= avcodec_alloc_frame();
        yuvFrame= avcodec_alloc_frame();

        // get first ppm context. it is because I need width and height values.
        img = getPPM("/sdcard/frame1.ppm");

        c->bit_rate = 400000;
        // resolution must be a multiple of two

        c->width = img->x;
        c->height = img->y;
        free(img);
        // frames per second
        c->time_base= (AVRational){1,25};
        c->gop_size = 10; // emit one intra frame every ten frames
        //c->max_b_frames=1;
        c->pix_fmt = PIX_FMT_YUV420P;
        // open it
        if (avcodec_open(c, codec) < 0){
       log_message("codec couldn't open");
       return -1;
        }
        //destfilename = (*env)->GetStringUTFChars(env, dst, 0);
        f = fopen(destfilename, "wb");
        log_message(destfilename);
        if (!f) {
            sprintf(err, "could not open %s", destfilename);
            log_message(err);
        }

        log_message("after destination file opening");
        // alloc image and output buffer
        outbuf_size = 100000;
        outbuf = malloc(outbuf_size);
        size = c->width * c->height;
        picture_buf = malloc(size * 3); // size for RGB
        picture->data[0] = picture_buf;
        picture->data[1] = picture->data[0] + size;
        picture->data[2] = picture->data[1] + size / 4;
        picture->linesize[0] = c->width;
        picture->linesize[1] = c->width / 2;
        picture->linesize[2] = c->width / 2;

        numBytes=avpicture_get_size(PIX_FMT_YUV420P, c->width,
                 c->height);

        buffer=malloc(numBytes);

             // Assign appropriate parts of buffer to image planes in FrameYUV
        avpicture_fill((AVPicture *)yuvFrame, buffer, PIX_FMT_YUV420P,
                 c->width, c->height);
        // encode the video
        log_message("before for loop");
        for(z=1;zsdcard/frame%d.ppm",z);
                            // read the ppm file
                            img = getPPM(flname);
                            picture->data[0] = img->data;
                            // convert the rgb frame into yuv frame
                            rgb2yuv(picture,yuvFrame,c);
                            log_message("translation completed.");
                            // encode the image
                            out_size = avcodec_encode_video(c, outbuf, outbuf_size, yuvFrame);
                            sprintf(info,"encoding frame %3d (size=%5d)\n", z, out_size);
                            log_message(info);
                            fwrite(outbuf, 1, out_size, f);
                            free(img);
        }

        // get the delayed frames
        for(; out_size; i++) {
            //fflush(stdout);
            out_size = avcodec_encode_video(c, outbuf, outbuf_size, NULL);
            sprintf(info,"write frame %3d (size=%5d)\n", i, out_size);
                log_message(info);
            fwrite(outbuf, 1, out_size, f);
        }

        // add sequence end code to have a real mpeg file
        outbuf[0] = 0x00;
        outbuf[1] = 0x00;
        outbuf[2] = 0x01;
        outbuf[3] = 0xb7;
        fwrite(outbuf, 1, 4, f);
        fclose(f);
        free(picture_buf);
        free(outbuf);

        avcodec_close(c);
        av_free(c);
        av_free(picture);
        av_free(yuvFrame);
    }

    int rgb2yuv(AVFrame *frameRGB, AVFrame *frameYUV, AVCodecContext *c)
    {
           char *err;
           static struct SwsContext *img_convert_ctx;


           log_message("conversion starts");
           // Convert the image into YUV format from RGB format
           if(img_convert_ctx == NULL) {
                   int w = c->width;
                   int h = c->height;

                   img_convert_ctx = sws_getContext(w, h, PIX_FMT_RGB24,w, h, c->pix_fmt, SWS_BICUBIC,NULL, NULL, NULL);

                   if(img_convert_ctx == NULL) {
                           sprintf(err, "Cannot initialize the conversion context!\n");
                           log_message(err);
                           return -1;
                   }
           }
     int ret = sws_scale(img_convert_ctx,frameRGB->data, frameRGB->linesize , 0,c->height,frameYUV->data, frameYUV->linesize );
           return;
    }