Recherche avancée

Médias (2)

Mot : - Tags -/rotation

Autres articles (51)

  • HTML5 audio and video support

    13 avril 2011, par

    MediaSPIP uses HTML5 video and audio tags to play multimedia files, taking advantage of the latest W3C innovations supported by modern browsers.
    The MediaSPIP player used has been created specifically for MediaSPIP and can be easily adapted to fit in with a specific theme.
    For older browsers the Flowplayer flash fallback is used.
    MediaSPIP allows for media playback on major mobile platforms with the above (...)

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

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

Sur d’autres sites (6388)

  • Concatenate all opus audio in folder and create chapters

    7 octobre 2024, par Petrus Vermaak

    I need to join multiple (mp3 or opus) audio in a directory into a single file. I also need to preserve/create each audio as a chapter. The expected outcome is that the output contains the chapter information in the file, so one can easily skip to the desired chapter using vlc player, etc.

    


    I need to do this on Windows and have found a way to join the files, but it does not preserve the chapter information : cmd type *.opus  | FFmpeg  -i pipe: -c:a copy all.opus

    


    Can anyone please tell me how to preserve chapters on Windows ? I don't mind using a script as long as you tell me how to create and execute it, seeing that I am a total noob lol

    


    The expected outcome is that it works like an audiobook. I have already seen that both mp3 & opus can have chapters, so I want to do this for all my audiobooks that have multiple files.

    


  • 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 avoid ffmpeg failing to add chapters to mov file ?

    27 septembre 2022, par BabaG

    I've been trying all day to get ffmpeg to add chapters to a prores mov file. It does add the first two, but then it fails with the name of the text file and an error message :

    &#xA;

    chapterstest_orig.txt: Invalid data found when processing input&#xA;

    &#xA;

    I see lots of online references to the format of both the ffmpeg command, as well as the text file containing the chapter metadata. Here are mine :

    &#xA;

    ffmpeg -i chapterstest_orig.mov -i chapterstest_orig.txt -map_metadata 1 -codec copy chapterstest.mov&#xA;

    &#xA;

    i've also tried it with -map_chapters :

    &#xA;

    ffmpeg -i chapterstest_orig.mov -i chapterstest_orig.txt -map_metadata 1 -map_chapters 1 -codec copy chapterstest.mov&#xA;

    &#xA;

    Here's a copy of my text file, containing the chapter info :

    &#xA;

    ;FFMETADATA1&#xA;title=Angel&#x27;s Gate Cultural Center&#xA;artist=Buzzworld&#xA;&#xA;[CHAPTER]&#xA;TIMEBASE=1/1000&#xA;START=0&#xA;END=6999&#xA;title=Buzzworld 10-10-1997&#xA;&#xA;[CHAPTER]&#xA;TIMEBASE=1/1000&#xA;START=7000&#xA;END=290999&#xA;title=The Road To Lisdoonvarna&#xA;&#xA;[CHAPTER]&#xA;TIMEBASE=1/1000&#xA;START=291000&#xA;END=739999&#xA;title=Jack Orion&#xA;&#xA;[CHAPTER]&#xA;TIMEBASE=1/1000&#xA;START=740000&#xA;END=992999&#xA;title=The Frieze Britches&#xA;&#xA;[CHAPTER]&#xA;TIMEBASE=1/1000&#xA;START=993000&#xA;END=1295999&#xA;title=The Blackleg Miner&#xA;&#xA;[CHAPTER]&#xA;TIMEBASE=1/1000&#xA;START=1296000&#xA;END=1559999&#xA;title=Johnny Jump Up&#xA;&#xA;[CHAPTER]&#xA;TIMEBASE=1/1000&#xA;START=1560000&#xA;END=1867999&#xA;title=Tom Billy&#x27;s&#xA;&#xA;[CHAPTER]&#xA;TIMEBASE=1/1000&#xA;START=1868000&#xA;END=2143999&#xA;title=When Will We Be Married?&#xA;&#xA;[CHAPTER]&#xA;TIMEBASE=1/1000&#xA;START=2144000&#xA;END=2500999&#xA;title=The Old Bush&#xA;&#xA;[CHAPTER]&#xA;TIMEBASE=1/1000&#xA;START=2501000&#xA;END=2839000&#xA;title=Niamh&#x27;s Capers&#xA;

    &#xA;

    If I delete everything after the second chapter, the file processes. It always fails if I add more chapters.

    &#xA;

    I've also tried using things like :

    &#xA;

    -map 0:v -map 0:a -map 0:s&#xA;

    &#xA;

    Any help is much appreciated. I'm kind of at my wits end here.

    &#xA;

    Thanks.

    &#xA;