Recherche avancée

Médias (1)

Mot : - Tags -/biographie

Autres articles (79)

  • Le profil des utilisateurs

    12 avril 2011, par

    Chaque utilisateur dispose d’une page de profil lui permettant de modifier ses informations personnelle. Dans le menu de haut de page par défaut, un élément de menu est automatiquement créé à l’initialisation de MediaSPIP, visible uniquement si le visiteur est identifié sur le site.
    L’utilisateur a accès à la modification de profil depuis sa page auteur, un lien dans la navigation "Modifier votre profil" est (...)

  • Configurer la prise en compte des langues

    15 novembre 2010, par

    Accéder à la configuration et ajouter des langues prises en compte
    Afin de configurer la prise en compte de nouvelles langues, il est nécessaire de se rendre dans la partie "Administrer" du site.
    De là, dans le menu de navigation, vous pouvez accéder à une partie "Gestion des langues" permettant d’activer la prise en compte de nouvelles langues.
    Chaque nouvelle langue ajoutée reste désactivable tant qu’aucun objet n’est créé dans cette langue. Dans ce cas, elle devient grisée dans la configuration et (...)

  • La sauvegarde automatique de canaux SPIP

    1er avril 2010, par

    Dans le cadre de la mise en place d’une plateforme ouverte, il est important pour les hébergeurs de pouvoir disposer de sauvegardes assez régulières pour parer à tout problème éventuel.
    Pour réaliser cette tâche on se base sur deux plugins SPIP : Saveauto qui permet une sauvegarde régulière de la base de donnée sous la forme d’un dump mysql (utilisable dans phpmyadmin) mes_fichiers_2 qui permet de réaliser une archive au format zip des données importantes du site (les documents, les éléments (...)

Sur d’autres sites (12316)

  • Seeking with ffmpeg options fails or causes delayed playback in Discord bot

    29 août 2022, par J Petersen

    My Discord bot allows users to play a song starting from a timestamp.

    


    The problem is that playback is delayed and audio plays faster and is jumbled if start times >= 30s are set.

    


    Results from testing different start times. Same URL, 30 second duration :

    


    





    


    


    


    


    


    



    


    


    


    


    


    


    


    


    


    


    


    


    


    


    


    


    


    


    


    


    


    


    


    


    


    Entered Start Time (s) Playback Delay (s) Song Playback Time (s)
    0 3 30
    30 10 22
    60 17 17
    120 31 2
    150 120 <1

    &#xA;

    &#xA;

    I am setting the start time using ffmpeg_options as suggested in this question.

    &#xA;

    Does anyone understand why the audio playback is being delayed/jumbled ? How can I improve playback delay and allow users to start in the middle of a multi-chapter YouTube video ?

    &#xA;

    Code :

    &#xA;

    import discord&#xA;import youtube_dl&#xA;import asyncio&#xA;&#xA;&#xA;# Suppress noise about console usage from errors&#xA;youtube_dl.utils.bug_reports_message = lambda: ""&#xA;&#xA;&#xA;ytdl_format_options = {&#xA;    "format": "bestaudio/best",&#xA;    "outtmpl": "%(extractor)s-%(id)s-%(title)s.%(ext)s",&#xA;    "restrictfilenames": True,&#xA;    "noplaylist": False,&#xA;    "yesplaylist": True,&#xA;    "nocheckcertificate": True,&#xA;    "ignoreerrors": False,&#xA;    "logtostderr": False,&#xA;    "quiet": True,&#xA;    "no_warnings": True,&#xA;    "default_search": "auto",&#xA;    "source_address": "0.0.0.0",  # Bind to ipv4 since ipv6 addresses cause issues at certain times&#xA;}&#xA;&#xA;ytdl = youtube_dl.YoutubeDL(ytdl_format_options)&#xA;&#xA;&#xA;class YTDLSource(discord.PCMVolumeTransformer):&#xA;    def __init__(self, source: discord.AudioSource, *, data: dict, volume: float = 0.5):&#xA;        super().__init__(source, volume)&#xA;&#xA;        self.data = data&#xA;&#xA;        self.title = data.get("title")&#xA;        self.url = data.get("url")&#xA;&#xA;    @classmethod&#xA;    async def from_url(cls, url, *, loop=None, stream=False, timestamp = 0):&#xA;        ffmpeg_options = {&#xA;            "options": f"-vn -ss {timestamp}"}&#xA;&#xA;        loop = loop or asyncio.get_event_loop()&#xA;&#xA;        data = await loop.run_in_executor(None, lambda: ytdl.extract_info(url, download=not stream))&#xA;        if "entries" in data:&#xA;            # Takes the first item from a playlist&#xA;            data = data["entries"][0]&#xA;&#xA;        filename = data["url"] if stream else ytdl.prepare_filename(data)&#xA;        return cls(discord.FFmpegPCMAudio(filename, **ffmpeg_options), data=data)&#xA;&#xA;&#xA;intents = discord.Intents.default()&#xA;&#xA;bot = discord.Bot(intents=intents)&#xA;&#xA;@bot.slash_command()&#xA;async def play(ctx, audio: discord.Option(), seconds: discord.Option(), timestamp: discord.Option()):&#xA;    channel = ctx.author.voice.channel&#xA;    voice = await channel.connect()&#xA;    player = await YTDLSource.from_url(audio, loop=bot.loop, stream=True, timestamp=int(timestamp))&#xA;    voice.play(player)&#xA;    await asyncio.sleep(int(seconds))&#xA;    await voice.disconnect()&#xA;&#xA;token = token value&#xA;bot.run(token)&#xA;

    &#xA;

  • How to see default NVENC hevc options in ffmpeg

    18 mars 2023, par Ivan Gorin

    I am trying to use the hevc_nvenc encoder in ffmpeg to reencode an old video I have. Obviously software encoding using libx265 would be better, but I want to make in fast. I am trying to optimize for video quality, so I am using these options :

    &#xA;

    -profile:v main -b_ref_mode 0 -preset p7 -tune hq -rc vbr&#xA;

    &#xA;

    b_ref_mode 0 since my gpu doesn't support bframe reference mode.

    &#xA;

    This gives results with average bitrate of around 2M, so I am guessing that is the default bitrate setting for nvenc. Increasing -b:v increases average bitrate, but around 6.5M it stops. Even using -b:v 50M gives the same video bitrate. I have also tried setting -cq 1 to force the best quality possible, but that actually decreases bitrate to around 4.5M. The only way I found to get the desired bitrate is using -cq 1 and -maxrate set to a big value. This removes the restriction, and actually the -b:v option is no longer needed, it seems like it doesn't have any effect at all.

    &#xA;

    All of this behaviour seems very strange to me, with some hidden default values for bitrate and maxrate, so the question is where can I see these values ? I tried using ffmpeg with -loglevel debug but didn't see these values getting passed, and the documentation I found says maxrate default in ffmpeg is 0 (what does this mean ?).

    &#xA;

  • Sending Blobs from a Chrome Extension to a Node.js Process without WebSockets [closed]

    29 octobre 2023, par Matrix 404

    Question :&#xA;I have a Puppeteer script that runs a Chrome extension, which opens a webpage. The extension records that tab and sends the recorded blobs to the main Node.js process using WebSockets. The main process then streams these blobs to an RTMP server.

    &#xA;

    I'm looking for an alternative method to send blobs to the main process without using WebSockets. Additionally, I want to know if it's possible to stream these blobs directly from the browser using FFmpeg wasm.

    &#xA;

    Details :

    &#xA;

      &#xA;
    1. My current setup : Puppeteer script -> Chrome extension (recording) -> WebSockets -> Node.js process -> RTMP server.

      &#xA;

    2. &#xA;

    3. I'm exploring options to eliminate the use of WebSockets while maintaining the ability to send recorded blobs from the Chrome extension to the Node.js process efficiently.

      &#xA;

    4. &#xA;

    5. Is it possible to use FFmpeg wasm to stream blobs directly from the browser to an RTMP server ? If so, how can this be achieved ?

      &#xA;

    6. &#xA;

    &#xA;

    Additional Information :

    &#xA;

      &#xA;
    • The technology stack I'm using includes Puppeteer, Chrome extension, Node.js, and FFmpeg.
    • &#xA;

    • Any code snippets, examples, or recommended libraries are greatly appreciated.
    • &#xA;

    &#xA;

    Constraints :

    &#xA;

      &#xA;
    • Compatibility with modern browsers and reasonable performance are essential.
    • &#xA;

    • Ideally, the solution should work in a headless Chrome instance.
    • &#xA;

    &#xA;

    Thank you for your assistance in finding an efficient solution to this problem !

    &#xA;

      &#xA;
    • The technology stack I'm using includes Puppeteer, Chrome extension, Node.js, and FFmpeg.
    • &#xA;

    • Any code snippets, examples, or recommended libraries are greatly appreciated.
    • &#xA;

    &#xA;