Recherche avancée

Médias (91)

Autres articles (99)

  • Personnaliser en ajoutant son logo, sa bannière ou son image de fond

    5 septembre 2013, par

    Certains thèmes prennent en compte trois éléments de personnalisation : l’ajout d’un logo ; l’ajout d’une bannière l’ajout d’une image de fond ;

  • Emballe médias : à quoi cela sert ?

    4 février 2011, par

    Ce plugin vise à gérer des sites de mise en ligne de documents de tous types.
    Il crée des "médias", à savoir : un "média" est un article au sens SPIP créé automatiquement lors du téléversement d’un document qu’il soit audio, vidéo, image ou textuel ; un seul document ne peut être lié à un article dit "média" ;

  • Ajouter notes et légendes aux images

    7 février 2011, par

    Pour pouvoir ajouter notes et légendes aux images, la première étape est d’installer le plugin "Légendes".
    Une fois le plugin activé, vous pouvez le configurer dans l’espace de configuration afin de modifier les droits de création / modification et de suppression des notes. Par défaut seuls les administrateurs du site peuvent ajouter des notes aux images.
    Modification lors de l’ajout d’un média
    Lors de l’ajout d’un média de type "image" un nouveau bouton apparait au dessus de la prévisualisation (...)

Sur d’autres sites (9586)

  • Python asyncio subprocess code returns "pipe closed by peer or os.write(pipe, data) raised exception."

    4 novembre 2022, par Duke Dougal

    I am trying to convert a synchronous Python process to asyncio. Any ideas what I am doing wrong ?

    


    This is the synchronous code which successfully starts ffmpeg and converts a directory of webp files into a video.

    


    import subprocess
import shlex
from os import listdir
from os.path import isfile, join

output_filename = 'output.mp4'
process = subprocess.Popen(shlex.split(f'ffmpeg -y -framerate 60 -i pipe: -vcodec libx265 -pix_fmt yuv420p -crf 24 output.mp4'), stdin=subprocess.PIPE)

thepath = '/home/ubuntu/webpfiles/'
thefiles = [f for f in listdir(thepath) if isfile(join(thepath, f))]
for filename in thefiles:
    absolute_path = f'{thepath}{filename}'
    with open(absolute_path, 'rb') as f:
        process.stdin.write(f.read())

process.stdin.close()
process.wait()
process.terminate()


    


    This async code fails :

    


    from os import listdir
from os.path import isfile, join
import shlex
import asyncio

outputfilename = 'output.mp4'

async def write_stdin(proc):
    thepath = '/home/ubuntu/webpfiles/'
    thefiles = [f for f in listdir(thepath) if isfile(join(thepath, f))]
    thefiles.sort()
    for filename in thefiles:
        absolute_path = f'{thepath}{filename}'
        with open(absolute_path, 'rb') as f:
            await proc.communicate(input=f.read())

async def create_ffmpeg_subprocess():
    bin = f'/home/ubuntu/bin/ffmpeg'
    params = f'-y -framerate 60 -i pipe: -vcodec libx265 -pix_fmt yuv420p -crf 24 {outputfilename}'
    proc = await asyncio.create_subprocess_exec(
        bin,
        *shlex.split(params),
        stdin=asyncio.subprocess.PIPE,
        stdout=asyncio.subprocess.PIPE,
        stderr=asyncio.subprocess.PIPE,
    )
    return proc

async def start():
    loop = asyncio.get_event_loop()
    proc = await create_ffmpeg_subprocess()
    task_stdout = loop.create_task(write_stdin(proc))
    await asyncio.gather(task_stdout)

if __name__ == '__main__':
    asyncio.run(start())


    


    The output for the async code is :

    


    pipe closed by peer or os.write(pipe, data) raised exception.
pipe closed by peer or os.write(pipe, data) raised exception.
pipe closed by peer or os.write(pipe, data) raised exception.
pipe closed by peer or os.write(pipe, data) raised exception.
pipe closed by peer or os.write(pipe, data) raised exception.
pipe closed by peer or os.write(pipe, data) raised exception.
pipe closed by peer or os.write(pipe, data) raised exception.
pipe closed by peer or os.write(pipe, data) raised exception.
pipe closed by peer or os.write(pipe, data) raised exception.
pipe closed by peer or os.write(pipe, data) raised exception.
pipe closed by peer or os.write(pipe, data) raised exception.
pipe closed by peer or os.write(pipe, data) raised exception.
pipe closed by peer or os.write(pipe, data) raised exception.
pipe closed by peer or os.write(pipe, data) raised exception.
pipe closed by peer or os.write(pipe, data) raised exception.
pipe closed by peer or os.write(pipe, data) raised exception.


    


    etc - one line for each webp file

    


  • Piwik PRO is hiring a Project Coordinator (Job description)

    18 février 2015, par Matthieu Aubry — Jobs

    At Piwik and Piwik PRO we develop the leading open source web analytics platform, used by more than one million websites worldwide. Our vision is to build the best open alternative to Google Universal Analytics. We are growing and now looking for a Project Coordinator !

    What will you be doing ?

    • Participating in calls with Piwik PRO clients and analyzing requirements for enterprise customers
    • Planning and coordinating the implementation of projects
    • Helping customers to improve and adjust data reporting methods to suit their needs
    • Functioning as the voice of the customer and provide internal feedback on how Piwik PRO can better serve our customers

    What do we expect from you ?

    • Fluent command of English (both in writing and speaking), confidence to communicate in formal conversations and a good knowledge of business English
    • Previous experience in working with corporate clients
    • Great communication skills
    • A proactive attitude and the ability to use your initiative
    • Ability to achieve goals without detailed instructions

    Possessing these assets would be an advantage :

    • Technical knowledge associated with using data analytics platforms
    • Data analysis and interpretation skills
    • Knowledge of German or French
    • Knowledge of Piwik Analytics

    What can you expect from us ?

    • Flexible cooperation
    • An attractive salary
    • The opportunity to develop your skills and gain more experience by working on exceptional projects
    • Multisport Card
    • Access to a regularly updated resource library and the opportunity to contribute to it
    • Flexible working hours
    • Unforgettable parties and integration trips
    • A completely unique work atmosphere – we really like to keep things informal

    Location

    We have offices in Poland and New Zealand, and Remote work is possible.

    Ideally you will be located in the USA or in Europe where most of our clients are based.

    Apply online

    To apply for this position, please Apply online here. We look forward to receiving your applications !

  • Piwik PRO is hiring a Project Coordinator (Job description)

    18 février 2015, par Matthieu Aubry — Jobs

    At Piwik and Piwik PRO we develop the leading open source web analytics platform, used by more than one million websites worldwide. Our vision is to build the best open alternative to Google Universal Analytics. We are growing and now looking for a Project Coordinator !

    What will you be doing ?

    • Participating in calls with Piwik PRO clients and analyzing requirements for enterprise customers
    • Planning and coordinating the implementation of projects
    • Helping customers to improve and adjust data reporting methods to suit their needs
    • Functioning as the voice of the customer and provide internal feedback on how Piwik PRO can better serve our customers

    What do we expect from you ?

    • Fluent command of English (both in writing and speaking), confidence to communicate in formal conversations and a good knowledge of business English
    • Previous experience in working with corporate clients
    • Great communication skills
    • A proactive attitude and the ability to use your initiative
    • Ability to achieve goals without detailed instructions

    Possessing these assets would be an advantage :

    • Technical knowledge associated with using data analytics platforms
    • Data analysis and interpretation skills
    • Knowledge of German or French
    • Knowledge of Piwik Analytics

    What can you expect from us ?

    • Flexible cooperation
    • An attractive salary
    • The opportunity to develop your skills and gain more experience by working on exceptional projects
    • Multisport Card
    • Access to a regularly updated resource library and the opportunity to contribute to it
    • Flexible working hours
    • Unforgettable parties and integration trips
    • A completely unique work atmosphere – we really like to keep things informal

    Location

    We have offices in Poland and New Zealand, and Remote work is possible.

    Ideally you will be located in the USA or in Europe where most of our clients are based.

    Apply online

    To apply for this position, please Apply online here. We look forward to receiving your applications !