Recherche avancée

Médias (0)

Mot : - Tags -/masques

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

Autres articles (14)

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

  • Configuration spécifique d’Apache

    4 février 2011, par

    Modules 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, par

    Multilang 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 Benkhalouk

    I'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):&#xA;  File "/home/pi/testserver1.py", line 15, in <module>&#xA;    stream.send(frame)&#xA;  File "/home/pi/innov/venv/lib/python3.11/site-packages/zephyr/stream/stream.py", line 174, in send&#xA;    frame = cv2.resize(frame, self.resolution)&#xA;            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^&#xA;cv2.error: OpenCV(4.8.1) /io/opencv/modules/imgproc/src/resize.cpp:4062: error: (-215:Assertion failed) !ssize.empty() in function &#x27;resize&#x27;&#xA;</module>

    &#xA;

    even though my camera is detected :

    &#xA;

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

    &#xA;

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

    &#xA;

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

    &#xA;

    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.

    &#xA;

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

    &#xA;

  • Getting error on video with Ruby on Rails 4 App

    30 avril 2016, par D.Graves

    So this is the error I get right after I try and upload my video

    enter image description here

    This is my post show

    &lt;%= video_tag @post.video.url(:medium), controls: true, style: "max-width: 100%;" %>

    <p>
     <strong>Description:</strong>
    &lt;%= @post.description %>
    </p>
     &lt;% if @post.user == current_user %>
     &lt;%= link_to 'Edit', edit_post_path(@post) %>
    &lt;% end %>|
    &lt;%= link_to 'Back', posts_path %>

    This is my post model

    class Post &lt; 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/
    end

    I 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 remino

    I 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 &lt; Upload
     has_attached_file :file, :default_style => :view, :processors => [:ffmpeg],
       :url => &#39;/system/:class/:attachment/:id/:style/:basename.:extension&#39;,
       :path => &#39;:rails_root/public/system/:class/:attachment/:id/:style&#39; \
         + &#39;/:basename.:extension&#39;,
       :default_url => &#39;/images/en/processing.png&#39;,
       :styles => {
         :mp4video => { :geometry => &#39;520x390&#39;, :format => &#39;mp4&#39;,
           :convert_options => { :output => { :vcodec => &#39;libx264&#39;,
             :vpre => &#39;ipod640&#39;, :b => &#39;250k&#39;, :bt => &#39;50k&#39;,
             :acodec => &#39;libfaac&#39;, :ab => &#39;56k&#39;, :ac => 2 } } },
         :oggvideo => { :geometry => &#39;520x390&#39;, :format => &#39;ogg&#39;,
           :convert_options => { :output => { :vcodec => &#39;libtheora&#39;,
             :b => &#39;250k&#39;, :bt => &#39;50k&#39;, :acodec => &#39;libvorbis&#39;,
             :ab => &#39;56k&#39;, :ac => 2 } } },
         :view => { :geometry => &#39;520x390&#39;, :format => &#39;jpg&#39;, :time => 1 },
         :preview => { :geometry => &#39;160x120&#39;, :format => &#39;jpg&#39;, :time => 1 }
       }
     validates_attachment_content_type :file, :content_type => VIDEOTYPES,
       :if => Proc.new { |upload| upload.file.file? }
     process_in_background :file
    end

    When 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 returning true. (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 !