Recherche avancée

Médias (0)

Mot : - Tags -/presse-papier

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

Autres articles (52)

  • 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

  • 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

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

Sur d’autres sites (10039)

  • torchaudio.io.StreamReader doesn't throw error when seeking to time stamp more than the duration of audio file

    27 mars 2023, par lokesh

    I am trying to get the audio chunk of audio file between specific start time and end time

    


    Consider a audio of duration 10 seconds. Now i need to get chunk from 4 sec to 7 sec

    


    torchaudio.info doesn't give correct num_frames for io.BytesIO flac audio file. So there is no way to find the total number of frames in the given audio to check for out of bounds start offset
Ref : https://github.com/pytorch/audio/issues/2524

    


    What I did to get the chunk of audio with start and end offsets.

    


    def read_audio(audio_file, start, end):
    audio_file.seek(0)
    reader = StreamReader(audio_file)
    sample_rate = int(reader.get_src_stream_info(reader.default_audio_stream).sample_rate)

    reader.seek(start * sample_rate)
    reader.add_basic_audio_stream(frames_per_chunk=(end - start) * sample_rate)

    return list(reader.stream())[0].pop()


    


    This is working as intended for start time less than the duration of audio file. But when we give the start time more than the duration of audio file, It doesn't throw error or return empty tensor.
Is there any way to know the given offsets are out of bounds.

    


  • Don't throw an error when attached picture isn't recognized.

    10 avril 2023, par Dale Curtis
    Don't throw an error when attached picture isn't recognized.
    

    The MIME type field is required per the FLAC standard, but it's
    not an error just because ffmpeg doesn't recognize it.

    Signed-off-by : Dale Curtis <dalecurtis@chromium.org>
    Signed-off-by : Michael Niedermayer <michael@niedermayer.cc>

    • [DH] libavformat/flac_picture.c
  • WebRTC : unsync audio after processing using ffmpeg

    22 novembre 2013, par QuickSilver

    I am recording a video and using RecordRTC : WebRTC . After receiving the webm video and wav audio at server, I'm encoding it to a mp4 file using ffmpeg(executing shell command via php). But after encoding process, the audio is unsync with video (audio ends before video). How can I fix this ?

    I have noticed that the recorded audio is 1 sec less in length with video.

    js code is here

    record.onclick = function() {
       record.disabled = true;
       var video_constraints = {
           mandatory: {
               "minWidth": "320",
               "minHeight": "240",
               "minFrameRate": "24",
               "maxWidth": "320",
               "maxHeight": "240",
               "maxFrameRate": "24"
           },
           optional: []
       };
       navigator.getUserMedia({
           audio: true,
           video: video_constraints
       }, function(stream) {
           preview.src = window.URL.createObjectURL(stream);
           preview.play();

           // var legalBufferValues = [256, 512, 1024, 2048, 4096, 8192, 16384];
           // sample-rates in at least the range 22050 to 96000.
           recordAudio = RecordRTC(stream, {
               /* extra important, we need to set a big buffer when capturing audio and video at the same time*/
               bufferSize: 16384
               //sampleRate: 45000
           });

           recordVideo = RecordRTC(stream, {
               type: &#39;video&#39;
           });

           recordVideo.startRecording();
           recordAudio.startRecording();

           stop.disabled = false;
           recording_flag = true;
           $("#divcounter").show();
           $("#second-step-title").text(&#39;Record your video&#39;);
           initCountdown();
           uploadStatus.video = false;
           uploadStatus.audio = false;
       });
    };

    ffmpeg command used is :

    ffmpeg -y -i 166890589.wav -i 166890589.webm -vcodec libx264 166890589.mp4

    Currently I'm adding an offset of -1 to ffmpeg, but i don't think it's right.

    ffmpeg -y -itsoffset -1 -i 166890589.wav -i 166890589.webm -vcodec libx264 166890589.mp4