Recherche avancée

Médias (0)

Mot : - Tags -/presse-papier

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

Autres articles (112)

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

  • Le profil des utilisateurs

    12 avril 2011, par

    Chaque utilisateur dispose d’une page de profil lui permettant de modifier ses informations personnelle. Dans le menu de haut de page par défaut, un élément de menu est automatiquement créé à l’initialisation de MediaSPIP, visible uniquement si le visiteur est identifié sur le site.
    L’utilisateur a accès à la modification de profil depuis sa page auteur, un lien dans la navigation "Modifier votre profil" est (...)

  • Configurer la prise en compte des langues

    15 novembre 2010, par

    Accéder à la configuration et ajouter des langues prises en compte
    Afin de configurer la prise en compte de nouvelles langues, il est nécessaire de se rendre dans la partie "Administrer" du site.
    De là, dans le menu de navigation, vous pouvez accéder à une partie "Gestion des langues" permettant d’activer la prise en compte de nouvelles langues.
    Chaque nouvelle langue ajoutée reste désactivable tant qu’aucun objet n’est créé dans cette langue. Dans ce cas, elle devient grisée dans la configuration et (...)

Sur d’autres sites (28827)

  • MoviePy error : failed to read the first frame of video file... That may also mean that you are using a deprecated version of FFMPEG

    30 août 2023, par Alister Kwapisz

    When I run a python telegram bot script locally, it works completely fine but when I run the script on PythonAnywhere I get an error that shows up when I try to generate a video :

    


    "2023-08-29 15:21:53,138 (__init__.py:960 MainThread) ERROR - TeleBot: "Infinity polling exception: MoviePy error: failed to read the first frame of video file /home/AlisterK/video_clips/Video 2023-01-10 &#xA;18 45 07.mp4. That might mean that the file is corrupted. That may also mean that you are using a deprecated version of FFMPEG. On Ubuntu/Debian for instance the version in the repos is deprecated. Pleas&#xA;e update to a recent version from the website."&#xA;2023-08-29 15:21:53,138 (__init__.py:962 MainThread) ERROR - TeleBot: "Exception traceback:&#xA;Traceback (most recent call last):&#xA;  File "/home/AlisterK/.local/lib/python3.10/site-packages/telebot/__init__.py", line 955, in infinity_polling&#xA;    self.polling(non_stop=True, timeout=timeout, long_polling_timeout=long_polling_timeout,&#xA;  File "/home/AlisterK/.local/lib/python3.10/site-packages/telebot/__init__.py", line 1043, in polling&#xA;    self.__threaded_polling(non_stop=non_stop, interval=interval, timeout=timeout, long_polling_timeout=long_polling_timeout,&#xA;  File "/home/AlisterK/.local/lib/python3.10/site-packages/telebot/__init__.py", line 1118, in __threaded_polling&#xA;    raise e&#xA;  File "/home/AlisterK/.local/lib/python3.10/site-packages/telebot/__init__.py", line 1074, in __threaded_polling&#xA;    self.worker_pool.raise_exceptions()&#xA;  File "/home/AlisterK/.local/lib/python3.10/site-packages/telebot/util.py", line 147, in raise_exceptions&#xA;    raise self.exception_info&#xA;  File "/home/AlisterK/.local/lib/python3.10/site-packages/telebot/util.py", line 90, in run&#xA;    task(*args, **kwargs)&#xA;  File "/home/AlisterK/.local/lib/python3.10/site-packages/telebot/__init__.py", line 6788, in _run_middlewares_and_handler&#xA;    result = handler[&#x27;function&#x27;](message)&#xA;  File "/home/AlisterK/Video generator.py", line 34, in generate_video_command&#xA;    generated_video = generate_video(audio_files[user_id])&#xA;  File "/home/AlisterK/Video generator.py", line 72, in generate_video&#xA;    clips = [VideoFileClip(os.path.join(input_folder, clip_file)).subclip(0, clip_duration) for clip_file in video_clips]&#xA;  File "/home/AlisterK/Video generator.py", line 72, in <listcomp>&#xA;    clips = [VideoFileClip(os.path.join(input_folder, clip_file)).subclip(0, clip_duration) for clip_file in video_clips]&#xA;  File "/home/AlisterK/.local/lib/python3.10/site-packages/moviepy/video/io/VideoFileClip.py", line 88, in __init__&#xA;    self.reader = FFMPEG_VideoReader(filename, pix_fmt=pix_fmt,&#xA;  File "/home/AlisterK/.local/lib/python3.10/site-packages/moviepy/video/io/ffmpeg_reader.py", line 73, in __init__&#xA;    self.lastread = self.read_frame()&#xA;  File "/home/AlisterK/.local/lib/python3.10/site-packages/moviepy/video/io/ffmpeg_reader.py", line 133, in read_frame&#xA;    raise IOError(("MoviePy error: failed to read the first frame of "&#xA;OSError: MoviePy error: failed to read the first frame of video file /home/AlisterK/video_clips/Video 2023-01-10 18 45 07.mp4. That might mean that the file is corrupted. That may also mean that you are using a deprecated version of FFMPEG. On Ubuntu/Debian for instance the version in the repos is deprecated. Please update to a recent version from the website."&#xA;</listcomp>

    &#xA;

    I tried updating ffmpeg and moviepy. I even tried different versions but to no avail. The video clips are not corrupted as I checked.

    &#xA;

    This part of the code is responsible for generating the videos :

    &#xA;

    def generate_video(audio_path):&#xA;    input_folder = &#x27;/home/AlisterK/video_clips&#x27;  # Replace with your folder path&#xA;    output_file = &#x27;/home/AlisterK/output_combined_video.mp4&#x27;&#xA;    clip_duration = 3  # Duration of each clip in seconds&#xA;    num_clips = 10     # Number of video clips to select and combine&#xA;&#xA;    width = 1080  # Replace with your desired width&#xA;    height = 1920  # Replace with your desired height&#xA;&#xA;    video_clips = random_files_in_folder(input_folder, &#x27;.mp4&#x27;, num_clips)&#xA;&#xA;    clips = [VideoFileClip(os.path.join(input_folder, clip_file)).subclip(0, clip_duration) for clip_file in video_clips]&#xA;    standardized_clips = [clip.resize((width, height)) for clip in clips]  # Ensure consistent resolutions&#xA;&#xA;    final_clip = concatenate_videoclips(standardized_clips)&#xA;&#xA;    final_audio = AudioFileClip(audio_path)&#xA;

    &#xA;

  • ErrorCode 1 while merging 2 videos

    10 janvier 2023, par Stéphane de Luca

    I am trying to merge two videos but have an error code 1.

    &#xA;

    My command is as follows :

    &#xA;

      final command =&#xA;        &#x27;-y $commandPaths -filter_complex \&#x27;[0:0][1:0]concat=n=${paths.length}:v=1:a=0[out]\&#x27; -map \&#x27;[out]\&#x27; $outputPath&#x27;;&#xA;

    &#xA;

    I see the following error :

    &#xA;

    &#xA;

    I/flutter (17343) : Stream specifier ':0' in filtergraph description [0:0][1:0]concat=n=2:v=1:a=0[out] matches no streams.

    &#xA;

    &#xA;

    Not easy to understand what caused this as I am not familiar with the lib.

    &#xA;

    I saw in a so that someone had the issue caused by the tw videos not having the same size.

    &#xA;

    The logs are as follows :

    &#xA;

    I/flutter (17343): Duration: 2.9345&#xA;I/flutter (17343): /data/user/0/com.example.shokaze/cache/PXL_20230104_041034414.TS.mp4 exists?: true&#xA;I/flutter (17343): Duration: 3.0677&#xA;I/flutter (17343): /data/user/0/com.example.shokaze/cache/PXL_20230104_041054379.TS.mp4 exists?: true&#xA;I/flutter (17343): Output duration; 6.0022&#xA;&#xA;&#xA;I/flutter (17343): About to executing: -y -i /data/user/0/com.example.shokaze/cache/PXL_20230104_041034414.TS.mp4 -i /data/user/0/com.example.shokaze/cache/PXL_20230104_041054379.TS.mp4  -filter_complex &#x27;[0:0][1:0]concat=n=2:v=1:a=0[out]&#x27; -map &#x27;[out]&#x27; /data/user/0/com.example.shokaze/app_flutter/output.mp4&#xA;&#xA;&#xA;&#xA;I/flutter (17343): ffmpeg version n5.1.2&#xA;I/flutter (17343):  Copyright (c) 2000-2022 the FFmpeg developers&#xA;I/flutter (17343): &#xA;I/flutter (17343): &#xA;I/flutter (17343):   built with Android (7155654, based on r399163b1) clang version 11.0.5 (https://android.googlesource.com/toolchain/llvm-project 87f1315dfbea7c137aa2e6d362dbb457e388158d)&#xA;I/flutter (17343): &#xA;I/flutter (17343):   configuration: --cross-prefix=aarch64-linux-android- --sysroot=/files/android-sdk/ndk/22.1.7171670/toolchains/llvm/prebuilt/linux-x86_64/sysroot --prefix=/home/taner/Projects/ffmpeg-kit/prebuilt/android-arm64/ffmpeg --pkg-config=/usr/bin/pkg-config --enable-version3 --arch=aarch64 --cpu=armv8-a --target-os=android --enable-neon --enable-asm --enable-inline-asm --ar=aarch64-linux-android-ar --cc=aarch64-linux-android24-clang --cxx=aarch64-linux-android24-clang&#x2B;&#x2B; --ranlib=aarch64-linux-android-ranlib --strip=aarch64-linux-android-strip --nm=aarch64-linux-android-nm --extra-libs=&#x27;-L/home/taner/Projects/ffmpeg-kit/prebuilt/android-arm64/cpu-features/lib -lndk_compat&#x27; --disable-autodetect --enable-cross-compile --enable-pic --enable-jni --enable-optimizations --enable-swscale --disable-static --enable-shared --enable-pthreads --enable-v4l2-m2m --disable-outdev=fbdev --disable-indev=fbdev --enable-small --disable-xmm-clobber-test --disable-debug --enable-lto --disable-neon-clobber-test --disable-programs --disab&#xA;I/flutter (17343): &#xA;I/flutter (17343):   libavutil      57. 28.100 / 57. 28.100&#xA;I/flutter (17343): &#xA;I/flutter (17343):   libavcodec     59. 37.100 / 59. 37.100&#xA;I/flutter (17343): &#xA;I/flutter (17343):   libavformat    59. 27.100 / 59. 27.100&#xA;I/flutter (17343): &#xA;I/flutter (17343):   libavdevice    59.  7.100 / 59.  7.100&#xA;I/flutter (17343): &#xA;I/flutter (17343):   libavfilter     8. 44.100 /  8. 44.100&#xA;I/flutter (17343): &#xA;I/flutter (17343):   libswscale      6.  7.100 /  6.  7.100&#xA;I/flutter (17343): &#xA;I/flutter (17343):   libswresample   4.  7.100 /  4.  7.100&#xA;I/flutter (17343): &#xA;I/flutter (17343): Input #0, mov,mp4,m4a,3gp,3g2,mj2, from &#x27;/data/user/0/com.example.shokaze/cache/PXL_20230104_041034414.TS.mp4&#x27;:&#xA;I/flutter (17343): &#xA;I/flutter (17343):   Metadata:&#xA;I/flutter (17343): &#xA;I/flutter (17343):     major_brand     : &#xA;I/flutter (17343): isom&#xA;I/flutter (17343): &#xA;I/flutter (17343): &#xA;I/flutter (17343):     minor_version   : &#xA;I/flutter (17343): 131072&#xA;I/flutter (17343): &#xA;I/flutter (17343): &#xA;I/flutter (17343):     compatible_brands: &#xA;I/flutter (17343): isomiso2mp41&#xA;I/flutter (17343): &#xA;I/flutter (17343): &#xA;I/flutter (17343):     creation_time   : &#xA;I/flutter (17343): 2023-01-04T04:10:38.000000Z&#xA;I/flutter (17343): &#xA;I/flutter (17343): &#xA;I/flutter (17343):     location        : &#xA;I/flutter (17343): &#x2B;48.8638&#x2B;2.4376/&#xA;I/flutter (17343): &#xA;I/flutter (17343): &#xA;I/flutter (17343):     location-eng    : &#xA;I/flutter (17343): &#x2B;48.8638&#x2B;2.4376/&#xA;I/flutter (17343): &#xA;I/flutter (17343): &#xA;I/flutter (17343):     com.android.capture.fps: &#xA;I/flutter (17343): 30.000000&#xA;I/flutter (17343): &#xA;I/flutter (17343): &#xA;I/flutter (17343):   Duration: &#xA;I/flutter (17343): 00:00:02.93&#xA;I/flutter (17343): , start: &#xA;I/flutter (17343): 0.000000&#xA;I/flutter (17343): , bitrate: &#xA;I/flutter (17343): 19691 kb/s&#xA;I/flutter (17343): &#xA;I/flutter (17343): &#xA;I/flutter (17343):   Stream #0:0&#xA;I/flutter (17343): [0x1]&#xA;I/flutter (17343): (eng)&#xA;I/flutter (17343): : Data: none (mett / 0x7474656D), 53 kb/s&#xA;I/flutter (17343):  (default)&#xA;I/flutter (17343): &#xA;I/flutter (17343): &#xA;I/flutter (17343):     Metadata:&#xA;I/flutter (17343): &#xA;I/flutter (17343):       creation_time   : &#xA;I/flutter (17343): 2023-01-04T04:10:38.000000Z&#xA;I/flutter (17343): &#xA;I/flutter (17343): &#xA;I/flutter (17343):       handler_name    : &#xA;I/flutter (17343): MetaHandle&#xA;I/flutter (17343): &#xA;I/flutter (17343): &#xA;I/flutter (17343):   Stream #0:1&#xA;I/flutter (17343): [0x2]&#xA;I/flutter (17343): (eng)&#xA;I/flutter (17343): : Audio: aac (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 191 kb/s&#xA;I/flutter (17343):  (default)&#xA;I/flutter (17343): &#xA;I/flutter (17343): &#xA;I/flutter (17343):     Metadata:&#xA;I/flutter (17343): &#xA;I/flutter (17343):       creation_time   : &#xA;I/flutter (17343): 2023-01-04T04:10:38.000000Z&#xA;I/flutter (17343): &#xA;I/flutter (17343): &#xA;I/flutter (17343):       handler_name    : &#xA;I/flutter (17343): SoundHandle&#xA;I/flutter (17343): &#xA;I/flutter (17343): &#xA;I/flutter (17343):       vendor_id       : &#xA;I/flutter (17343): [0][0][0][0]&#xA;I/flutter (17343): &#xA;I/flutter (17343): &#xA;I/flutter (17343):   Stream #0:2&#xA;I/flutter (17343): [0x3]&#xA;I/flutter (17343): (eng)&#xA;I/flutter (17343): : Video: hevc (hvc1 / 0x31637668), yuvj420p(pc, bt709), 1920x1080, 19436 kb/s&#xA;I/flutter (17343): , SAR 1:1 DAR 16:9&#xA;I/flutter (17343): , &#xA;I/flutter (17343): 29.99 fps, &#xA;I/flutter (17343): 30 tbr, &#xA;I/flutter (17343): 90k tbn&#xA;I/flutter (17343):  (default)&#xA;I/flutter (17343): &#xA;I/flutter (17343): &#xA;I/flutter (17343):     Metadata:&#xA;I/flutter (17343): &#xA;I/flutter (17343):       creation_time   : &#xA;I/flutter (17343): 2023-01-04T04:10:38.000000Z&#xA;I/flutter (17343): &#xA;I/flutter (17343): &#xA;I/flutter (17343):       handler_name    : &#xA;I/flutter (17343): VideoHandle&#xA;I/flutter (17343): &#xA;I/flutter (17343): &#xA;I/flutter (17343):       vendor_id       : &#xA;I/flutter (17343): [0][0][0][0]&#xA;I/flutter (17343): &#xA;I/flutter (17343): &#xA;I/flutter (17343):   Stream #0:3&#xA;I/flutter (17343): [0x4]&#xA;I/flutter (17343): (eng)&#xA;I/flutter (17343): : Data: none (mett / 0x7474656D)&#xA;I/flutter (17343):  (default)&#xA;I/flutter (17343): &#xA;I/flutter (17343): &#xA;I/flutter (17343):     Metadata:&#xA;I/flutter (17343): &#xA;I/flutter (17343):       creation_time   : &#xA;I/flutter (17343): 2023-01-04T04:10:38.000000Z&#xA;I/flutter (17343): &#xA;I/flutter (17343): &#xA;I/flutter (17343):       handler_name    : &#xA;I/flutter (17343): MetaHandle&#xA;I/flutter (17343): &#xA;I/flutter (17343): &#xA;I/flutter (17343): Input #1, mov,mp4,m4a,3gp,3g2,mj2, from &#x27;/data/user/0/com.example.shokaze/cache/PXL_20230104_041054379.TS.mp4&#x27;:&#xA;I/flutter (17343): &#xA;I/flutter (17343):   Metadata:&#xA;I/flutter (17343): &#xA;I/flutter (17343):     major_brand     : &#xA;I/flutter (17343): isom&#xA;I/flutter (17343): &#xA;I/flutter (17343): &#xA;I/flutter (17343):     minor_version   : &#xA;I/flutter (17343): 131072&#xA;I/flutter (17343): &#xA;I/flutter (17343): &#xA;I/flutter (17343):     compatible_brands: &#xA;I/flutter (17343): isomiso2mp41&#xA;I/flutter (17343): &#xA;I/flutter (17343): &#xA;I/flutter (17343):     creation_time   : &#xA;I/flutter (17343): 2023-01-04T04:10:58.000000Z&#xA;I/flutter (17343): &#xA;I/flutter (17343): &#xA;I/flutter (17343):     location        : &#xA;I/flutter (17343): &#x2B;48.8638&#x2B;2.4376/&#xA;I/flutter (17343): &#xA;I/flutter (17343): &#xA;I/flutter (17343):     location-eng    : &#xA;I/flutter (17343): &#x2B;48.8638&#x2B;2.4376/&#xA;I/flutter (17343): &#xA;I/flutter (17343): &#xA;I/flutter (17343):     com.android.capture.fps: &#xA;I/flutter (17343): 30.000000&#xA;I/flutter (17343): &#xA;I/flutter (17343): &#xA;I/flutter (17343):   Duration: &#xA;I/flutter (17343): 00:00:03.07&#xA;I/flutter (17343): , start: &#xA;I/flutter (17343): 0.000000&#xA;I/flutter (17343): , bitrate: &#xA;I/flutter (17343): 20104 kb/s&#xA;I/flutter (17343): &#xA;I/flutter (17343): &#xA;I/flutter (17343):   Stream #1:0&#xA;I/flutter (17343): [0x1]&#xA;I/flutter (17343): (eng)&#xA;I/flutter (17343): : Data: none (mett / 0x7474656D), 54 kb/s&#xA;I/flutter (17343):  (default)&#xA;I/flutter (17343): &#xA;I/flutter (17343): &#xA;I/flutter (17343):     Metadata:&#xA;I/flutter (17343): &#xA;I/flutter (17343):       creation_time   : &#xA;I/flutter (17343): 2023-01-04T04:10:58.000000Z&#xA;I/flutter (17343): &#xA;I/flutter (17343): &#xA;I/flutter (17343):       handler_name    : &#xA;I/flutter (17343): MetaHandle&#xA;I/flutter (17343): &#xA;I/flutter (17343): &#xA;I/flutter (17343):   Stream #1:1&#xA;I/flutter (17343): [0x2]&#xA;I/flutter (17343): (eng)&#xA;I/flutter (17343): : Audio: aac (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 191 kb/s&#xA;I/flutter (17343):  (default)&#xA;I/flutter (17343): &#xA;I/flutter (17343): &#xA;I/flutter (17343):     Metadata:&#xA;I/flutter (17343): &#xA;I/flutter (17343):       creation_time   : &#xA;I/flutter (17343): 2023-01-04T04:10:58.000000Z&#xA;I/flutter (17343): &#xA;I/flutter (17343): &#xA;I/flutter (17343):       handler_name    : &#xA;I/flutter (17343): SoundHandle&#xA;I/flutter (17343): &#xA;I/flutter (17343): &#xA;I/flutter (17343):       vendor_id       : &#xA;I/flutter (17343): [0][0][0][0]&#xA;I/flutter (17343): &#xA;I/flutter (17343): &#xA;I/flutter (17343):   Stream #1:2&#xA;I/flutter (17343): [0x3]&#xA;I/flutter (17343): (eng)&#xA;I/flutter (17343): : Video: hevc (hvc1 / 0x31637668), yuvj420p(pc, bt709), 1920x1080, 19848 kb/s&#xA;I/flutter (17343): , SAR 1:1 DAR 16:9&#xA;I/flutter (17343): , &#xA;I/flutter (17343): 29.99 fps, &#xA;I/flutter (17343): 30 tbr, &#xA;I/flutter (17343): 90k tbn&#xA;I/flutter (17343):  (default)&#xA;I/flutter (17343): &#xA;I/flutter (17343): &#xA;I/flutter (17343):     Metadata:&#xA;I/flutter (17343): &#xA;I/flutter (17343):       creation_time   : &#xA;I/flutter (17343): 2023-01-04T04:10:58.000000Z&#xA;I/flutter (17343): &#xA;I/flutter (17343): &#xA;I/flutter (17343):       handler_name    : &#xA;I/flutter (17343): VideoHandle&#xA;I/flutter (17343): &#xA;I/flutter (17343): &#xA;I/flutter (17343):       vendor_id       : &#xA;I/flutter (17343): [0][0][0][0]&#xA;I/flutter (17343): &#xA;I/flutter (17343): &#xA;I/flutter (17343):     Side data:&#xA;I/flutter (17343): &#xA;I/flutter (17343):       &#xA;I/flutter (17343): displaymatrix: rotation of -90.00 degrees&#xA;I/flutter (17343): &#xA;I/flutter (17343): &#xA;I/flutter (17343):   Stream #1:3&#xA;I/flutter (17343): [0x4]&#xA;I/flutter (17343): (eng)&#xA;I/flutter (17343): : Data: none (mett / 0x7474656D)&#xA;I/flutter (17343):  (default)&#xA;I/flutter (17343): &#xA;I/flutter (17343): &#xA;I/flutter (17343):     Metadata:&#xA;I/flutter (17343): &#xA;I/flutter (17343):       creation_time   : &#xA;I/flutter (17343): 2023-01-04T04:10:58.000000Z&#xA;I/flutter (17343): &#xA;I/flutter (17343): &#xA;I/flutter (17343):       handler_name    : &#xA;I/flutter (17343): MetaHandle&#xA;I/flutter (17343): &#xA;I/flutter (17343): &#xA;I/flutter (17343): Stream specifier &#x27;:0&#x27; in filtergraph description [0:0][1:0]concat=n=2:v=1:a=0[out] matches no streams.&#xA;I/flutter (17343): &#xA;I/flutter (17343): executing: -y -i /data/user/0/com.example.shokaze/cache/PXL_20230104_041034414.TS.mp4 -i /data/user/0/com.example.shokaze/cache/PXL_20230104_041054379.TS.mp4  -filter_complex &#x27;[0:0][1:0]concat=n=2:v=1:a=0[out]&#x27; -map &#x27;[out]&#x27; /data/user/0/com.example.shokaze/app_flutter/output.mp4&#xA;I/flutter (17343): error 1&#xA;

    &#xA;

    Therefore I tried to add a resize in the command without success as follows :.

    &#xA;

        final command =&#xA;        &#x27;$commandPaths -filter_complex \&#x27;[0:v]scale=1920:1080[0:a] [1:v]scale=1920:1080[1:a] concat=n=${paths.length}:v=1:a=1[v][a]\&#x27; -map \&#x27;[v]\&#x27; -map \&#x27;[a]\&#x27; $outputPath&#x27;;&#xA;&#xA;

    &#xA;

    This time the logs say :

    &#xA;

    &#xA;

    I/flutter (17343) : [AVFilterGraph @ 0xb4000074ea6265f0] No output pad can be associated to link label '1:v'.

    &#xA;

    &#xA;

    The logs are as follows :

    &#xA;

    I/flutter (17343): Duration: 2.9345&#xA;I/flutter (17343): /data/user/0/com.example.shokaze/cache/PXL_20230104_041034414.TS.mp4 exists?: true&#xA;I/flutter (17343): Duration: 3.0677&#xA;I/flutter (17343): /data/user/0/com.example.shokaze/cache/PXL_20230104_041054379.TS.mp4 exists?: true&#xA;I/flutter (17343): Output duration; 6.0022&#xA;I/flutter (17343): About to executing: -i /data/user/0/com.example.shokaze/cache/PXL_20230104_041034414.TS.mp4 -i /data/user/0/com.example.shokaze/cache/PXL_20230104_041054379.TS.mp4  -filter_complex &#x27;[0:v]scale=1920:1080[0:a] [1:v]scale=1920:1080[1:a] concat=n=2:v=1:a=1[v][a]&#x27; -map &#x27;[v]&#x27; -map &#x27;[a]&#x27; /data/user/0/com.example.shokaze/app_flutter/output.mp4&#xA;I/flutter (17343): ffmpeg version n5.1.2&#xA;I/flutter (17343):  Copyright (c) 2000-2022 the FFmpeg developers&#xA;I/flutter (17343): &#xA;I/flutter (17343): &#xA;I/flutter (17343):   built with Android (7155654, based on r399163b1) clang version 11.0.5 (https://android.googlesource.com/toolchain/llvm-project 87f1315dfbea7c137aa2e6d362dbb457e388158d)&#xA;I/flutter (17343): &#xA;I/flutter (17343):   configuration: --cross-prefix=aarch64-linux-android- --sysroot=/files/android-sdk/ndk/22.1.7171670/toolchains/llvm/prebuilt/linux-x86_64/sysroot --prefix=/home/taner/Projects/ffmpeg-kit/prebuilt/android-arm64/ffmpeg --pkg-config=/usr/bin/pkg-config --enable-version3 --arch=aarch64 --cpu=armv8-a --target-os=android --enable-neon --enable-asm --enable-inline-asm --ar=aarch64-linux-android-ar --cc=aarch64-linux-android24-clang --cxx=aarch64-linux-android24-clang&#x2B;&#x2B; --ranlib=aarch64-linux-android-ranlib --strip=aarch64-linux-android-strip --nm=aarch64-linux-android-nm --extra-libs=&#x27;-L/home/taner/Projects/ffmpeg-kit/prebuilt/android-arm64/cpu-features/lib -lndk_compat&#x27; --disable-autodetect --enable-cross-compile --enable-pic --enable-jni --enable-optimizations --enable-swscale --disable-static --enable-shared --enable-pthreads --enable-v4l2-m2m --disable-outdev=fbdev --disable-indev=fbdev --enable-small --disable-xmm-clobber-test --disable-debug --enable-lto --disable-neon-clobber-test --disable-programs --disab&#xA;I/flutter (17343): &#xA;I/flutter (17343):   libavutil      57. 28.100 / 57. 28.100&#xA;I/flutter (17343): &#xA;I/flutter (17343):   libavcodec     59. 37.100 / 59. 37.100&#xA;I/flutter (17343): &#xA;I/flutter (17343):   libavformat    59. 27.100 / 59. 27.100&#xA;I/flutter (17343): &#xA;I/flutter (17343):   libavdevice    59.  7.100 / 59.  7.100&#xA;I/flutter (17343): &#xA;I/flutter (17343):   libavfilter     8. 44.100 /  8. 44.100&#xA;I/flutter (17343): &#xA;I/flutter (17343):   libswscale      6.  7.100 /  6.  7.100&#xA;I/flutter (17343): &#xA;I/flutter (17343):   libswresample   4.  7.100 /  4.  7.100&#xA;I/flutter (17343): &#xA;I/flutter (17343): Input #0, mov,mp4,m4a,3gp,3g2,mj2, from &#x27;/data/user/0/com.example.shokaze/cache/PXL_20230104_041034414.TS.mp4&#x27;:&#xA;I/flutter (17343): &#xA;I/flutter (17343):   Metadata:&#xA;I/flutter (17343): &#xA;I/flutter (17343):     major_brand     : &#xA;I/flutter (17343): isom&#xA;I/flutter (17343): &#xA;I/flutter (17343): &#xA;I/flutter (17343):     minor_version   : &#xA;I/flutter (17343): 131072&#xA;I/flutter (17343): &#xA;I/flutter (17343): &#xA;I/flutter (17343):     compatible_brands: &#xA;I/flutter (17343): isomiso2mp41&#xA;I/flutter (17343): &#xA;I/flutter (17343): &#xA;I/flutter (17343):     creation_time   : &#xA;I/flutter (17343): 2023-01-04T04:10:38.000000Z&#xA;I/flutter (17343): &#xA;I/flutter (17343): &#xA;I/flutter (17343):     location        : &#xA;I/flutter (17343): &#x2B;48.8638&#x2B;2.4376/&#xA;I/flutter (17343): &#xA;I/flutter (17343): &#xA;I/flutter (17343):     location-eng    : &#xA;I/flutter (17343): &#x2B;48.8638&#x2B;2.4376/&#xA;I/flutter (17343): &#xA;I/flutter (17343): &#xA;I/flutter (17343):     com.android.capture.fps: &#xA;I/flutter (17343): 30.000000&#xA;I/flutter (17343): &#xA;I/flutter (17343): &#xA;I/flutter (17343):   Duration: &#xA;I/flutter (17343): 00:00:02.93&#xA;I/flutter (17343): , start: &#xA;I/flutter (17343): 0.000000&#xA;I/flutter (17343): , bitrate: &#xA;I/flutter (17343): 19691 kb/s&#xA;I/flutter (17343): &#xA;I/flutter (17343): &#xA;I/flutter (17343):   Stream #0:0&#xA;I/flutter (17343): [0x1]&#xA;I/flutter (17343): (eng)&#xA;I/flutter (17343): : Data: none (mett / 0x7474656D), 53 kb/s&#xA;I/flutter (17343):  (default)&#xA;I/flutter (17343): &#xA;I/flutter (17343): &#xA;I/flutter (17343):     Metadata:&#xA;I/flutter (17343): &#xA;I/flutter (17343):       creation_time   : &#xA;I/flutter (17343): 2023-01-04T04:10:38.000000Z&#xA;I/flutter (17343): &#xA;I/flutter (17343): &#xA;I/flutter (17343):       handler_name    : &#xA;I/flutter (17343): MetaHandle&#xA;I/flutter (17343): &#xA;I/flutter (17343): &#xA;I/flutter (17343):   Stream #0:1&#xA;I/flutter (17343): [0x2]&#xA;I/flutter (17343): (eng)&#xA;I/flutter (17343): : Audio: aac (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 191 kb/s&#xA;I/flutter (17343):  (default)&#xA;I/flutter (17343): &#xA;I/flutter (17343): &#xA;I/flutter (17343):     Metadata:&#xA;I/flutter (17343): &#xA;I/flutter (17343):       creation_time   : &#xA;I/flutter (17343): 2023-01-04T04:10:38.000000Z&#xA;I/flutter (17343): &#xA;I/flutter (17343): &#xA;I/flutter (17343):       handler_name    : &#xA;I/flutter (17343): SoundHandle&#xA;I/flutter (17343): &#xA;I/flutter (17343): &#xA;I/flutter (17343):       vendor_id       : &#xA;I/flutter (17343): [0][0][0][0]&#xA;I/flutter (17343): &#xA;I/flutter (17343): &#xA;I/flutter (17343):   Stream #0:2&#xA;I/flutter (17343): [0x3]&#xA;I/flutter (17343): (eng)&#xA;I/flutter (17343): : Video: hevc (hvc1 / 0x31637668), yuvj420p(pc, bt709), 1920x1080, 19436 kb/s&#xA;I/flutter (17343): , SAR 1:1 DAR 16:9&#xA;I/flutter (17343): , &#xA;I/flutter (17343): 29.99 fps, &#xA;I/flutter (17343): 30 tbr, &#xA;I/flutter (17343): 90k tbn&#xA;I/flutter (17343):  (default)&#xA;I/flutter (17343): &#xA;I/flutter (17343): &#xA;I/flutter (17343):     Metadata:&#xA;I/flutter (17343): &#xA;I/flutter (17343):       creation_time   : &#xA;I/flutter (17343): 2023-01-04T04:10:38.000000Z&#xA;I/flutter (17343): &#xA;I/flutter (17343): &#xA;I/flutter (17343):       handler_name    : &#xA;I/flutter (17343): VideoHandle&#xA;I/flutter (17343): &#xA;I/flutter (17343): &#xA;I/flutter (17343):       vendor_id       : &#xA;I/flutter (17343): [0][0][0][0]&#xA;I/flutter (17343): &#xA;I/flutter (17343): &#xA;I/flutter (17343):   Stream #0:3&#xA;I/flutter (17343): [0x4]&#xA;I/flutter (17343): (eng)&#xA;I/flutter (17343): : Data: none (mett / 0x7474656D)&#xA;I/flutter (17343):  (default)&#xA;I/flutter (17343): &#xA;I/flutter (17343): &#xA;I/flutter (17343):     Metadata:&#xA;I/flutter (17343): &#xA;I/flutter (17343):       creation_time   : &#xA;I/flutter (17343): 2023-01-04T04:10:38.000000Z&#xA;I/flutter (17343): &#xA;I/flutter (17343): &#xA;I/flutter (17343):       handler_name    : &#xA;I/flutter (17343): MetaHandle&#xA;I/flutter (17343): &#xA;I/flutter (17343): &#xA;I/flutter (17343): Input #1, mov,mp4,m4a,3gp,3g2,mj2, from &#x27;/data/user/0/com.example.shokaze/cache/PXL_20230104_041054379.TS.mp4&#x27;:&#xA;I/flutter (17343): &#xA;I/flutter (17343):   Metadata:&#xA;I/flutter (17343): &#xA;I/flutter (17343):     major_brand     : &#xA;I/flutter (17343): isom&#xA;I/flutter (17343): &#xA;I/flutter (17343): &#xA;I/flutter (17343):     minor_version   : &#xA;I/flutter (17343): 131072&#xA;I/flutter (17343): &#xA;I/flutter (17343): &#xA;I/flutter (17343):     compatible_brands: &#xA;I/flutter (17343): isomiso2mp41&#xA;I/flutter (17343): &#xA;I/flutter (17343): &#xA;I/flutter (17343):     creation_time   : &#xA;I/flutter (17343): 2023-01-04T04:10:58.000000Z&#xA;I/flutter (17343): &#xA;I/flutter (17343): &#xA;I/flutter (17343):     location        : &#xA;I/flutter (17343): &#x2B;48.8638&#x2B;2.4376/&#xA;I/flutter (17343): &#xA;I/flutter (17343): &#xA;I/flutter (17343):     location-eng    : &#xA;I/flutter (17343): &#x2B;48.8638&#x2B;2.4376/&#xA;I/flutter (17343): &#xA;I/flutter (17343): &#xA;I/flutter (17343):     com.android.capture.fps: &#xA;I/flutter (17343): 30.000000&#xA;I/flutter (17343): &#xA;I/flutter (17343): &#xA;I/flutter (17343):   Duration: &#xA;I/flutter (17343): 00:00:03.07&#xA;I/flutter (17343): , start: &#xA;I/flutter (17343): 0.000000&#xA;I/flutter (17343): , bitrate: &#xA;I/flutter (17343): 20104 kb/s&#xA;I/flutter (17343): &#xA;I/flutter (17343): &#xA;I/flutter (17343):   Stream #1:0&#xA;I/flutter (17343): [0x1]&#xA;I/flutter (17343): (eng)&#xA;I/flutter (17343): : Data: none (mett / 0x7474656D), 54 kb/s&#xA;I/flutter (17343):  (default)&#xA;I/flutter (17343): &#xA;I/flutter (17343): &#xA;I/flutter (17343):     Metadata:&#xA;I/flutter (17343): &#xA;I/flutter (17343):       creation_time   : &#xA;I/flutter (17343): 2023-01-04T04:10:58.000000Z&#xA;I/flutter (17343): &#xA;I/flutter (17343): &#xA;I/flutter (17343):       handler_name    : &#xA;I/flutter (17343): MetaHandle&#xA;I/flutter (17343): &#xA;I/flutter (17343): &#xA;I/flutter (17343):   Stream #1:1&#xA;I/flutter (17343): [0x2]&#xA;I/flutter (17343): (eng)&#xA;I/flutter (17343): : Audio: aac (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 191 kb/s&#xA;I/flutter (17343):  (default)&#xA;I/flutter (17343): &#xA;I/flutter (17343): &#xA;I/flutter (17343):     Metadata:&#xA;I/flutter (17343): &#xA;I/flutter (17343):       creation_time   : &#xA;I/flutter (17343): 2023-01-04T04:10:58.000000Z&#xA;I/flutter (17343): &#xA;I/flutter (17343): &#xA;I/flutter (17343):       handler_name    : &#xA;I/flutter (17343): SoundHandle&#xA;I/flutter (17343): &#xA;I/flutter (17343): &#xA;I/flutter (17343):       vendor_id       : &#xA;I/flutter (17343): [0][0][0][0]&#xA;I/flutter (17343): &#xA;I/flutter (17343): &#xA;I/flutter (17343):   Stream #1:2&#xA;I/flutter (17343): [0x3]&#xA;I/flutter (17343): (eng)&#xA;I/flutter (17343): : Video: hevc (hvc1 / 0x31637668), yuvj420p(pc, bt709), 1920x1080, 19848 kb/s&#xA;I/flutter (17343): , SAR 1:1 DAR 16:9&#xA;I/flutter (17343): , &#xA;I/flutter (17343): 29.99 fps, &#xA;I/flutter (17343): 30 tbr, &#xA;I/flutter (17343): 90k tbn&#xA;I/flutter (17343):  (default)&#xA;I/flutter (17343): &#xA;I/flutter (17343): &#xA;I/flutter (17343):     Metadata:&#xA;I/flutter (17343): &#xA;I/flutter (17343):       creation_time   : &#xA;I/flutter (17343): 2023-01-04T04:10:58.000000Z&#xA;I/flutter (17343): &#xA;I/flutter (17343): &#xA;I/flutter (17343):       handler_name    : &#xA;I/flutter (17343): VideoHandle&#xA;I/flutter (17343): &#xA;I/flutter (17343): &#xA;I/flutter (17343):       vendor_id       : &#xA;I/flutter (17343): [0][0][0][0]&#xA;I/flutter (17343): &#xA;I/flutter (17343): &#xA;I/flutter (17343):     Side data:&#xA;I/flutter (17343): &#xA;I/flutter (17343):       &#xA;I/flutter (17343): displaymatrix: rotation of -90.00 degrees&#xA;I/flutter (17343): &#xA;I/flutter (17343): &#xA;I/flutter (17343):   Stream #1:3&#xA;I/flutter (17343): [0x4]&#xA;I/flutter (17343): (eng)&#xA;I/flutter (17343): : Data: none (mett / 0x7474656D)&#xA;I/flutter (17343):  (default)&#xA;I/flutter (17343): &#xA;I/flutter (17343): &#xA;I/flutter (17343):     Metadata:&#xA;I/flutter (17343): &#xA;I/flutter (17343):       creation_time   : &#xA;I/flutter (17343): 2023-01-04T04:10:58.000000Z&#xA;I/flutter (17343): &#xA;I/flutter (17343): &#xA;I/flutter (17343):       handler_name    : &#xA;I/flutter (17343): MetaHandle&#xA;I/flutter (17343): &#xA;I/flutter (17343): &#xA;I/flutter (17343): [AVFilterGraph @ 0xb4000074ea6265f0] No output pad can be associated to link label &#x27;1:v&#x27;.&#xA;I/flutter (17343): &#xA;I/flutter (17343): Error initializing complex filters.&#xA;I/flutter (17343): &#xA;I/flutter (17343): Invalid argument&#xA;I/flutter (17343): &#xA;I/flutter (17343): Conversion failed!&#xA;I/flutter (17343): &#xA;I/flutter (17343): executing: -i /data/user/0/com.example.shokaze/cache/PXL_20230104_041034414.TS.mp4 -i /data/user/0/com.example.shokaze/cache/PXL_20230104_041054379.TS.mp4  -filter_complex &#x27;[0:v]scale=1920:1080[0:a] [1:v]scale=1920:1080[1:a] concat=n=2:v=1:a=1[v][a]&#x27; -map &#x27;[v]&#x27; -map &#x27;[a]&#x27; /data/user/0/com.example.shokaze/app_flutter/output.mp4&#xA;I/flutter (17343): error 1&#xA;

    &#xA;

  • Why is the ffmpeg process in discordpy terminating without playing anything ?

    18 janvier 2024, par Bummbumm6

    I'm making a discord bot for playing music (ik very unoriginal) and everytime I try to play music, it gives this error :

    &#xA;

    2023-02-18 12:31:54 INFO     discord.player ffmpeg process 4024 has not terminated. Waiting to terminate...&#xA;2023-02-18 12:31:54 INFO     discord.player ffmpeg process 4024 should have terminated with a return code of -9.&#xA;

    &#xA;

    It is in the voice chat and didn't play anything. Here's my code if you need it :

    &#xA;

    print("defining functions")&#xA;import discord, pytube, os, threading&#xA;from moviepy import editor&#xA;from discord.ext.commands import Bot&#xA;intents=discord.Intents.default()&#xA;intents.message_content = True&#xA;intents.voice_states = True&#xA;bot = Bot("b!",intents=intents)&#xA;check = False&#xA;token = "redacted"&#xA;@bot.command()&#xA;async def play(ctx, arg):&#xA;            await ctx.send("Downloading...")&#xA;            try:&#xA;                yt = pytube.YouTube(arg)&#xA;                print("STREAM: "&#x2B;str(yt.streams.filter(only_audio=True,mime_type="audio/webm",type="audio",abr="160kbps")))&#xA;                def download(yt):&#xA;                    print("DOWNLOADING STREAM TO AUDIO.WEBM")&#xA;                    yt.streams.filter(only_audio=True,mime_type="audio/webm",type="audio",abr="160kbps").order_by("abr").first().download(filename="audio.webm")&#xA;                    print("EXPORTING TO MP3")&#xA;                    editor.AudioFileClip("audio.webm").write_audiofile("audio.webm"[:-5] &#x2B; ".mp3")&#xA;                    os.remove("audio.webm")&#xA;                    print("DONE")&#xA;                thread = threading.Thread(target=download, args=(yt,))&#xA;                thread.start()&#xA;                thread.join()&#xA;                try:&#xA;                  channel = ctx.author.voice.channel&#xA;                  try:&#xA;                    vc = await channel.connect()&#xA;                  except Exception:&#xA;                    ctx.send("already in vc, one sec")&#xA;                except Exception:&#xA;                    pass&#xA;                vc.play(discord.FFmpegPCMAudio(source="audio.mp3", executable="./ffmpeg"))&#xA;            except Exception:&#xA;              pass&#xA;bot.run(token)&#xA;&#xA;

    &#xA;

    It worked on my computer in VS Code, but I wanted to test it on Replit and only there I got the error. I tried :

    &#xA;

      &#xA;
    1. Reinstalling discord, pynacl, even pytube and moviepy.
    2. &#xA;

    3. Using a local copy of ffmpeg on replit, see line 36.
    4. &#xA;

    5. Adding the intents that were described in a different thread.
    6. &#xA;

    &#xA;

    One thing that always happens is the exit code being -9 but the process number changing (ofc). I saw a GitHub Issue about this too which is not showing a fix so how do I fix that ?

    &#xA;