Recherche avancée

Médias (91)

Autres articles (46)

  • Publier sur MédiaSpip

    13 juin 2013

    Puis-je poster des contenus à partir d’une tablette Ipad ?
    Oui, si votre Médiaspip installé est à la version 0.2 ou supérieure. Contacter au besoin l’administrateur de votre MédiaSpip pour le savoir

  • HTML5 audio and video support

    13 avril 2011, par

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

  • Possibilité de déploiement en ferme

    12 avril 2011, par

    MediaSPIP peut être installé comme une ferme, avec un seul "noyau" hébergé sur un serveur dédié et utilisé par une multitude de sites différents.
    Cela permet, par exemple : de pouvoir partager les frais de mise en œuvre entre plusieurs projets / individus ; de pouvoir déployer rapidement une multitude de sites uniques ; d’éviter d’avoir à mettre l’ensemble des créations dans un fourre-tout numérique comme c’est le cas pour les grandes plate-formes tout public disséminées sur le (...)

Sur d’autres sites (4023)

  • FFMPEG atrim - concat

    5 décembre 2020, par storror

    I've been trying to process audio stream of videos the following way :
    
Trim out relevant audio from the middle of the audio stream by a given threshold, e.g. -65 dB.
    
After that i process this middle part with a combination of gate, eq, compression, loudnorm.

    


    I want to concat the resulting 3 audio parts (audio before 1 cut, middlepart, audio before end cut) and embed it back into the video.
    
Most of the time the result is satisfying, however if the -65 treshold finds time 0.0, and length of the audio as the two timestamps for the trimmer, the end result is a doubled audio stream.

    


    def write_out_video(in_file, length, out_file, timestamps):
    return ['ffmpeg','-v', 'quiet', '-stats', '-hide_banner', '-i', in_file, '-i', '-', '-filter_complex', '[0:v]null[out2];[0:a]atrim=duration={}[a];\
    [0:a]atrim=start={}:duration={},asetpts=PTS-STARTPTS[b]; [a][1:a][b]concat=n=3:v=0:a=1[out1]'.format(timestamps[0],
    timestamps[1], length - timestamps[1]), '-map', '[out1]', '-map', '[out2]', out_file, '-y']


    


    The received parameters of this function in this case are e.g. : timestamp[0] = 0, timestamps[1] = 100, length = 100.
    
I use pipe to pass the processed audio to the method.

    


    The trimmer method :

    


    def trim_relevant_part(in_file, timestamps):
    return ['ffmpeg', '-v', 'quiet', '-stats', '-i', in_file, '-vn', '-af',
            'atrim=start={}:duration={}, asetpts=PTS-STARTPTS'.format(timestamps[0], timestamps[1] - timestamps[0]), '-f', 'adts', 'pipe:1']


    


    My only solution right now is that I handle those cases differently, when any of the timestamps equals to 0.0 or equals to the length of the audio stream.
    
The in_file contains the original audio stream, so maybe a solution which doesnt trims the original audio streams, only overwrites it between timestamps[0] and timestamps[1] would be a satisfying one.

    


    Any ideas ?

    


  • mp3 to wav with ffmpeg reduces quality and duration

    25 novembre 2020, par Neret

    I took this mp3 file and converted it to wav with Audition and with this ffmpeg command :

    


    ffmpeg -i "Casey Don’t You Fret - Dan Lebowitz.mp3" -c:a pcm_f32le "Casey Don’t You Fret - Dan Lebowitz_FFMPEG.wav"


    


    After that I checked the statistics in Audition. The wav file which was generated with Audition has exactly the same statistics as the original mp3 file.

    


    enter image description here

    


    The duration of ffmpeg file has changed. Audio statistics became worse.
Why is this happening ? Can I fix it ?

    


    I used ffmpeg version 2020-11-22-git-0066bf4d1a-full_build-www.gyan.dev on Windows.

    


    UPDATE 1 :
I cut a few seconds of mp3 at the beginning and at the end :

    


    enter image description here

    


    FFMPEG added silence at the beginning and increased duration.

    


    UPDATE 2 :
Look how ffmpeg changed the waveform of this 2.mp3 file in the middle :

    


    ffmpeg -y -i 2.mp3 -c:a pcm_f32le 2_FFMPEG.wav


    


    enter image description here
enter image description here

    


  • FFMPEG How to insert short video and audio in longer video in specific time, size and position

    24 novembre 2020, par Milos Dimitrijevic

    FFMPEG How to insert short video (4sec) in longer video in specific time (from 15th to 19th second) and specific size. Long video is 1920x1080px and inserted video should be 1720x820px, positioned in the middle ?

    


    file info..
Duration : 00:00:22.07, start : 0.000000, bitrate : 3982 kb/s
Stream #0:0(und) : Video : h264 (High) (avc1 / 0x31637661), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], 3900 kb/s, 29 fps, 29 tbr, 14848 tbn, 58 tbc (default)
Metadata :
handler_name : VideoHandler
Stream #0:1(und) : Audio : aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 128 kb/s (default)
Metadata :
handler_name : SoundHandler
Input #1, mov,mp4,m4a,3gp,3g2,mj2, from 'short.mp4' :
Metadata :
major_brand : mp42
minor_version : 19529854
compatible_brands : mp42isom
creation_time : 2020-10-25T11:01:10.000000Z
Duration : 00:00:03.02, start : 0.000000, bitrate : 14405 kb/s
Stream #1:0(eng) : Audio : aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 319 kb/s (default)
Metadata :
creation_time : 2020-10-25T11:01:10.000000Z
handler_name : Sound Media Handler
Stream #1:1(eng) : Video : h264 (High) (avc1 / 0x31637661), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], 14078 kb/s, 59.94 fps, 59.94 tbr, 60k tbn, 119.88 tbc (default)
Metadata :
creation_time : 2020-10-25T11:01:10.000000Z
handler_name : Video Media Handler
encoder : AVC Coding