Recherche avancée

Médias (0)

Mot : - Tags -/xmlrpc

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

Autres articles (29)

  • Gestion générale des documents

    13 mai 2011, par

    MédiaSPIP ne modifie jamais le document original mis en ligne.
    Pour chaque document mis en ligne il effectue deux opérations successives : la création d’une version supplémentaire qui peut être facilement consultée en ligne tout en laissant l’original téléchargeable dans le cas où le document original ne peut être lu dans un navigateur Internet ; la récupération des métadonnées du document original pour illustrer textuellement le fichier ;
    Les tableaux ci-dessous expliquent ce que peut faire MédiaSPIP (...)

  • La file d’attente de SPIPmotion

    28 novembre 2010, par

    Une file d’attente stockée dans la base de donnée
    Lors de son installation, SPIPmotion crée une nouvelle table dans la base de donnée intitulée spip_spipmotion_attentes.
    Cette nouvelle table est constituée des champs suivants : id_spipmotion_attente, l’identifiant numérique unique de la tâche à traiter ; id_document, l’identifiant numérique du document original à encoder ; id_objet l’identifiant unique de l’objet auquel le document encodé devra être attaché automatiquement ; objet, le type d’objet auquel (...)

  • Pas question de marché, de cloud etc...

    10 avril 2011

    Le vocabulaire utilisé sur ce site essaie d’éviter toute référence à la mode qui fleurit allègrement
    sur le web 2.0 et dans les entreprises qui en vivent.
    Vous êtes donc invité à bannir l’utilisation des termes "Brand", "Cloud", "Marché" etc...
    Notre motivation est avant tout de créer un outil simple, accessible à pour tout le monde, favorisant
    le partage de créations sur Internet et permettant aux auteurs de garder une autonomie optimale.
    Aucun "contrat Gold ou Premium" n’est donc prévu, aucun (...)

Sur d’autres sites (5324)

  • FFmpeg Matching decibel level between two audio tracks when mixing ?

    9 août 2022, par JohnWick

    I have a collection of mp3 files for various frequencies (i.e. 528hz). I also have a collection of mp3's of ambient background music. So here is the scenario :

    


    I am mixing the tone frequency mp3's with the music mp3's. This works great using the amix filter, no problem. However, some of the ambient music is quiet, which makes the tones sound overpowering. Conversely, some of the ambient music is also fairly loud, making the tones inaudible.

    


    It seems to me, the solution would be to adjust the volume of the tone to match the decibel level of the associated music track. How can this be done programmatically ? Perhaps parsing the output of a ffprobe call, but at that point I wouldn't quite be sure how to proceed towards my goal. I figured reaching out on Super User might save me a ton of pain, by turning to more experienced ffmpeg users. Maybe my approach is also flawed, and would be happy if someone can suggest a better method to achieve what I am looking for.

    


    Here is my python code so far.

    


    import ffmpeg
import os

tones = os.listdir('tones')
songs = os.listdir('music')

for tone in tones:
    for song in songs:
        tone_in = ffmpeg.input(f'tones/{tone}', stream_loop=-1)
        music_in = ffmpeg.input(f'music/{song}')
        mixed = ffmpeg.filter([tone_in, music_in], 'amix', inputs=2, duration='shortest')
        out = ffmpeg.output(mixed, f'output/{tone} {song}.mp3')
        out.run()


    


  • iPhone - A problem with decoding H264 using ffmpeg

    25 mars 2012, par HAPPY_TIGER

    I am working with ffmpeg to decode H264 stream from server.

    I referenced DecoderWrapper from http://github.com/dropcam/dropcam_for_iphone.

    I compiled it successfully, but I don't know how use it.

    Here are the function that has problem.

    - (id)initWithCodec:(enum VideoCodecType)codecType
            colorSpace:(enum VideoColorSpace)colorSpace
                 width:(int)width
                height:(int)height
           privateData:(NSData*)privateData {
       if(self = [super init]) {

           codec = avcodec_find_decoder(CODEC_ID_H264);
           codecCtx = avcodec_alloc_context();

           // Note: for H.264 RTSP streams, the width and height are usually not specified (width and height are 0).  
           // These fields will become filled in once the first frame is decoded and the SPS is processed.
           codecCtx->width = width;
           codecCtx->height = height;

           codecCtx->extradata = av_malloc([privateData length]);
           codecCtx->extradata_size = [privateData length];
           [privateData getBytes:codecCtx->extradata length:codecCtx->extradata_size];
           codecCtx->pix_fmt = PIX_FMT_YUV420P;
    #ifdef SHOW_DEBUG_MV
           codecCtx->debug_mv = 0xFF;
    #endif

           srcFrame = avcodec_alloc_frame();
           dstFrame = avcodec_alloc_frame();

           int res = avcodec_open(codecCtx, codec);
           if (res < 0)
           {
               NSLog(@"Failed to initialize decoder");
           }
       }

       return self;    
    }

    What is the privateData parameter of this function ? I don't know how to set the parameter...

    Now avcodec_decode_video2 returns -1 ;

    The framedata is coming successfully.

    How solve this problem.

    Thanks a lot.

  • How to create a custom processor for audio files in Ruby on Rails(5) with Paperclip

    17 juillet 2017, par Thomas Roest

    So I’m trying to convert mp3 files into .flac with Paperclip custom processors and ffmpeg. The following code runs the ffmpeg command and creates a temporary flac file. However, it is not saved ? Currently only the original file is saved. What am I missing here ?

    class AudioFile < ApplicationRecord
     has_attached_file :raw_audio, processors: [:custom], styles: { original: {}}

    the custom processor

    module Paperclip
    class Custom < Processor

     def initialize(file, options = {}, attachment = nil)
       super
       @file = file
       @basename = File.basename(@file.path)
       @format = options[:format] || 'flac'
       @params = options[:params] || '-y -i'
     end

     def make
       source = @file
       output = Tempfile.new([@basename, ".#{@format}"])
       begin
         parameters = [@params, ':source',':dest'].join(' ')
         Paperclip.run('ffmpeg', parameters, :source => File.expand_path(source.path), :dest => File.expand_path(output.path), :sample_rate => @sample_rate, :bit_rate => @bit_rate)
       end
      output
     end

    end
    end