
Recherche avancée
Autres articles (14)
-
MediaSPIP Core : La Configuration
9 novembre 2010, parMediaSPIP 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 (...) -
Configuration spécifique d’Apache
4 février 2011, parModules spécifiques
Pour la configuration d’Apache, il est conseillé d’activer certains modules non spécifiques à MediaSPIP, mais permettant d’améliorer les performances : mod_deflate et mod_headers pour compresser automatiquement via Apache les pages. Cf ce tutoriel ; mode_expires pour gérer correctement l’expiration des hits. Cf ce tutoriel ;
Il est également conseillé d’ajouter la prise en charge par apache du mime-type pour les fichiers WebM comme indiqué dans ce tutoriel.
Création d’un (...) -
Multilang : améliorer l’interface pour les blocs multilingues
18 février 2011, parMultilang est un plugin supplémentaire qui n’est pas activé par défaut lors de l’initialisation de MediaSPIP.
Après son activation, une préconfiguration est mise en place automatiquement par MediaSPIP init permettant à la nouvelle fonctionnalité d’être automatiquement opérationnelle. Il n’est donc pas obligatoire de passer par une étape de configuration pour cela.
Sur d’autres sites (3124)
-
My Raspberry pi doesnt capture frames even though pi cam is detected in index 0
1er mars 2024, par Yassine BenkhaloukI'm using Raspberry Pi 4 Model B with Pi camera module v3, I'm trying to launch an RTSP stream server that streams camera feed, I've been using this RTSP library, when I run the server script :


import cv2
from zephyr import Stream

if __name__ == "__main__":
 stream = Stream(
 url="rtsp://localhost:8554/test",
 resolution=(1280, 720),
 fps=30,
 bitrate="2M"
 )

 cap = cv2.VideoCapture(0)
 while True:
 ret, frame = cap.read()
 stream.send(frame)



I get :


Traceback (most recent call last):
 File "/home/pi/testserver1.py", line 15, in <module>
 stream.send(frame)
 File "/home/pi/innov/venv/lib/python3.11/site-packages/zephyr/stream/stream.py", line 174, in send
 frame = cv2.resize(frame, self.resolution)
 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
cv2.error: OpenCV(4.8.1) /io/opencv/modules/imgproc/src/resize.cpp:4062: error: (-215:Assertion failed) !ssize.empty() in function 'resize'
</module>


even though my camera is detected :


(venv) pi@YassinePi:~ $ libcamera-still --list-cameras
Available cameras
-----------------
0 : imx708 [4608x2592 10-bit RGGB] (/base/soc/i2c0mux/i2c@1/imx708@1a)
 Modes: 'SRGGB10_CSI2P' : 1536x864 [120.13 fps - (768, 432)/3072x1728 crop]
 2304x1296 [56.03 fps - (0, 0)/4608x2592 crop]
 4608x2592 [14.35 fps - (0, 0)/4608x2592 crop]



I've tried changing the index from 1,-1,2 didn't work


I think it may be because this code is designed for desktop computers, or I didn't install the required packages correctly


For the second reason since I don't have experience with Raspbian OS, I reinstalled the OS and installed the packages all over again, still doesn't work.


Any idea how to solve this issue ? Or there is an alternative way to do this ?


-
Getting error on video with Ruby on Rails 4 App
30 avril 2016, par D.GravesSo this is the error I get right after I try and upload my video
This is my post show
<%= video_tag @post.video.url(:medium), controls: true, style: "max-width: 100%;" %>
<p>
<strong>Description:</strong>
<%= @post.description %>
</p>
<% if @post.user == current_user %>
<%= link_to 'Edit', edit_post_path(@post) %>
<% end %>|
<%= link_to 'Back', posts_path %>This is my post model
class Post < ActiveRecord::Base
belongs_to :user
has_attached_file :video, styles: {
:medium => {
:geometry => "640x480",
:format => 'mp4'
},
:thumb => { :geometry => "160x120", :format => 'jpeg', :time => 10}
}, :processors => [:transcoder]
validates_attachment_content_type :video, content_type: /\Avideo\/.*\Z/
endI am curious if anyone has run into this before and I am wondering if I can get any help on how to fix this. I am using paperclip av-transcoder gem, ffmpeg and paperclip gem. I can add any more information if needed
Here is my post controller if this helps
def index
@posts = Post.all
end
def show
end
def new
@post = current_user.posts.build
end
def edit
end
def create
@post = current_user.posts.build(post_params)
if @post.save
redirect_to @post, notice: 'Post was successfully created.'
else
render :new
end
end
def update
if @post.update(post_params)
redirect_to @post, notice: 'Post was successfully updated.'
else
render :edit
end
end
def destroy
@post.destroy
redirect_to posts_url
end
private
def set_post
@post = Post.find_by(id: params[:id])
end
def correct_user
@post = current_user.posts.find_by(id: params[:id])
redirect_to posts_path, notice: "Not authorized to edit this post" if @post.nil?
end
def post_params
params.require(:post).permit(:description, :video)
end
end -
Rails 3 : How can I make Paperclip-FFMPEG work ?
9 novembre 2011, par reminoI have Rails 3.0.3 with these gems :
- delayed_job 2.1.4
- delayed_paperclip 0.7.1
- paperclip 2.3.16
- paperclip-ffmpeg 0.7.0
(This combination is very specific. Some newer gems will not work with others.)
Here's my Video model :
class Video < Upload
has_attached_file :file, :default_style => :view, :processors => [:ffmpeg],
:url => '/system/:class/:attachment/:id/:style/:basename.:extension',
:path => ':rails_root/public/system/:class/:attachment/:id/:style' \
+ '/:basename.:extension',
:default_url => '/images/en/processing.png',
:styles => {
:mp4video => { :geometry => '520x390', :format => 'mp4',
:convert_options => { :output => { :vcodec => 'libx264',
:vpre => 'ipod640', :b => '250k', :bt => '50k',
:acodec => 'libfaac', :ab => '56k', :ac => 2 } } },
:oggvideo => { :geometry => '520x390', :format => 'ogg',
:convert_options => { :output => { :vcodec => 'libtheora',
:b => '250k', :bt => '50k', :acodec => 'libvorbis',
:ab => '56k', :ac => 2 } } },
:view => { :geometry => '520x390', :format => 'jpg', :time => 1 },
:preview => { :geometry => '160x120', :format => 'jpg', :time => 1 }
}
validates_attachment_content_type :file, :content_type => VIDEOTYPES,
:if => Proc.new { |upload| upload.file.file? }
process_in_background :file
endWhen creating a new Video object with attachment, the original is saved, but no conversion will be done. Even calling
Video.last.file.reprocess!
won't to a thing except returningtrue
. (Not sure what "true" means in this case as it didn't work.)I tried hardcoding the path to ffmpeg in
Paperclip::options[:command_path]
. I even tried deleting the paperclip-ffmpeg.rb file and replacing it with a blank file. Really thinking I'd get an exception by doing the later, instead, I simply got "true" again.It feels like the paperclip-ffmpeg.rb is being loaded, because it is required by
config/application.rb
, but nothing is called in it when trying to generate a thumbnail or convert a video.Can anyone help me with this ? Thanks in advance !