Recherche avancée

Médias (1)

Mot : - Tags -/biomaping

Autres articles (73)

  • La file d’attente de SPIPmotion

    28 novembre 2010, par

    Une file d’attente stockée dans la base de donnée
    Lors de son installation, SPIPmotion crée une nouvelle table dans la base de donnée intitulée spip_spipmotion_attentes.
    Cette nouvelle table est constituée des champs suivants : id_spipmotion_attente, l’identifiant numérique unique de la tâche à traiter ; id_document, l’identifiant numérique du document original à encoder ; id_objet l’identifiant unique de l’objet auquel le document encodé devra être attaché automatiquement ; objet, le type d’objet auquel (...)

  • Publier sur MédiaSpip

    13 juin 2013

    Puis-je poster des contenus à partir d’une tablette Ipad ?
    Oui, si votre Médiaspip installé est à la version 0.2 ou supérieure. Contacter au besoin l’administrateur de votre MédiaSpip pour le savoir

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

Sur d’autres sites (7387)

  • ffmpeg : fix sws_dict leak on error exit

    16 janvier 2016, par Michael Niedermayer
    ffmpeg : fix sws_dict leak on error exit
    

    Fixes : 1b79b985cdf860ffa228c00ee5497051/signal_sigsegv_1f99d24_3549_86d92054a79f6ff900fbaf03f8012b32.aif

    Found-by : Mateusz "j00ru" Jurczyk and Gynvael Coldwind
    Signed-off-by : Michael Niedermayer <michael@niedermayer.cc>

    • [DH] ffmpeg.c
  • 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 &#39;paperclip&#39;
    gem &#39;aasm&#39;
    gem &#39;delayed_job_active_record&#39;
    gem &#39;ffmpeg&#39;

    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&#39; 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 &lt; 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: &#39;webm&#39; },
        # :thumb => { geometry: "200x200>", format: &#39;png&#39;, 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: &#39;created_at DESC&#39;

     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 &#39;Converting File: &#39; + success.to_s
         if success &amp;&amp; $?.exitstatus.to_i == 0
           self.converted!
         else
           self.failure!
         end
       #end
     end

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

     def self.admin_search(search)
       if search
         find(:all, conditions: [&#39;title LIKE ?&#39;, "%#{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 = &lt;&lt;-end_command
           ffmpeg -i #{ RAILS_ROOT + &#39;/public/users/:user_id/videos/:id/:basename_:style.:extension&#39; }  -ar 22050 -ab 32 -s 1280x720 -vcodec webm -r 25 -qscale 8 -f webm -y #{ RAILS_ROOT + &#39;/public/users/:user_id/videos/:id/:basename_.webm&#39; }

         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 &lt; 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 &#39;upload&#39;
       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  &amp;&amp; !current_user.admin &amp;&amp; !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: &#39;shared/comments&#39;, content_type: &#39;text/html&#39; }
    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
  • Taking time in Process.waitForExit() after exit ffmpeg console process

    28 février 2017, par IPS

    I am working on video recording using ffmpeg. In that I am facing issue like after completion of video recording process ffmpeg console exit immediate but in application it is taking some time to get control in executing next statement. I am getting difference in ffmpeg execution time and process execution time.

    Can anyone having idea why process execution taking time and how I can get the both value same. I start ffmpeg process as follow :

    ProcessStartInfo processStartInfo = new ProcessStartInfo("ffmpeg exe path", profile_new_parameters);
    processStartInfo.WorkingDirectory = Path.GetDirectoryName("ffmpeg exe path");