Recherche avancée

Médias (0)

Mot : - Tags -/metadatas

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

Autres articles (67)

  • MediaSPIP v0.2

    21 juin 2013, par

    MediaSPIP 0.2 est la première version de MediaSPIP stable.
    Sa date de sortie officielle est le 21 juin 2013 et est annoncée ici.
    Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
    Comme pour la version précédente, il est nécessaire d’installer manuellement l’ensemble des dépendances logicielles sur le serveur.
    Si vous souhaitez utiliser cette archive pour une installation en mode ferme, il vous faudra également procéder à d’autres modifications (...)

  • MediaSPIP version 0.1 Beta

    16 avril 2011, par

    MediaSPIP 0.1 beta est la première version de MediaSPIP décrétée comme "utilisable".
    Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
    Pour avoir une installation fonctionnelle, il est nécessaire d’installer manuellement l’ensemble des dépendances logicielles sur le serveur.
    Si vous souhaitez utiliser cette archive pour une installation en mode ferme, il vous faudra également procéder à d’autres modifications (...)

  • Les autorisations surchargées par les plugins

    27 avril 2010, par

    Mediaspip core
    autoriser_auteur_modifier() afin que les visiteurs soient capables de modifier leurs informations sur la page d’auteurs

Sur d’autres sites (7387)

  • Anomalie #2910 (Nouveau) : Erreur 404 après redirection après message forum ds un site avec URLs a...

    29 novembre 2012, par Joachim SENE

    Mon site est en URLs arbo. Je saisi un nouveau message dans le forum d’un article. Je prévisualise. Je valide. Je me retrouve sur une 404 et l’URL au lieu d’être monsite.net/ma-rubrique/article/le-titre#forum123 est monsite.net/ma-rubrique/article/le-titre/ma-rubrique/article/le-titre#forum123 (...)

  • Anomalie #3437 (Fermé) : Le message d’erreur est incorrect sur la limitation de taille

    30 octobre 2015

    corrigé par http://zone.spip.org/trac/spip-zone/changeset/92550

    d’ailleurs le message ne devrait plus trop apparaitre car si on active l’option de miniature d’images, le plugin medias réduit les images à la taille de la constante au lieu d’afficher le message d’erreur comme avant.

  • Background Video Processing with Rails

    23 octobre 2013, par Matthew Snyder

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

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

    I have edited the registry to allow the ffmpeg command to be ran from anywhere, I get a popup that I assume is ffmpeg because it goes away too quickly, guess the command is wrong so if anyone knows what's wrong with it please let me know. But the real problem is that it just hangs there, it says :

    [2012-12-09 22:47:03] ERROR invalid body size.
    [2012-12-09 22:47:03] ERROR Errno::ECONNABORTED: An established connection was a
    borted by the software in your host machine.
           C:/RailsInstaller/Ruby1.9.3/lib/ruby/1.9.1/webrick/httpresponse.rb:396:i
    n `write'
           C:/RailsInstaller/Ruby1.9.3/lib/ruby/1.9.1/webrick/httpresponse.rb:396:i
    n `<<'
           C:/RailsInstaller/Ruby1.9.3/lib/ruby/1.9.1/webrick/httpresponse.rb:396:i
    n `_write_data'
           C:/RailsInstaller/Ruby1.9.3/lib/ruby/1.9.1/webrick/httpresponse.rb:368:i
    n `send_body_string'
           C:/RailsInstaller/Ruby1.9.3/lib/ruby/1.9.1/webrick/httpresponse.rb:249:i
    n `send_body'
           C:/RailsInstaller/Ruby1.9.3/lib/ruby/1.9.1/webrick/httpresponse.rb:152:i
    n `send_response'
           C:/RailsInstaller/Ruby1.9.3/lib/ruby/1.9.1/webrick/httpserver.rb:110:in
    `run'
           C:/RailsInstaller/Ruby1.9.3/lib/ruby/1.9.1/webrick/server.rb:191:in `blo
    ck in start_thread'

    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

     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"

     #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

     #before_post_process do |video|
      # false if video.status == "converting"
     #end

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

       end_command
       success = system(command)
       logger.debug 'Converting File: ' + success.to_s
       if success && $?.exitstatus.to_i == 0
         #self.converted!
         self.status = "converted"
       else
         #self.failure!
         self.status = "failed"
       end
     end

     handle_asynchronously :perform

     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

       # 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.delay.perform
               flash[:success] = "Uploaded Succefully!"
               redirect_to @video.user
               Delayed::Worker.new.start
           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