Recherche avancée

Médias (0)

Mot : - Tags -/auteurs

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

Autres articles (88)

  • Websites made ​​with MediaSPIP

    2 mai 2011, par

    This page lists some websites based on MediaSPIP.

  • La file d’attente de SPIPmotion

    28 novembre 2010, par

    Une file d’attente stockée dans la base de donnée
    Lors de son installation, SPIPmotion crée une nouvelle table dans la base de donnée intitulée spip_spipmotion_attentes.
    Cette nouvelle table est constituée des champs suivants : id_spipmotion_attente, l’identifiant numérique unique de la tâche à traiter ; id_document, l’identifiant numérique du document original à encoder ; id_objet l’identifiant unique de l’objet auquel le document encodé devra être attaché automatiquement ; objet, le type d’objet auquel (...)

  • Creating farms of unique websites

    13 avril 2011, par

    MediaSPIP platforms can be installed as a farm, with a single "core" hosted on a dedicated server and used by multiple websites.
    This allows (among other things) : implementation costs to be shared between several different projects / individuals rapid deployment of multiple unique sites creation of groups of like-minded sites, making it possible to browse media in a more controlled and selective environment than the major "open" (...)

Sur d’autres sites (9500)

  • avcodec/ffv1dec : Limit size of fltmap* to pixel number

    3 avril, par Michael Niedermayer
    avcodec/ffv1dec : Limit size of fltmap* to pixel number
    

    This reduces needed memory and also removes the 65536 maximum for remap
    on the decoder side

    Signed-off-by : Michael Niedermayer <michael@niedermayer.cc>

    • [DH] libavcodec/ffv1.c
    • [DH] libavcodec/ffv1.h
    • [DH] libavcodec/ffv1dec.c
  • avcodec/aac/aacdec_lpd : Limit get_unary()

    8 février, par Michael Niedermayer
    avcodec/aac/aacdec_lpd : Limit get_unary()
    

    The limit is based on later code storing 32bits

    Fixes : signed integer overflow : 2147483647 + 1 cannot be represented in type 'int'
    Fixes : 393164866/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_AAC_LATM_fuzzer-4606798354513920

    Found-by : continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
    Signed-off-by : Michael Niedermayer <michael@niedermayer.cc>

    • [DH] libavcodec/aac/aacdec_lpd.c
  • Can i limit CPU usage of my Script ? Raspberry pi cpu crashing - rebooting [duplicate]

    5 novembre 2024, par Mateus Coelho

    I have a script, in python, that converts a video of 11mb, 30fps, 1080p. the code puts 4 imagens into it, with overlay, and rotates 90.&#xA;When i run the script into the raspberry pi, it goes off CPU, all the 4 threads go to 100% and it suently reboots.

    &#xA;

    Raspberry pi 4 b 4gb

    &#xA;

    I want to limit the cpu to like 60% to the script... its not a problems to be longer in time.

    &#xA;

    import subprocess&#xA;import sys&#xA;import time&#xA;import psutil&#xA;import os&#xA;&#xA;def overlay_images_on_video(input_file, image_files, output_file, positions, image_size=(100, 100), opacity=0.7):&#xA;    start_time = time.time()&#xA;    process = psutil.Process(os.getpid())&#xA;&#xA;    inputs = [&#x27;-i&#x27;, input_file]&#xA;    for image in image_files:&#xA;        if image:&#xA;            inputs &#x2B;= [&#x27;-i&#x27;, image]&#xA;    filter_complex = "[0:v]transpose=2[rotated];"&#xA;    current_stream = "[rotated]"&#xA;    for i, (x_offset, y_offset) in enumerate(positions):&#xA;        filter_complex &#x2B;= f"[{i&#x2B;1}:v]scale={image_size[0]}:{image_size[1]},format=rgba,colorchannelmixer=aa={opacity}[img{i}];"&#xA;        filter_complex &#x2B;= f"{current_stream}[img{i}]overlay={x_offset}:{y_offset}"&#xA;        if i &lt; len(positions) - 1:&#xA;            filter_complex &#x2B;= f"[tmp{i}];"&#xA;            current_stream = f"[tmp{i}]"&#xA;        else:&#xA;            filter_complex &#x2B;= ""&#xA;    command = [&#x27;ffmpeg&#x27;, &#x27;-threads&#x27;, &#x27;1&#x27;] &#x2B; inputs &#x2B; [&#x27;-filter_complex&#x27;, filter_complex, output_file]&#xA;    &#xA;    try:&#xA;        subprocess.run(command, check=True)&#xA;        print(f"V&#xED;deo processado com sucesso: {output_file}")&#xA;    except subprocess.CalledProcessError as e:&#xA;        print(f"Erro ao processar o v&#xED;deo: {e}")&#xA;    &#xA;    # Monitoramento de tempo, mem&#xF3;ria e CPU&#xA;    elapsed_time = time.time() - start_time&#xA;    memory_info = process.memory_info()&#xA;    cpu_usage = process.cpu_percent(interval=1)&#xA;    print(f"Tempo de execu&#xE7;&#xE3;o: {elapsed_time:.2f} segundos")&#xA;    print(f"Mem&#xF3;ria usada: {memory_info.rss / (1024 * 1024):.2f} MB")&#xA;    print(f"Uso de CPU: {cpu_usage}%")&#xA;    &#xA;    # Monitoramento de GPU (se dispon&#xED;vel)&#xA;    try:&#xA;        gpu_usage = subprocess.check_output(&#xA;            ["nvidia-smi", "--query-gpu=utilization.gpu", "--format=csv,noheader,nounits"]&#xA;        ).decode("utf-8").strip()&#xA;        print(f"Uso de GPU: {gpu_usage}%")&#xA;    except FileNotFoundError:&#xA;        print("GPU n&#xE3;o detectada ou `nvidia-smi` n&#xE3;o est&#xE1; dispon&#xED;vel.")&#xA;&#xA;if __name__ == "__main__":&#xA;    input_video = sys.argv[1]&#xA;    image_files = sys.argv[2:5]&#xA;    output_video = sys.argv[5]&#xA;    &#xA;    positions = [(10, 10), (35, 1630), (800, 1630)]&#xA;    overlay_images_on_video(input_video, image_files, output_video, positions, image_size=(250, 250), opacity=0.8)&#xA;

    &#xA;

    EDITED :

    &#xA;

    The 4 cores of the CPU goes to 100%, i can see in another ssh terminal via htop, and it sudently reboots.&#xA;I have other 9 scripts running on the back, 6 ffmpeg stremas and 3 others to caputre the videos. When i add this logic to the other 3 that captures the video or i try to run directly one time, it reboots

    &#xA;