
Recherche avancée
Autres articles (28)
-
Les autorisations surchargées par les plugins
27 avril 2010, parMediaspip core
autoriser_auteur_modifier() afin que les visiteurs soient capables de modifier leurs informations sur la page d’auteurs -
HTML5 audio and video support
13 avril 2011, parMediaSPIP uses HTML5 video and audio tags to play multimedia files, taking advantage of the latest W3C innovations supported by modern browsers.
The MediaSPIP player used has been created specifically for MediaSPIP and can be easily adapted to fit in with a specific theme.
For older browsers the Flowplayer flash fallback is used.
MediaSPIP allows for media playback on major mobile platforms with the above (...) -
De l’upload à la vidéo finale [version standalone]
31 janvier 2010, parLe chemin d’un document audio ou vidéo dans SPIPMotion est divisé en trois étapes distinctes.
Upload et récupération d’informations de la vidéo source
Dans un premier temps, il est nécessaire de créer un article SPIP et de lui joindre le document vidéo "source".
Au moment où ce document est joint à l’article, deux actions supplémentaires au comportement normal sont exécutées : La récupération des informations techniques des flux audio et video du fichier ; La génération d’une vignette : extraction d’une (...)
Sur d’autres sites (2628)
-
Uploading videos on rails website
16 mai 2017, par DinukapereraI am trying to let my users upload videos on my website(not deployed yet, testing locally). I have it set up in a manner where if the "user information" gets saved, it will take them to the "root_path", which is the homepage. If the user information is not saved, it will render the form again. Before I added the video upload feature, all the information got saved and everything worked well, but after adding the feature, it keeps rendering the same form over and over again since the information is not getting saved. How do I check what’s wrong ? The command line gives me this error :
The user information form partial :
`<%= simple_form_for @userinfo do |f| %>
<%= f.input :name, label: 'Full name', error: 'Full name is mandatory' %>
<%= f.input :username, label: 'Username', error: 'Username is mandatory, please specify one' %>
<%= f.input :school, label: 'Name of college' %>
<%= f.input :gpa, label: 'Enter GPA' %>
<%= f.input :email, label: 'Enter email address' %>
<%= f.input :number, label: 'Phone number' %>
<%= f.file_field :video %>
<%= f.button :submit %>
<% end %>`
My user controller (This is the user information controller, does not control user email and password. I’m using the devise gem for user sign in, sign out, and sign up) :`
class UsersController < ApplicationController
def index
end
def show
end
def new
@userinfo = User.new
end
def create
@userinfo = User.new(user_params)
if @userinfo.save
redirect_to root_path
else
render 'new'
end
end
def edit
end
def update
end
def destroy
end
private
def user_params
params.require(:user).permit(:name, :username, :email, :number, :school, :gpa, :major, :video)
end
end`
This is the user model (usermain is the model related to user password and email. The user information in the user model belongs to the usermain) : `
class User < ActiveRecord::Base
belongs_to :usermain
has_attached_file :video, styles: {:video_show => {:geometry => "640x480",:format => 'mp4'},:video_index => { :geometry => "160x120", :format => 'jpeg', :time => 10}}, :processors => [:transcoder]
validates_attachment_content_type :video, content_type: /\Avideo\/.*\Z/
end`
This is the migration file that creates the user information table :`
class CreateUsers < ActiveRecord::Migration
def change
create_table :users do |t|
t.string :name
t.string :username
t.string :email
t.string :number
t.string :school
t.string :gpa
t.string :major
t.timestamps null: false
end
end
endThis is adding the "video" field to the above created user information table:
class AddAttachmentVideoToUsers < ActiveRecord::Migration
def self.up
change_table :users do |t|
t.attachment :video
end
end
def self.down
remove_attachment :users, :video
end
end`
I also have paperclip and ffmpeg installed. When I say installed, it’s literally just that. I’m not sure if I have to manipulate paperclip or ffmpeg in any way to make it work with the videos, I have just installed and did nothing else with them. I have been pulling my hair out for the past two days. Any help is appreciated.
-
How to install opencv_contrib on Windows ?
6 mai 2017, par How to codeI want to use the
function createFisherFaceRecognizer()
in python,but when I wrote downmodel = cv2.createFisherFaceRecognizer()
orcv2.face.createFisherFaceRecognizer()
Error will occurs :Traceback (most recent call last) :
File "C :\Users\Administrator\Desktop\My projects\test\RecognizeMe.py", line 5, in
model = cv2.face.createFisherFaceRecognizer()
AttributeError : ’module’ object has no attribute ’face’I referenced the methods online and found that I should install opencv_contrib.But I was stucked when I was configureing the opencv using CMake.
Error :CMake Error at cmake/OpenCVUtils.cmake:895 (file) : file DOWNLOAD
HASH mismatchfor file: [E:/opencv-3.1.0/sources/opencv-3.1.0/3rdparty/ffmpeg/downloads/35fe6ccdda6d7a04e9056b0d73b98e76/opencv_ffmpeg_64.dll]
expected hash: [35fe6ccdda6d7a04e9056b0d73b98e76]
actual hash: [5171a37169c5e695c556c85dc3103d13]
status: [28;"Timeout was reached"]Call Stack (most recent call first) : 3rdparty/ffmpeg/ffmpeg.cmake:15
(ocv_download) cmake/OpenCVFindLibsVideo.cmake:206 (include)
CMakeLists.txt:536 (include)CMake Error at cmake/OpenCVUtils.cmake:899 (message) : Failed to
download opencv_ffmpeg_64.dll. Status=28 ;"Timeout was reached" Call
Stack (most recent call first) : 3rdparty/ffmpeg/ffmpeg.cmake:15
(ocv_download) cmake/OpenCVFindLibsVideo.cmake:206 (include)
CMakeLists.txt:536 (include)How to solve this problem ?Thank you for your answer !
-
Convert a 3d graphic into rgb array
22 avril 2017, par Praveen C. NaikIm working on a project that has 3d led cube (256*256*256).What software do i use to design the 3D model and for projecting the same on the LED cube.The LED used is RGB but the answer need not be for RGB. Even monochromatic LED is also fine.
Ive tried checking for MATLAB , FFMPG , OPENCV and AUTOCAD.But none of then help.Objective : CREATE 3D MODEL => GENERATE MATRIX/ARRAY of colors => Project the matrix onto LED cube.
The generator has to be dynamic such that any changes in to 3d model should reflect on the LED cube.Any well known simulator as such is encouraged.Please count on the above mentioned software if they can do the same, image processing through matlab/opencv is new for me.Input file : graphic 3D model drawn.
Output file : array of representation of color(any).