Recherche avancée

Médias (0)

Mot : - Tags -/objet éditorial

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

Autres articles (6)

  • Submit bugs and patches

    13 avril 2011

    Unfortunately a software is never perfect.
    If you think you have found a bug, report it using our ticket system. Please to help us to fix it by providing the following information : the browser you are using, including the exact version as precise an explanation as possible of the problem if possible, the steps taken resulting in the problem a link to the site / page in question
    If you think you have solved the bug, fill in a ticket and attach to it a corrective patch.
    You may also (...)

  • Le plugin : Podcasts.

    14 juillet 2010, par

    Le problème du podcasting est à nouveau un problème révélateur de la normalisation des transports de données sur Internet.
    Deux formats intéressants existent : Celui développé par Apple, très axé sur l’utilisation d’iTunes dont la SPEC est ici ; Le format "Media RSS Module" qui est plus "libre" notamment soutenu par Yahoo et le logiciel Miro ;
    Types de fichiers supportés dans les flux
    Le format d’Apple n’autorise que les formats suivants dans ses flux : .mp3 audio/mpeg .m4a audio/x-m4a .mp4 (...)

  • Other interesting software

    13 avril 2011, par

    We don’t claim to be the only ones doing what we do ... and especially not to assert claims to be the best either ... What we do, we just try to do it well and getting better ...
    The following list represents softwares that tend to be more or less as MediaSPIP or that MediaSPIP tries more or less to do the same, whatever ...
    We don’t know them, we didn’t try them, but you can take a peek.
    Videopress
    Website : http://videopress.com/
    License : GNU/GPL v2
    Source code : (...)

Sur d’autres sites (3863)

  • Send inputs to a process (ffmpeg) using python

    10 mai 2023, par Noddy

    I am trying to program a custom screen recording functionality, but I have problems sending input to a process.

    


    To achieve this I use ffmpeg. The idea is that I have two scripts A and B

    


    A : Begin recording - create a ffmpeg subprocess that records the screen and writes the process id (pid) to a file

    


    B : Stop the recording - Read the pid from the file and send a 'q' input to the process to stop the recording

    


    This is my code :

    


    A :

    


    import shlex
import subprocess
import time
import datetime

# Variables
success = True
flowName = "workflow1"

# Get current date and time
now = datetime.datetime.now()

formatted_date = now.strftime("%Y-%m-%d %H:%M:%S")

folderDestination = f"C:\\Users\\MadPe\\Desktop\\pipRec\\workFlows\\{flowName}\\"

formatted_date = formatted_date.replace(":",".").replace(" ","_")

fileName = folderDestination + formatted_date + ".mp4"

ffmpegPath = r"C:\Users\MadPe\Desktop\pipRec\ffmpeg\bin\ffmpeg.exe"

command = shlex.split(f'"{ffmpegPath}" -f gdigrab -framerate 30 -offset_x 0 -offset_y 0 -video_size 1920x1080 -i desktop -y "{fileName}"')
process = subprocess.Popen(command, stdin=subprocess.PIPE)

pid = process.pid
startTime = time.time()

with open("filename.txt", "w") as file:
    file.write(str(pid))

#process.stdin.write(b'q\n') #-- this is how I stop the recording
#process.stdin.flush()       #-- but I want to do this from another script


    


    B :

    


    import psutil

# Stop recording and kill Process
with open("filename.txt", "r") as f:
    pid = int(f.read().strip())

if psutil.pid_exists(pid):
    process = psutil.Process(pid)
    process.stdin.write(b'q\n')
    process.stdin.flush()
else:
    print(f"Process with PID {pid} is not running.")


    


    however, when I try to stop the running process I get this error :

    


    Error Message

    


    I hope some of you may be able to spot what I am doing wrong.
also if I comment in the last two lines in A it will make the recording stop, but I want to be able to do this from running B

    


    demo : https://www.veed.io/view/ab4ef053-bba9-43f9-85c5-6ca18204ea37?sharingWidget=true&panel=share

    


  • Hello. I'd like to play a video on my app on android, I tried with videoplayer, it works but doesn't load the video simply open theUI but not thevideo

    26 octobre 2022, par Abdul

    I'd like to play a video on my app on android, I tried with videoplayer, it works but doesn't load the video ( simply open the UI but not the video).

    


    I found out i may need ffpyplayer so I changed buildozer requirements :
requirements = python3,kivy, android,ffpyplayer

    


    but buildozer failed to build apk when i added ffpyplayer and ffmpeg in buildozer.spec file in requirement.

    


    [DEBUG]:    If you think configure made a mistake, make sure you are using the latest&#xA;[DEBUG]:    version from Git.  If the latest version fails, report the problem to the&#xA;[DEBUG]:    ffmpeg-user@ffmpeg.org mailing list or IRC #ffmpeg on irc.freenode.net.&#xA;[DEBUG]:    Include the log file "ffbuild/config.log" produced by configure as this will help&#xA;[DEBUG]:    solve the problem.&#xA;Exception in thread background thread for pid 77802:&#xA;Traceback (most recent call last):&#xA;  File "/usr/lib/python3.7/threading.py", line 926, in _bootstrap_inner&#xA;    self.run()&#xA;  File "/usr/lib/python3.7/threading.py", line 870, in run&#xA;    self._target(*self._args, **self._kwargs)&#xA;  File "/usr/local/lib/python3.7/dist-packages/sh.py", line 1641, in wrap&#xA;    fn(*rgs, **kwargs)&#xA;  File "/usr/local/lib/python3.7/dist-packages/sh.py", line 2569, in background_thread&#xA;    handle_exit_code(exit_code)&#xA;  File "/usr/local/lib/python3.7/dist-packages/sh.py", line 2269, in fn&#xA;    return self.command.handle_command_exit_code(exit_code)&#xA;  File "/usr/local/lib/python3.7/dist-packages/sh.py", line 869, in handle_command_exit_code&#xA;    raise exc&#xA;sh.ErrorReturnCode_1: &#xA;&#xA;  RAN: /content/.buildozer/android/platform/build-armeabi-v7a/build/other_builds/ffmpeg/armeabi-v7a__ndk_target_21/ffmpeg/configure --disable-everything --enable-openssl --enable-nonfree --enable-protocol=https,tls_openssl --enable-gpl --enable-libx264 --enable-libshine --enable-libvpx --enable-parsers --enable-decoders --enable-encoders --enable-muxers --enable-demuxers --disable-symver --disable-programs --disable-doc --enable-filter=aresample,resample,crop,adelay,volume,scale --enable-protocol=file,http,hls,udp,tcp --enable-small --enable-hwaccels --enable-pic --disable-static --disable-debug --enable-shared --target-os=android --enable-cross-compile --cross-prefix=armv7a-linux-androideabi21- --arch=arm --strip=/root/.buildozer/android/platform/android-ndk-r23b/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-strip --sysroot=/root/.buildozer/android/platform/android-ndk-r23b/toolchains/llvm/prebuilt/linux-x86_64/sysroot --enable-neon --prefix=/content/.buildozer/android/platform/build-armeabi-v7a/build/other_builds/ffmpeg/armeabi-v7a__ndk_target_21/ffmpeg&#xA;&#xA;  STDOUT:&#xA;tput: No value for $TERM and no -T specified&#xA;tput: No value for $TERM and no -T specified&#xA;armv7a-linux-androideabi21-clang is unable to create an executable file.&#xA;C compiler test failed.&#xA;&#xA;If you think configure made a mistake, make sure you are using the latest&#xA;version from Git.  If the latest version fails, report the problem to the&#xA;ffmpeg-user@ffmpeg.org mailing list or IRC #ffmpeg on irc.freenode.net.&#xA;Include the log file "ffbuild/config.log" produced by configure as this will help&#xA;solve the problem.&#xA;&#xA;&#xA;  STDERR:&#xA;&#xA;&#xA;Traceback (most recent call last):&#xA;  File "/usr/lib/python3.7/runpy.py", line 193, in _run_module_as_main&#xA;    "__main__", mod_spec)&#xA;  File "/usr/lib/python3.7/runpy.py", line 85, in _run_code&#xA;    exec(code, run_globals)&#xA;  File "/content/.buildozer/android/platform/python-for-android/pythonforandroid/toolchain.py", line 1297, in <module>&#xA;    main()&#xA;  File "/content/.buildozer/android/platform/python-for-android/pythonforandroid/entrypoints.py", line 18, in main&#xA;    ToolchainCL()&#xA;  File "/content/.buildozer/android/platform/python-for-android/pythonforandroid/toolchain.py", line 730, in __init__&#xA;    getattr(self, command)(args)&#xA;  File "/content/.buildozer/android/platform/python-for-android/pythonforandroid/toolchain.py", line 153, in wrapper_func&#xA;    build_dist_from_args(ctx, dist, args)&#xA;  File "/content/.buildozer/android/platform/python-for-android/pythonforandroid/toolchain.py", line 215, in build_dist_from_args&#xA;    args, "ignore_setup_py", False&#xA;  File "/content/.buildozer/android/platform/python-for-android/pythonforandroid/build.py", line 505, in build_recipes&#xA;    recipe.build_arch(arch)&#xA;  File "/content/.buildozer/android/platform/python-for-android/pythonforandroid/recipes/ffmpeg/__init__.py", line 143, in build_arch&#xA;    shprint(configure, *flags, _env=env)&#xA;  File "/content/.buildozer/android/platform/python-for-android/pythonforandroid/logger.py", line 167, in shprint&#xA;    for line in output:&#xA;  File "/usr/local/lib/python3.7/dist-packages/sh.py", line 915, in next&#xA;    self.wait()&#xA;  File "/usr/local/lib/python3.7/dist-packages/sh.py", line 845, in wait&#xA;    self.handle_command_exit_code(exit_code)&#xA;  File "/usr/local/lib/python3.7/dist-packages/sh.py", line 869, in handle_command_exit_code&#xA;    raise exc&#xA;sh.ErrorReturnCode_1: &#xA;&#xA;  RAN: /content/.buildozer/android/platform/build-armeabi-v7a/build/other_builds/ffmpeg/armeabi-v7a__ndk_target_21/ffmpeg/configure --disable-everything --enable-openssl --enable-nonfree --enable-protocol=https,tls_openssl --enable-gpl --enable-libx264 --enable-libshine --enable-libvpx --enable-parsers --enable-decoders --enable-encoders --enable-muxers --enable-demuxers --disable-symver --disable-programs --disable-doc --enable-filter=aresample,resample,crop,adelay,volume,scale --enable-protocol=file,http,hls,udp,tcp --enable-small --enable-hwaccels --enable-pic --disable-static --disable-debug --enable-shared --target-os=android --enable-cross-compile --cross-prefix=armv7a-linux-androideabi21- --arch=arm --strip=/root/.buildozer/android/platform/android-ndk-r23b/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-strip --sysroot=/root/.buildozer/android/platform/android-ndk-r23b/toolchains/llvm/prebuilt/linux-x86_64/sysroot --enable-neon --prefix=/content/.buildozer/android/platform/build-armeabi-v7a/build/other_builds/ffmpeg/armeabi-v7a__ndk_target_21/ffmpeg&#xA;&#xA;  STDOUT:&#xA;tput: No value for $TERM and no -T specified&#xA;tput: No value for $TERM and no -T specified&#xA;armv7a-linux-androideabi21-clang is unable to create an executable file.&#xA;C compiler test failed.&#xA;&#xA;If you think configure made a mistake, make sure you are using the latest&#xA;version from Git.  If the latest version fails, report the problem to the&#xA;ffmpeg-user@ffmpeg.org mailing list or IRC #ffmpeg on irc.freenode.net.&#xA;Include the log file "ffbuild/config.log" produced by configure as this will help&#xA;solve the problem.&#xA;&#xA;&#xA;  STDERR:&#xA;&#xA;# Command failed: /usr/bin/python3 -m pythonforandroid.toolchain create --dist_name=myapp --bootstrap=sdl2 --requirements=python3,ffpyplayer,kivy,openssl,certifi,android,pytube,plyer,pyjnius,kivmob,jnius,future,libshine,libx264,ffpyplayer_codecs,Pillow,liblzma,opencv,requests,urllib3,chardet,idna,youtube_search --arch armeabi-v7a --copy-libs --color=always --storage-dir="/content/.buildozer/android/platform/build-armeabi-v7a" --ndk-api=21 --ignore-setup-py --debug&#xA;# ENVIRONMENT:&#xA;#     NV_LIBCUBLAS_DEV_VERSION = &#x27;11.4.1.1043-1&#x27;&#xA;#     NV_CUDA_COMPAT_PACKAGE = &#x27;cuda-compat-11-2&#x27;&#xA;#     NV_CUDNN_PACKAGE_DEV = &#x27;libcudnn8-dev=8.1.1.33-1&#x2B;cuda11.2&#x27;&#xA;#     PYDEVD_USE_FRAME_EVAL = &#x27;NO&#x27;&#xA;#     LD_LIBRARY_PATH = &#x27;/usr/local/nvidia/lib:/usr/local/nvidia/lib64&#x27;&#xA;#     NV_LIBNCCL_DEV_PACKAGE = &#x27;libnccl-dev=2.8.4-1&#x2B;cuda11.2&#x27;&#xA;#     TCLLIBPATH = &#x27;/usr/share/tcltk/tcllib1.19&#x27;&#xA;#     CLOUDSDK_PYTHON = &#x27;python3&#x27;&#xA;#     LANG = &#x27;en_US.UTF-8&#x27;&#xA;#     NV_LIBNPP_DEV_PACKAGE = &#x27;libnpp-dev-11-2=11.3.2.152-1&#x27;&#xA;#     ENABLE_DIRECTORYPREFETCHER = &#x27;1&#x27;&#xA;#     HOSTNAME = &#x27;875ade0bb031&#x27;&#xA;#     OLDPWD = &#x27;/&#x27;&#xA;#     CLOUDSDK_CONFIG = &#x27;/content/.config&#x27;&#xA;#     USE_AUTH_EPHEM = &#x27;1&#x27;&#xA;#     NV_LIBNPP_VERSION = &#x27;11.3.2.152-1&#x27;&#xA;#     NV_NVPROF_DEV_PACKAGE = &#x27;cuda-nvprof-11-2=11.2.152-1&#x27;&#xA;#     NVIDIA_VISIBLE_DEVICES = &#x27;all&#x27;&#xA;#     NV_NVPROF_VERSION = &#x27;11.2.152-1&#x27;&#xA;#     NV_LIBCUSPARSE_VERSION = &#x27;11.4.1.1152-1&#x27;&#xA;#     DATALAB_SETTINGS_OVERRIDES = &#x27;{"kernelManagerProxyPort":6000,"kernelManagerProxyHost":"172.28.0.3","jupyterArgs":["--ip=172.28.0.2"],"debugAdapterMultiplexerPath":"/usr/local/bin/dap_multiplexer","enableLsp":true}&#x27;&#xA;#     NV_LIBCUBLAS_DEV_PACKAGE = &#x27;libcublas-dev-11-2=11.4.1.1043-1&#x27;&#xA;#     ENV = &#x27;/root/.bashrc&#x27;&#xA;#     PAGER = &#x27;cat&#x27;&#xA;#     NCCL_VERSION = &#x27;2.8.4-1&#x27;&#xA;#     TF_FORCE_GPU_ALLOW_GROWTH = &#x27;true&#x27;&#xA;#     JPY_PARENT_PID = &#x27;60&#x27;&#xA;#     NO_GCE_CHECK = &#x27;False&#x27;&#xA;#     PWD = &#x27;/content&#x27;&#xA;#     NVARCH = &#x27;x86_64&#x27;&#xA;#     NV_LIBCUSPARSE_DEV_VERSION = &#x27;11.4.1.1152-1&#x27;&#xA;#     HOME = &#x27;/root&#x27;&#xA;#     KMP_LISTEN_PORT = &#x27;6000&#x27;&#xA;#     LAST_FORCED_REBUILD = &#x27;20221021&#x27;&#xA;#     CLICOLOR = &#x27;1&#x27;&#xA;#     NV_LIBNCCL_PACKAGE_VERSION = &#x27;2.8.4-1&#x27;&#xA;#     NV_LIBNCCL_PACKAGE = &#x27;libnccl2=2.8.4-1&#x2B;cuda11.2&#x27;&#xA;#     DEBIAN_FRONTEND = &#x27;noninteractive&#x27;&#xA;#     NV_LIBNCCL_DEV_PACKAGE_NAME = &#x27;libnccl-dev&#x27;&#xA;#     NV_CUDA_LIB_VERSION = &#x27;11.2.2-1&#x27;&#xA;#     NV_LIBNPP_PACKAGE = &#x27;libnpp-11-2=11.3.2.152-1&#x27;&#xA;#     NV_LIBNCCL_PACKAGE_NAME = &#x27;libnccl2&#x27;&#xA;#     LIBRARY_PATH = &#x27;/usr/local/cuda/lib64/stubs&#x27;&#xA;#     NV_NVTX_VERSION = &#x27;11.2.152-1&#x27;&#xA;#     NV_LIBCUBLAS_VERSION = &#x27;11.4.1.1043-1&#x27;&#xA;#     NV_LIBCUBLAS_PACKAGE = &#x27;libcublas-11-2=11.4.1.1043-1&#x27;&#xA;#     GCE_METADATA_TIMEOUT = &#x27;3&#x27;&#xA;#     NV_CUDNN_VERSION = &#x27;8.1.1.33&#x27;&#xA;#     VM_GCE_METADATA_HOST = &#x27;169.254.169.254&#x27;&#xA;#     NV_CUDA_CUDART_DEV_VERSION = &#x27;11.2.152-1&#x27;&#xA;#     KMP_TARGET_PORT = &#x27;9000&#x27;&#xA;#     GLIBCPP_FORCE_NEW = &#x27;1&#x27;&#xA;#     TBE_CREDS_ADDR = &#x27;172.28.0.1:8008&#x27;&#xA;#     TERM = &#x27;xterm-color&#x27;&#xA;#     SHELL = &#x27;/bin/bash&#x27;&#xA;#     GCS_READ_CACHE_BLOCK_SIZE_MB = &#x27;16&#x27;&#xA;#     NV_NVML_DEV_VERSION = &#x27;11.2.152-1&#x27;&#xA;#     PYTHONWARNINGS = &#x27;ignore:::pip._internal.cli.base_command&#x27;&#xA;#     MPLBACKEND = &#x27;module://ipykernel.pylab.backend_inline&#x27;&#xA;#     CUDA_VERSION = &#x27;11.2.2&#x27;&#xA;#     NV_LIBCUBLAS_PACKAGE_NAME = &#x27;libcublas-11-2&#x27;&#xA;#     NVIDIA_DRIVER_CAPABILITIES = &#x27;compute,utility&#x27;&#xA;#     TBE_RUNTIME_ADDR = &#x27;172.28.0.1:8011&#x27;&#xA;#     SHLVL = &#x27;1&#x27;&#xA;#     PYTHONPATH = &#x27;/env/python&#x27;&#xA;#     NV_LIBCUBLAS_DEV_PACKAGE_NAME = &#x27;libcublas-dev-11-2&#x27;&#xA;#     NVIDIA_REQUIRE_CUDA = (&#x27;cuda>=11.2 brand=tesla,driver>=418,driver&lt;419 &#x27;&#xA; &#x27;brand=tesla,driver>=450,driver&lt;451&#x27;)&#xA;#     NV_LIBNPP_DEV_VERSION = &#x27;11.3.2.152-1&#x27;&#xA;#     TBE_EPHEM_CREDS_ADDR = &#x27;172.28.0.1:8009&#x27;&#xA;#     NV_CUDA_CUDART_VERSION = &#x27;11.2.152-1&#x27;&#xA;#     NV_CUDNN_PACKAGE_NAME = &#x27;libcudnn8&#x27;&#xA;#     GLIBCXX_FORCE_NEW = &#x27;1&#x27;&#xA;#     PATH = &#x27;/root/.buildozer/android/platform/apache-ant-1.9.4/bin:/opt/bin:/usr/local/nvidia/bin:/usr/local/cuda/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/tools/node/bin:/tools/google-cloud-sdk/bin&#x27;&#xA;#     NV_LIBNCCL_DEV_PACKAGE_VERSION = &#x27;2.8.4-1&#x27;&#xA;#     LD_PRELOAD = &#x27;/usr/lib/x86_64-linux-gnu/libtcmalloc.so.4&#x27;&#xA;#     NV_CUDNN_PACKAGE = &#x27;libcudnn8=8.1.1.33-1&#x2B;cuda11.2&#x27;&#xA;#     GIT_PAGER = &#x27;cat&#x27;&#xA;#     _ = &#x27;/usr/local/bin/buildozer&#x27;&#xA;#     PACKAGES_PATH = &#x27;/root/.buildozer/android/packages&#x27;&#xA;#     ANDROIDSDK = &#x27;/root/.buildozer/android/platform/android-sdk&#x27;&#xA;#     ANDROIDNDK = &#x27;/root/.buildozer/android/platform/android-ndk-r23b&#x27;&#xA;#     ANDROIDAPI = &#x27;30&#x27;&#xA;#     ANDROIDMINAPI = &#x27;21&#x27;&#xA;# &#xA;# Buildozer failed to execute the last command&#xA;# The error might be hidden in the log above this error&#xA;# Please read the full log, and search for it before&#xA;# raising an issue with buildozer itself.&#xA;# In case of a bug report, please add a full log with log_level = 2&#xA;</module>

    &#xA;

    kindly help me anyone would be very appreciate thank you.

    &#xA;

  • 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;