Recherche avancée

Médias (0)

Mot : - Tags -/alertes

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

Autres articles (66)

  • 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

  • Les vidéos

    21 avril 2011, par

    Comme les documents de type "audio", Mediaspip affiche dans la mesure du possible les vidéos grâce à la balise html5 .
    Un des inconvénients de cette balise est qu’elle n’est pas reconnue correctement par certains navigateurs (Internet Explorer pour ne pas le nommer) et que chaque navigateur ne gère en natif que certains formats de vidéos.
    Son avantage principal quant à lui est de bénéficier de la prise en charge native de vidéos dans les navigateur et donc de se passer de l’utilisation de Flash et (...)

  • Soumettre améliorations et plugins supplémentaires

    10 avril 2011

    Si vous avez développé une nouvelle extension permettant d’ajouter une ou plusieurs fonctionnalités utiles à MediaSPIP, faites le nous savoir et son intégration dans la distribution officielle sera envisagée.
    Vous pouvez utiliser la liste de discussion de développement afin de le faire savoir ou demander de l’aide quant à la réalisation de ce plugin. MediaSPIP étant basé sur SPIP, il est également possible d’utiliser le liste de discussion SPIP-zone de SPIP pour (...)

Sur d’autres sites (9393)

  • avcodec/mpegvideo_enc : Don't find encoder by ID

    28 janvier 2022, par Andreas Rheinhardt
    avcodec/mpegvideo_enc : Don't find encoder by ID
    

    mpegvideo-based encoders supporting bframes implement this
    by opening encoders of their own to test how long the chains
    of bframes are supposed to be. The needed AVCodec was obtained
    via avcodec_find_encoder(). This is complicated, as the current
    encoder can be directly obtained. And it also is not guaranteed
    that one actually gets the current encoder or not another encoder
    for the same codec ID (the latter does not seem to be the case now).

    Signed-off-by : Andreas Rheinhardt <andreas.rheinhardt@outlook.com>

    • [DH] libavcodec/mpegvideo_enc.c
  • FFMPEG command for video and audio

    19 mai 2012, par StackOverflowNewbie

    I'm not building the next YouTube or iTunes, but I do need to give my users the ability to upload their videos and audios — then present it on the web at the highest possible quality with the lowest possible file size.

    Questions :

    1. FOR INPUT : What video and audio formats should I support ? I'm guessing I should try to support the most common formats, but I'm not entirely sure what they are. Also, I'm not sure if I should support the most common formats. Maybe there is a reason not to support a certain format.

    2. FOR OUTPUT : What video and audio output formats should I generate ? I'd like to use HTML5's and tags, but know I should consider supporting non-HTML5 browsers. Should I do OGG, MP4 and FLV for videos ? What about audios ?

    3. Given an unknown video and audio file uploaded by the user, what command should I use to generate the desired output formats. I'd like one command to convert to particular outputs — and hopefully not have to do anything different to the commands depending on the input (it'll be a pain for me to know what the MIME type is of the file, etc. and can't really do an "if input is a WMV, then run this command" logic).

    Suggestion FFMPEG experts ?

  • asyncio.create_subprocess_shell error : Future exception was never retrieved - BrokenPipeError

    10 juin 2021, par Abdelmalek

    Whenever I use asyncio.create_subprocess_shell() with sp.communicate() I get this error at the end of my program.

    &#xA;

    If I run multiple suprocesses using asyncio, the error would be print at the end for each one of them.

    &#xA;

    Aulthough it doesn't affect my program, I want to find the source and fix the issue. Thanks for the help !

    &#xA;

    Traceback :

    &#xA;

    Future exception was never retrieved&#xA;future: <future finished="finished" exception="BrokenPipeError(32," pipe="pipe" has="has" been="been">&#xA;Traceback (most recent call last):&#xA;  File "C:\Users\user\AppData\Local\Programs\Python\Python39\lib\asyncio\subprocess.py", line 153, in _feed_stdin&#xA;    await self.stdin.drain()&#xA;  File "C:\Users\user\AppData\Local\Programs\Python\Python39\lib\asyncio\streams.py", line 387, in drain&#xA;    await self._protocol._drain_helper()&#xA;  File "C:\Users\user\AppData\Local\Programs\Python\Python39\lib\asyncio\streams.py", line 197, in _drain_helper&#xA;    await waiter&#xA;  File "C:\Users\user\AppData\Local\Programs\Python\Python39\lib\asyncio\proactor_events.py", line 379, in _loop_writing&#xA;    f.result()&#xA;  File "C:\Users\user\AppData\Local\Programs\Python\Python39\lib\asyncio\windows_events.py", line 812, in _poll&#xA;    value = callback(transferred, key, ov)&#xA;  File "C:\Users\user\AppData\Local\Programs\Python\Python39\lib\asyncio\windows_events.py", line 538, in finish_send&#xA;    return ov.getresult()&#xA;BrokenPipeError: [WinError 109] The pipe has been ended&#xA;</future>

    &#xA;

    Code :

    &#xA;

    async def get(cs, url):&#xA;    async with cs.get(url) as r:&#xA;        b = b&#x27;&#x27;&#xA;        while True:&#xA;            chunk = await r.content.read(4000000)&#xA;            b &#x2B;= chunk&#xA;            if not chunk:&#xA;                break&#xA;        &#xA;        if int(r.headers[&#x27;content-length&#x27;]) &lt; 8000000:&#xA;            result = BytesIO(b)&#xA;            return [result, &#x27;full&#x27;]&#xA;        else:&#xA;            command = f"ffmpeg -y -i - -c:v copy -fs 8000000 -f matroska -"&#xA;            sp = await asyncio.create_subprocess_shell(command, stdin=asyncio.subprocess.PIPE,&#xA;                stdout=asyncio.subprocess.PIPE, stderr=asyncio.subprocess.PIPE)&#xA;            stdout, stderr = await sp.communicate(b)&#xA;            sp.wait()&#xA;&#xA;            print(stderr.decode())&#xA;            print(len(stdout))&#xA;            output = str(stderr)&#xA;            index_d = output.find(&#x27;Duration: &#x27;)&#xA;            index_t = output.rfind(&#x27;time=&#x27;)&#xA;            duration = await get_sec(output[index_d &#x2B; 10:].split(",")[0])&#xA;            time_ = await get_sec(output[index_t &#x2B; 5:].split(" ")[0])&#xA;            percentage = f"{round((time_ / duration) * 100)}%"&#xA;&#xA;            result = BytesIO(stdout)&#xA;            return [result, &#x27;preview&#x27;, percentage]&#xA;&#xA;async def main(urls):&#xA;    async with aiohttp.ClientSession() as cs:&#xA;            &#xA;        tasks = []&#xA;        for url in urls:&#xA;            task = asyncio.create_task(get(cs, url))&#xA;            tasks.append(task)&#xA;        &#xA;        results = []&#xA;        for task in tasks:&#xA;            result = await task&#xA;            results.append(result)&#xA;        &#xA;        return results&#xA;&#xA;loop = asyncio.get_event_loop()&#xA;results = loop.run_until_complete(main(urls))&#xA;

    &#xA;