Recherche avancée

Médias (1)

Mot : - Tags -/Christian Nold

Autres articles (111)

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

  • Des sites réalisés avec MediaSPIP

    2 mai 2011, par

    Cette page présente quelques-uns des sites fonctionnant sous MediaSPIP.
    Vous pouvez bien entendu ajouter le votre grâce au formulaire en bas de page.

  • Les autorisations surchargées par les plugins

    27 avril 2010, par

    Mediaspip core
    autoriser_auteur_modifier() afin que les visiteurs soient capables de modifier leurs informations sur la page d’auteurs

Sur d’autres sites (4414)

  • ffmpeg merge separate .webm audio and video files using pts_time possible ?

    4 août 2021, par Zach

    I have a number of audio and video files with different start times and end times. They're all generated from piped input streams (node.js) with .webm format, so the audio files have gaps where there is no audio in the piped stream.

    


    I'm trying to :

    


      

    1. Merge the audio files together with wall-clock correct start/end times
    2. 


    3. Merge the video files using hstack.
    4. 


    5. Combine the merged audio and merged video into 1 final video with all video/audio.
    6. 


    


    Right now I'm still stuck on step 1 - Merge the audio

    


    My command that generates separate audio files is :

    


            '-protocol_whitelist',
        'pipe,udp,rtp',
        '-fflags',
        '+genpts',
        '-f',
        'sdp',
        '-use_wallclock_as_timestamps',
        'true',
        '-i',
        'pipe:0'
        '-copyts',
        '-map',
        '0:a:0',
        '-strict'
        '-2',
        '-c:a',
        'copy'


    


    I'd love to combine them somehow using the timestamps of each packet fill the empty space with silence. Right now, I'm putting them together with offsets using the time that I initiate the ffmpeg process from node.js, but these times are incorrect, as it takes a moment for ffmpeg to start up.

    


    Any assistance or a push in the right direction for time sensitive merging of audio/video .webm files with ffmpeg would be outstanding.

    


    Thanks !

    


    PS, here's what I'm currently doing and running into a problems with :

    


       '-i',
  './recordings/audio_1.webm',
  '-i',
  './recordings/audio_2.webm',
  '-filter_complex',
  '[1]adelay=6384|6384[b];[0][b]amix=2',
  './recordings/merged_audio.webm'


    


    The delays are inaccurate (because they're based on an estimate of when the first packet starts) and doesn't account for gaps in the audio files :(

    


  • sharedarraybuffer error in edge and firefox but not in chrome when uploading with ffmpeg in nodejs

    29 juillet 2021, par Juliette

    I have the code below in React.js that uses ffmpeg to convert files :

    


    import { createFFmpeg, fetchFile } from '@ffmpeg/ffmpeg';

  const doTranscode = async () => {
    setMessage('Loading ffmpeg-core.js');
    await ffmpeg.load();
    setMessage('Uploading file');
    ffmpeg.FS('writeFile', filename, await fetchFile(file));
    await ffmpeg.run('-i', filename, 'test.wav');
    setMessage('Upload to manager complete. Sound file will be available and playable on the manger within 1-2 minutes.');
    const data = ffmpeg.FS('readFile', 'test.wav');
    setAudioSrc(URL.createObjectURL(new Blob([data.buffer], { type: 'audio/wav' })));

    var file_name = prompt('What would you like to call this file?');

    if (!file_name) {
      file_name = Date.now()
    }
    
    (async function(){
      let output = await getSoundID(customer_id, file_name);
      let sound_id = output.data;
      var bucket_file = new File([new Blob([data.buffer], { type: 'audio/wav' })], "sounds/" + customer_id + "/" + sound_id + ".wav");
      uploadFileToS3(bucket_file);
      updateSoundData(sound_id, customer_id);
    })();
  };

  useEffect(() => {
    if (file) {
      doTranscode()
    }
  }, [file])


    


    The code above works great in Chrome and the files are successfully converted. However, when I bring it to Firefox or Edge I get this error Unhandled Rejection (ReferenceError): SharedArrayBuffer is not defined.

    


    I looked up this issue and they said I need to modify my headers to include this :

    


    You need to set two response headers for your document:

Cross-Origin-Opener-Policy: same-origin Cross-Origin-Embedder-Policy: require-corp


    


    Not sure how I would this in my JS code ?

    


    Would love to hear what you guys think.

    


  • How do I copy ALL metadata from flac/mp3 to alac with ffmpeg ? -movflags isn't working, default just copies basic metadata

    24 juillet 2021, par Architekt

    I've spent 2 days now reasearching this and all the info I've found doesn't work. If I do this simple command :

    


    ffmpeg -i test.mp3 -y -vn -c:a alac /storage/test.m4a


    


    it copies the standard tags. The -vn is to disable copying album art, I've given up on that. It's easier to just separately use AtomicParsley to handle it because some of the album art isn't height divisble by 2.

    


    Problem is, I have extra custom tags that I need as well. Not necessarily for this particular track, but for all the vinyl I spent 2 months archiving. I've tried using the -movflags use_metadata_tags option but that didn't do anything. In fact, it completely prevented the copying of any metadata whatsoever. Here's the command I tried :

    


    ffmpeg -i test.mp3 -y -movflags use_metadata_tags -vn -c:a alac /storage/test.m4a


    


    On my Windows machine, if I use Foobar2000 and convert the same file to m4a, it copies ALL metadata, 100% to the resultant m4a file. Sadly, I need to do this from a linux command line, as part of an automation process. Both commands I've tried show output metadata equivalent to the input (sans cover art), so I'm not sure what that's about. In case it helps, here's the full screen output when I use that latter command with the -movflags tag. I'm going to use a pastebin link so as to not clutter this post with the verbose output.

    


    I've tried -map_metadata 0 as well, same results, but that's to be expected as from what I've read that just copies the global/standard tags. This must be possible, otherwise I have no idea how foobar2000 would be able to do it. I'd love to just use that, but alas, as stated, I have to do this on Linux command line for this particular situation.