Recherche avancée

Médias (1)

Mot : - Tags -/framasoft

Autres articles (87)

  • Librairies et binaires spécifiques au traitement vidéo et sonore

    31 janvier 2010, par

    Les logiciels et librairies suivantes sont utilisées par SPIPmotion d’une manière ou d’une autre.
    Binaires obligatoires FFMpeg : encodeur principal, permet de transcoder presque tous les types de fichiers vidéo et sonores dans les formats lisibles sur Internet. CF ce tutoriel pour son installation ; Oggz-tools : outils d’inspection de fichiers ogg ; Mediainfo : récupération d’informations depuis la plupart des formats vidéos et sonores ;
    Binaires complémentaires et facultatifs flvtool2 : (...)

  • De l’upload à la vidéo finale [version standalone]

    31 janvier 2010, par

    Le chemin d’un document audio ou vidéo dans SPIPMotion est divisé en trois étapes distinctes.
    Upload et récupération d’informations de la vidéo source
    Dans un premier temps, il est nécessaire de créer un article SPIP et de lui joindre le document vidéo "source".
    Au moment où ce document est joint à l’article, deux actions supplémentaires au comportement normal sont exécutées : La récupération des informations techniques des flux audio et video du fichier ; La génération d’une vignette : extraction d’une (...)

  • MediaSPIP Player : problèmes potentiels

    22 février 2011, par

    Le lecteur ne fonctionne pas sur Internet Explorer
    Sur Internet Explorer (8 et 7 au moins), le plugin utilise le lecteur Flash flowplayer pour lire vidéos et son. Si le lecteur ne semble pas fonctionner, cela peut venir de la configuration du mod_deflate d’Apache.
    Si dans la configuration de ce module Apache vous avez une ligne qui ressemble à la suivante, essayez de la supprimer ou de la commenter pour voir si le lecteur fonctionne correctement : /** * GeSHi (C) 2004 - 2007 Nigel McNie, (...)

Sur d’autres sites (9706)

  • FFMpeg command line to create specific MPD Manifest

    22 février 2024, par Seth Haberman

    I have tried to get an FFMpeg command to yield the below manifest. Right below is the FFmpeg command that I have tried to make but it has not created the same manifest file as what I am trying to replicate a stream from a third party system to add my own stream to their system so that it will actually play back.

    


    "$ffmpeg_path" \
    -i "$input_file" \
    -r 30000/1001 \
    -vf "scale=3840:1080" \
    -c:v libx265 \
    -c:a aac -b:a 128k \
    -ar 48000 \
    -f dash \
    -use_timeline 1 \
    -use_template 1 \
    -init_seg_name "init-stream\$RepresentationID\$.m4s" \
    -media_seg_name "chunk-stream\$RepresentationID\$-\$Number%05d\$.m4s" \
    -seg_duration 3 \
    "$output_file"


    


    The code above yields a manifest that is structured like below.

    


    &lt;?xml version="1.0" encoding="utf-8"?>&#xA;<mpd xmlns="urn:mpeg:dash:schema:mpd:2011" profiles="urn:mpeg:dash:profile:isoff-live:2011" type="static" mediapresentationduration="PT1M35.1S" maxsegmentduration="PT3.0S" minbuffertime="PT16.8S">&#xA;    <programinformation>&#xA;    </programinformation>&#xA;    <servicedescription>&#xA;    </servicedescription>&#xA;    <period start="PT0.0S">&#xA;        <adaptationset contenttype="video" startwithsap="1" segmentalignment="true" bitstreamswitching="true" framerate="30000/1001" maxwidth="3840" maxheight="1080" par="32:9">&#xA;            <representation mimetype="video/mp4" codecs="hev1" bandwidth="2227590" width="3840" height="1080" sar="1:1">&#xA;                <segmenttemplate timescale="30000" initialization="init-stream$RepresentationID$.m4s" media="chunk-stream$RepresentationID$-$Number%05d$.m4s" startnumber="1">&#xA;                    <segmenttimeline>&#xA;                        <s t="0" d="247247"></s>&#xA;                        <s d="250250" r="9"></s>&#xA;                        <s d="104104"></s>&#xA;                    </segmenttimeline>&#xA;                </segmenttemplate>&#xA;            </representation>&#xA;        </adaptationset>&#xA;        <adaptationset contenttype="audio" startwithsap="1" segmentalignment="true" bitstreamswitching="true">&#xA;            <representation mimetype="audio/mp4" codecs="mp4a.40.2" bandwidth="128000" audiosamplingrate="48000">&#xA;                <audiochannelconfiguration schemeiduri="urn:mpeg:dash:23003:3:audio_channel_configuration:2011" value="1"></audiochannelconfiguration>&#xA;                <segmenttemplate timescale="48000" initialization="init-stream$RepresentationID$.m4s" media="chunk-stream$RepresentationID$-$Number%05d$.m4s" startnumber="1">&#xA;                    <segmenttimeline>&#xA;                        <s t="0" d="143360"></s>&#xA;                        <s d="144384" r="29"></s>&#xA;                        <s d="93120"></s>&#xA;                    </segmenttimeline>&#xA;                </segmenttemplate>&#xA;            </representation>&#xA;        </adaptationset>&#xA;    </period>&#xA;</mpd>&#xA;&#xA;

    &#xA;

    The problem is that I I need it to create a stream where the manifest looks like the manifest below. If it doesn't look or function as below, it will not playback correctly on this third parties system.

    &#xA;

    &lt;?xml version="1.0" encoding="UTF-8" standalone="yes"?>&#xA;<mpd xmlns="urn:mpeg:dash:schema:mpd:2011" profiles="urn:mpeg:dash:profile:isoff-live:2011" type="static" mediapresentationduration="PT1M35.7S" minbuffertime="PT5.9S">&#xA;    <programinformation></programinformation>&#xA;    <period start="PT0.0S">&#xA;        <adaptationset contenttype="video" segmentalignment="true" bitstreamswitching="true">&#xA;            <representation bandwidth="12000000" width="3840" height="1080" framerate="30000/1001" mimetype="video/mp4" codecs="hev1">&#xA;                <segmenttemplate media="chunk-stream$RepresentationID$-$Number%05d$.m4s" initialization="init-stream$RepresentationID$.m4s" startnumber="1" timescale="30000">&#xA;                    <segmenttimeline>&#xA;                        <s t="0" d="89089" r="31"></s>&#xA;                        <s d="21021"></s>&#xA;                    </segmenttimeline>&#xA;                </segmenttemplate>&#xA;            </representation>&#xA;        </adaptationset>&#xA;        <adaptationset contenttype="audio" segmentalignment="true" bitstreamswitching="true">&#xA;            <representation bandwidth="1536000" audiosamplingrate="48000" mimetype="audio/mp4" codecs="mp4a.40.2">&#xA;                <audiochannelconfiguration schemeiduri="urn:mpeg:dash:23003:3:audio_channel_configuration:2011" value="16"></audiochannelconfiguration>&#xA;                <segmenttemplate media="chunk-stream$RepresentationID$-$Number%05d$.m4s" initialization="init-stream$RepresentationID$.m4s" startnumber="1" timescale="48000">&#xA;                    <segmenttimeline>&#xA;                        <s t="0" d="143360"></s>&#xA;                        <s d="142336" r="2"></s>&#xA;                        <s d="143360"></s>&#xA;                        <s d="142336" r="3"></s>&#xA;                        <s d="143360"></s>&#xA;                        <s d="142336" r="3"></s>&#xA;                        <s d="143360"></s>&#xA;                        <s d="142336" r="3"></s>&#xA;                        <s d="143360"></s>&#xA;                        <s d="142336" r="3"></s>&#xA;                        <s d="143360"></s>&#xA;                        <s d="142336" r="3"></s>&#xA;                        <s d="143360"></s>&#xA;                        <s d="142336" r="1"></s>&#xA;                        <s d="32768"></s>&#xA;                    </segmenttimeline>&#xA;                </segmenttemplate>&#xA;            </representation>&#xA;        </adaptationset>&#xA;    </period>&#xA;</mpd>&#xA;

    &#xA;

  • Discord Bot Freezes and Stops Sending/Receiving Audio Buffers

    17 mai 2024, par Nerevaine

    I'm working on a Discord bot that connects to a voice channel, listens to the audio, and sends it to a WebSocket server. Initially, everything works fine, but after some time, the bot freezes and stops sending/receiving audio buffers. After a certain period, the bot stops processing audio. There are no errors thrown, but the audio buffers stop being sent and received. Here are the key parts of the code I use to handle the connection and audio processing :

    &#xA;

    let count = 0;&#xA;&#xA;    await entersState(connection, VoiceConnectionStatus.Ready, 30000);&#xA;    const player = createAudioPlayer();&#xA;    connection.subscribe(player);&#xA;&#xA;    ws.on(&#x27;open&#x27;, () => {&#xA;      voiceChannel.members.forEach(member => {&#xA;        if (member.user.id !== client.user.id) {&#xA;          member.voice.setMute(false);&#xA;        }&#xA;      });&#xA;    });&#xA;&#xA;    ws.on(&#x27;error&#x27;, console.error);&#xA;    ws.on(&#x27;close&#x27;, () => {&#xA;      console.log(&#x27;WebSocket connection closed, attempting to reconnect...&#x27;);&#xA;    });&#xA;&#xA;    const audioBuffers = new Map();&#xA;&#xA;    connection.receiver.speaking.on(&#x27;start&#x27;, userId => {&#xA;      audioBuffers.set(userId, []);&#xA;&#xA;      const opusStream = connection.receiver.subscribe(userId, {&#xA;        end: {&#xA;          behavior: EndBehaviorType.AfterSilence,&#xA;          duration: 1000&#xA;        }&#xA;      });&#xA;&#xA;      const pcmStream = opusStream.pipe(new prism.opus.Decoder({ rate: 48000, channels: 2, frameSize: 900 }));&#xA;      const wavStream = new PassThrough();&#xA;&#xA;      ffmpeg(pcmStream)&#xA;        more filters&#xA;        .pipe(wavStream);&#xA;&#xA;      wavStream.on(&#x27;data&#x27;, chunk => {&#xA;        const chunks = audioBuffers.get(userId);&#xA;        if (chunks) {&#xA;          chunks.push(chunk);&#xA;        }&#xA;      });&#xA;    });&#xA;&#xA;    connection.receiver.speaking.on(&#x27;end&#x27;, userId => {&#xA;      const chunks = audioBuffers.get(userId);&#xA;      if (chunks &amp;&amp; chunks.length > 0) {&#xA;        const audioBuffer = Buffer.concat(chunks);&#xA;        const duration = audioBuffer.length / 48000 / 2;&#xA;        if (duration > 1.0) {&#xA;          console.log(&#x27;Sending audio buffer:&#x27;, audioBuffer);&#xA;          ws.send(audioBuffer);&#xA;          audioBuffers.delete(userId);&#xA;        }&#xA;      }&#xA;    });&#xA;&#xA;    ws.on(&#x27;message&#x27;, data => {&#xA;      const channelEvent = voiceChannel.id === spanishVoiceChannel ? &#x27;dataReceivedEnglish&#x27; : &#x27;dataReceivedSpanish&#x27;;&#xA;      eventBus.emit(channelEvent, data);&#xA;      count&#x2B;&#x2B;;&#xA;      console.log(`${count}:`, data);&#xA;    });&#xA;&#xA;    return player;&#xA;  } catch (error) {&#xA;    console.error(&#x27;Error joining voice channel:&#x27;, error);&#xA;  }&#xA;}&#xA;

    &#xA;

    What I Have Tried

    &#xA;

      &#xA;
    • Monitoring Connection Status : Added logs and intervals to check the status of the WebSocket and voice connection.
    • &#xA;

    • Handling Errors and Reconnections : Implemented reconnection logic for both WebSocket and voice connection.
    • &#xA;

    &#xA;

    Any suggestions or help would be greatly appreciated.

    &#xA;

  • avfilter/vf_libplacebo : flush render cache when input is invisible

    7 août, par Niklas Haas
    avfilter/vf_libplacebo : flush render cache when input is invisible
    

    This prevents leaking stale metadata from previous frames, for example if
    an overlay temporarily obscures this input and then un-obscures it again. It
    is worth pointing out that this does change the semantics subtly, because of
    the smoothing period on detected HDR metadata, but I argue that the new
    behavior is an improvement, as it will avoid leaking past metadata that is
    definitely no longer relevant after an image is unobscured.

    • [DH] libavfilter/vf_libplacebo.c