Recherche avancée

Médias (91)

Autres articles (99)

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

  • Mise à disposition des fichiers

    14 avril 2011, par

    Par défaut, lors de son initialisation, MediaSPIP ne permet pas aux visiteurs de télécharger les fichiers qu’ils soient originaux ou le résultat de leur transformation ou encodage. Il permet uniquement de les visualiser.
    Cependant, il est possible et facile d’autoriser les visiteurs à avoir accès à ces documents et ce sous différentes formes.
    Tout cela se passe dans la page de configuration du squelette. Il vous faut aller dans l’espace d’administration du canal, et choisir dans la navigation (...)

  • ANNEXE : Les plugins utilisés spécifiquement pour la ferme

    5 mars 2010, par

    Le site central/maître de la ferme a besoin d’utiliser plusieurs plugins supplémentaires vis à vis des canaux pour son bon fonctionnement. le plugin Gestion de la mutualisation ; le plugin inscription3 pour gérer les inscriptions et les demandes de création d’instance de mutualisation dès l’inscription des utilisateurs ; le plugin verifier qui fournit une API de vérification des champs (utilisé par inscription3) ; le plugin champs extras v2 nécessité par inscription3 (...)

Sur d’autres sites (9684)

  • ruby on rails carrierwave-video ffmpeg AWS

    11 mars 2015, par Joseph Han Nim Jang

    I am trying to create an academic site where users can upload lecture videos and other users can view them - similar to a site like Udemy.

    I am using Carrierwave, Carrierwave-video (for encoding videos), AWS to make this happen. AWS configuration has been done, and it’s working.

    However, I am getting this error. (By the way, I am testing this video feature in a Yelpdemo site, so I am trying to have users upload videos to restaurants for now.)

    rails points the error to @restaurant = Restaurant.new(restaurant_params)

    Errno::ENOENT in RestaurantsController#create

    No such file or directory - ffmpeg

    # POST /restaurants.json
    def create
    @restaurant = Restaurant.new(restaurant_params)

    respond_to do |format|
     if @restaurant.save

    This is my video_uploader.rb

    # encoding: utf-8

    class VideoUploader < CarrierWave::Uploader::Base

     include CarrierWave::Video
     include CarrierWave::Video::Thumbnailer

     process encode_video: [:mp4]

     include CarrierWave::MiniMagick

     storage :fog

     def store_dir
       "uploads/#{model.class.to_s.underscore}/#{mounted_as}/#{model.id}"
     end

      version :thumb do
         process thumbnail: [{format: 'png', quality: 10, size: 192, strip: true, logger: Rails.logger}]
         def full_filename for_file
           png_name for_file, version_name
         end
     end

       def png_name for_file, version_name
         %Q{#{version_name}_#{for_file.chomp(File.extname(for_file))}.png}
       end
    end

    I have manually (added a file to the model) created video.rb in the model - not sure if this is the right way to do it..

    class Video < ActiveRecord::Base

     attr_accessor :user_id, :video,, :type, :filename, :path, :filesize, :width, :height, :duration, :bit_rate

     belongs_to :restaurant
     belongs_to :user

     mount_uploader :video, VideoUploader
    end

    in app/views/restaurants/show.html.erb for showing the video. Right now, without the encoding done, I can see like an image of the video. When I right lick and copy the code - it gives me the AWS URL which means AWS configuration is in place

           <p>
               <strong>Video:</strong>
               &lt;%= video_tag @restaurant.video_url %>
           </p>

    I am trying to show videos like this.

    I have downloaded FFMPEG (both ffmpeg-2.6 and SnowLeopard_Lion_Mountain_Yosemite_17) - not sure which one’s the right one.. And I have read somewhere that you need to place FFMPEG in your usr/local/bin -> So do you have to physically place ffmpeg exec file in your respective folder ?

    Need your expert help please.

    Thank you in advance !

  • How to use Mozilla DeepSpeech to generate subtitle from video file ?

    31 mars 2022, par SingularitySG

    I'm currently trying to generate subtitles file .srt using Mozilla DeepSpeech libraries.

    &#xA;

    Confusion I'm having :

    &#xA;

    I'm following this guide but I'm completely lost at the part where he uses pyAudioAnalysis to trim out the silence portion of the .wav files.

    &#xA;

    Another is the portion where he processes the audio file via calling the ds model & ds scorer&#xA;I've downloaded both deepspeech-0.9.3-models.scorer and deepspeech-0.9.3-models.pbmm from https://github.com/mozilla/DeepSpeech/releases Do I just reference the model and scorer to the downloaded file path instead ?

    &#xA;

    def ds_process_audio(audio_file, file_handle): &#xA;    ds = Model(ds_model)&#xA;    ds.enableExternalScorer(ds_scorer)&#xA;

    &#xA;

    At the moment, I'm able to extract out .wav files from .mp4, .mkv video format.

    &#xA;

    I've tried pip install pyAudioAnalysis but I'm not sure how to call the functions that are related to it as per his guide in trimming out the silence portion of the .wav file. Below is the code I'm currently working with as of now.

    &#xA;

    video_name = "Videos\Gintama_EP342.mkv"&#xA;audio_name = video_name &#x2B; ".wav"&#xA;&#xA;&#xA;def extractAudio(input_file, audio_file_name):&#xA;    # Extract audio from input video file and save to audio/ in root dir&#xA;    # Args:&#xA;    #    input_file : input video file&#xA;    #    audio_file_name : save audio WAV file with same filename as video file&#xA;&#xA;    command = ["ffmpeg", "-hide_banner", "-loglevel", "warning", "-i", input_file, "-ac", "1", "-ar", "16000", "-vn", "-f", "wav", audio_file_name]    &#xA;    try:&#xA;        ret = sp.call(command, shell=True)&#xA;        print("Extracted audio to audio/{}".format(audio_file_name.split("/")[-1]))&#xA;    except Exception as e:&#xA;        print("Error: ", str(e))&#xA;        exit(1)&#xA;

    &#xA;

    Appreciate any help given. Thank you

    &#xA;

  • How to ensure plt.savefig saves multiple images instead of one ?

    18 mars 2018, par Natalie

    I’m trying to save images after for each iteration to show how my neural network is learning.

    for iterations in range(1,1000):
       model.fit(x_train,
                 y_train,
                 batch_size=20,
                 epochs=1,
                 verbose=2)

    predictions = model.predict(X)
    plt.plot(X,predictions,'o')
    plt.plot(r, morse(r,De,Re,alpha))
    plt.xlabel(r'$r$') # internuclear separation distance
    plt.ylabel(r'$V(r)$') # morse potential energy
    plt.savefig('myfig'+str(iterations))
    plt.clf()

    Originally, I was able to save every image, however, it now only saves the last iteration image only. I wondered how I might be able to solve this issue ?

    Also, related the first question : using the images I’m saving, I’m trying to merge all the images together into a quick movie to show the training process. I’ve been using ffmpeg (see image below for syntax error), but I keep getting syntax errors. Could anyone guide me through what I might be doing wrong ? ffmpeg syntax error I’m getting

    Thanks in advance for helping me out - completely new to machine learning but using it for a university project, so apologies for my lack of understanding/mistakes !!