Recherche avancée

Médias (91)

Autres articles (64)

  • Keeping control of your media in your hands

    13 avril 2011, par

    The vocabulary used on this site and around MediaSPIP in general, aims to avoid reference to Web 2.0 and the companies that profit from media-sharing.
    While using MediaSPIP, you are invited to avoid using words like "Brand", "Cloud" and "Market".
    MediaSPIP is designed to facilitate the sharing of creative media online, while allowing authors to retain complete control of their work.
    MediaSPIP aims to be accessible to as many people as possible and development is based on expanding the (...)

  • Participer à sa traduction

    10 avril 2011

    Vous pouvez nous aider à améliorer les locutions utilisées dans le logiciel ou à traduire celui-ci dans n’importe qu’elle nouvelle langue permettant sa diffusion à de nouvelles communautés linguistiques.
    Pour ce faire, on utilise l’interface de traduction de SPIP où l’ensemble des modules de langue de MediaSPIP sont à disposition. ll vous suffit de vous inscrire sur la liste de discussion des traducteurs pour demander plus d’informations.
    Actuellement MediaSPIP n’est disponible qu’en français et (...)

  • Websites made ​​with MediaSPIP

    2 mai 2011, par

    This page lists some websites based on MediaSPIP.

Sur d’autres sites (12009)

  • Révision 115697 : Code inutile.

    16 juin 2019, par eric@smellup.net

    Appels avec le mauvais nombre d’arguments.
    updateq à la place de replace.

  • Error opening input files : Invalid data found when processing input

    27 mars 2024, par Master's Time

    I am creating disnake music bot. The error is :

    


    [in#0 @ 00000233f8d71500] Error opening input: Invalid data found when processing input
Error opening input file https://www.youtube.com/watch?v=duDUqBtxwXk.
Error opening input files: Invalid data found when processing input


    


    Here is part of my code :

    


    import disnake
import asyncio
from yt_dlp import YoutubeDL
import ffmpeg


YTDL_OPTIONS = {'format': 'bestaudio', 'noplaylist': 'False', 'simulate':'True', 'key':"FFmpegExtractAudio"}
FFMPEG_OPTIONS = {'before_options': '-reconnect 1 -reconnect_streamed 1 -reconnect_delay_max 5', 'options': '-vn'}


async def play_music(inter):
        global YDTL_OPTIONS, FFMPEG_OPTIONS
    print(tm.now().strftime("%H:%M:%S"),"play_music begin")
    id = int(inter.guild.id)
    with YoutubeDL(YTDL_OPTIONS) as ydl:
        info = ydl.extract_info(url, download=False)

    song = {
            'link': 'https://www.youtube.com/watch?v=' + url,
            'thumbnail': 'https://i.ytimg.com/vi/' + url + '/hqdefault.jpg?sqp=-oaymwEcCOADEI4CSFXyq4qpAw4IARUAAIhCGAFwAcABBg==&rs=AOn4CLD5uL4xKN-IUfez6KIW_j5y70mlig',
            'source': info['formats'][0]['url'],
            'title': info['title']
        }   self.vc[id].play(disnake.FFmpegPCMAudio(executable=r"C:\\ffmpeg\\ffmpeg\\bin\\ffmpeg.exe",source=song["source"], **FFMPEG_OPTIONS))
    print(tm.now().strftime("%H:%M:%S"),"play_music end")


    


    I tried to write source = song['source'] instead of source = song['link'], but it didn't seem helpful.

    


  • Issues with MediaSourceExtension

    4 janvier 2023, par engine32

    I want to livestream audio only using MSE. I would like to send data/files via websockets, therefore no HLS nor DASH.

    


    But until I implement websockets, I thought to give it a try by statically loading the song in an array.

    


    Here is my code so far :

    


    <audio controls="controls"></audio>&#xA;..&#xA;<code class="echappe-js">&lt;script&gt;&amp;#xA;  const ms = new MediaSource();&amp;#xA;  var ae = document.getElementById(&quot;ap&quot;);&amp;#xA;  ae.src = URL.createObjectURL(ms);&amp;#xA;  ms.addEventListener(&amp;#x27;sourceopen&amp;#x27;, msOpen);&amp;#xA;  &amp;#xA;function msOpen(e) {&amp;#xA;  URL.revokeObjectURL(ae.src);&amp;#xA;  var mse = e.target;&amp;#xA;  const sourceBuffer = mse.addSourceBuffer(&amp;#x27;audio/mp4&amp;#x27;);&amp;#xA;  var u8A0 = new Uint8Array([0x00, 0x00, 0x00, 0x1C, 0x66, ...]);&amp;#xA;  sourceBuffer.appendBuffer(u8A0.buffer);&amp;#xA;  &amp;#xA;  sourceBuffer.addEventListener(&amp;#x27;updateend&amp;#x27;, function() {&amp;#xA;    if (!sourceBuffer.updating &amp;amp;&amp;amp; mse.readyState === &amp;#x27;open&amp;#x27;) {&amp;#xA;      mse.endOfStream();&amp;#xA;      console.log(&amp;#x27;Audio is ready to play!&amp;#x27;);&amp;#xA;    }&amp;#xA;  });&amp;#xA;}  &amp;#xA;&lt;/script&gt;&#xA;&#xA;

    &#xA;

    The result is that there are no errors in the debug window and the audio element correctly shows the duration of the song, about two min and half. However, once I click Play, the duration shows 0 (zero) and the song is not played. If I try to pause and play again, the debug window says :

    &#xA;

    *"Uncaught (in promise) DOMException : The fetching process for the media resource was aborted by the user agent at the user's request".&#xA;*&#xA;This is the ffmpeg command I used to prepare the file :

    &#xA;

    ffmpeg -i m.wav -c:a aac -b:a 32k -f mp4 output.mp4

    &#xA;

    Any help would be well appreciated.&#xA;Thank you.

    &#xA;