Recherche avancée

Médias (1)

Mot : - Tags -/lev manovitch

Autres articles (39)

  • 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

  • Taille des images et des logos définissables

    9 février 2011, par

    Dans beaucoup d’endroits du site, logos et images sont redimensionnées pour correspondre aux emplacements définis par les thèmes. L’ensemble des ces tailles pouvant changer d’un thème à un autre peuvent être définies directement dans le thème et éviter ainsi à l’utilisateur de devoir les configurer manuellement après avoir changé l’apparence de son site.
    Ces tailles d’images sont également disponibles dans la configuration spécifique de MediaSPIP Core. La taille maximale du logo du site en pixels, on permet (...)

  • Configuration spécifique d’Apache

    4 février 2011, par

    Modules spécifiques
    Pour la configuration d’Apache, il est conseillé d’activer certains modules non spécifiques à MediaSPIP, mais permettant d’améliorer les performances : mod_deflate et mod_headers pour compresser automatiquement via Apache les pages. Cf ce tutoriel ; mode_expires pour gérer correctement l’expiration des hits. Cf ce tutoriel ;
    Il est également conseillé d’ajouter la prise en charge par apache du mime-type pour les fichiers WebM comme indiqué dans ce tutoriel.
    Création d’un (...)

Sur d’autres sites (6505)

  • How to modify this Windows script to do a match ?

    21 janvier 2016, par Andrei Clear

    ffmpeg can resize a video/image file .. first is input_file .. parameters .. output_file ..

    ffmpeg -i input.avi -vf scale=320:240 output.avi

    or

    ffmpeg -i 20140724_071746.mp4 -vf scale=640:-1 20140724_071746_LOW_640.mp4

    more info here : https://trac.ffmpeg.org/wiki/Scaling%20%28resizing%29%20with%20ffmpeg

    I want it to downscale all the videos on my microSD card to create space (I have originals backed-up)

    So I want it to go throw all the files in all the sub-directories overnight and resize all the files. Chances are that the script might stop or crash and I would need to run it again, or if I add new files I would want to run it again.

    So I would want it to skip processing all the files that have been processed AND their resized versions.

    In my case if a FILE_NAME.mp4 also has FILE_NAME_LOW_640.mp4 SKIP it
    AND
    if a FILE_NAME_LOW_640.mp4 has *640 SKIP it

    Here is my Windows batch script so far

    REM @echo off
    REM just save as "DOS"
    REM cd /d C:\s

    setlocal enabledelayedexpansion
    for %%j in (*.mp4) do (
    set filename=%%~nj
    echo %%j

    ffmpeg -i %%j -vf scale=640:-1 %%j_LOW_640.mp4

    REM but now I want to add the two checks to skip files that have been resized .. or if they are the resized version

    REM if not "!filename!"=="%%j_LOW_640.mp4" AND IF FILE !COINTAIN *640* THEN ffmpeg -i %%j -vf scale=640:-1 %%j_LOW_640.mp4

    )

    pause
    REM AND I would also want it to process all the sub-directories  

    In other words my questions for help are :

    1. How can I do a check for a string if it contains a string match ?

    2. How can I have my script also process all the subdirectories ?

  • Why does my script return 0 when it fails ? Bash, Whisper, ffmpeg

    30 avril 2024, par d-b

    I have a bash script that executes whisper on all sound files in a directory. Whisper uses ffmpeg to decode sound files to a format it can handle. One of the files in the directory was corrupt and caused ffmpeg to fail. The first time I executed my script it returned 1 when it hit that file but when I try to reproduce the error it always returns 0.

    


    Here is the log from the first run when 1 was returned :

    


    Traceback (most recent call last):&#xA;  File "/Users/db/Library/Python/3.11/lib/python/site-packages/whisper/audio.py", line 48, in load_audio&#xA;    .run(cmd=["ffmpeg", "-nostdin"], capture_stdout=True, capture_stderr=True)&#xA;     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^&#xA;  File "/Users/db/Library/Python/3.11/lib/python/site-packages/ffmpeg/_run.py", line 325, in run&#xA;    raise Error(&#x27;ffmpeg&#x27;, out, err)&#xA;ffmpeg._run.Error: ffmpeg error (see stderr output for detail)&#xA;&#xA;The above exception was the direct cause of the following exception:&#xA;&#xA;Traceback (most recent call last):&#xA;  File "/Users/db/Library/Python/3.11/bin/whisper", line 8, in <module>&#xA;    sys.exit(cli())&#xA;             ^^^^^&#xA;  File "/Users/db/Library/Python/3.11/lib/python/site-packages/whisper/transcribe.py", line 437, in cli&#xA;    result = transcribe(model, audio_path, temperature=temperature, **args)&#xA;             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^&#xA;  File "/Users/db/Library/Python/3.11/lib/python/site-packages/whisper/transcribe.py", line 121, in transcribe&#xA;    mel = log_mel_spectrogram(audio, padding=N_SAMPLES)&#xA;          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^&#xA;  File "/Users/db/Library/Python/3.11/lib/python/site-packages/whisper/audio.py", line 130, in log_mel_spectrogram&#xA;    audio = load_audio(audio)&#xA;            ^^^^^^^^^^^^^^^^^&#xA;  File "/Users/db/Library/Python/3.11/lib/python/site-packages/whisper/audio.py", line 51, in load_audio&#xA;    raise RuntimeError(f"Failed to load audio: {e.stderr.decode()}") from e&#xA;RuntimeError: Failed to load audio: ffmpeg version 4.4.4 Copyright (c) 2000-2023 the FFmpeg developers&#xA;  built with Apple clang version 15.0.0 (clang-1500.1.0.2.5)&#xA;  configuration: --prefix=/opt/local --cc=/usr/bin/clang --mandir=/opt/local/share/man --enable-audiotoolbox --disable-indev=jack --disable-libjack --disable-libopencore-amrnb --disable-libopencore-amrwb --disable-libxcb --disable-libxcb-shm --disable-libxcb-xfixes --enable-opencl --disable-outdev=xv --enable-sdl2 --disable-securetransport --enable-videotoolbox --enable-avfilter --enable-avresample --enable-fontconfig --enable-gnutls --enable-libass --enable-libbluray --enable-libdav1d --enable-libfreetype --enable-libfribidi --enable-libmodplug --enable-libmp3lame --enable-libopenjpeg --enable-libopus --enable-librsvg --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libzimg --enable-libzvbi --enable-lzma --enable-pthreads --enable-shared --enable-swscale --enable-zlib --enable-libaom --enable-libsvtav1 --arch=x86_64 --enable-x86asm --enable-gpl --enable-libvidstab --enable-libx264 --enable-libx265 --enable-libxvid --enable-postproc&#xA;  libavutil      56. 70.100 / 56. 70.100&#xA;  libavcodec     58.134.100 / 58.134.100&#xA;  libavformat    58. 76.100 / 58. 76.100&#xA;  libavdevice    58. 13.100 / 58. 13.100&#xA;  libavfilter     7.110.100 /  7.110.100&#xA;  libavresample   4.  0.  0 /  4.  0.  0&#xA;  libswscale      5.  9.100 /  5.  9.100&#xA;  libswresample   3.  9.100 /  3.  9.100&#xA;  libpostproc    55.  9.100 / 55.  9.100&#xA;/soundfile1.opus: Invalid data found when processing input&#xA;&#xA;&#xA;exit: 1 //this is my own output&#xA;</module>

    &#xA;

    and here is an example of when it returns 0 despite the input file is corrupt :

    &#xA;

    % whisper soundfile1.opus&#xA;&#xA;Traceback (most recent call last):&#xA;  File "/Users/db/Library/Python/3.11/lib/python/site-packages/whisper/audio.py", line 58, in load_audio&#xA;    out = run(cmd, capture_output=True, check=True).stdout&#xA;          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^&#xA;  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/subprocess.py", line 571, in run&#xA;    raise CalledProcessError(retcode, process.args,&#xA;subprocess.CalledProcessError: Command &#x27;[&#x27;ffmpeg&#x27;, &#x27;-nostdin&#x27;, &#x27;-threads&#x27;, &#x27;0&#x27;, &#x27;-i&#x27;, &#x27;soundfile1.opus&#x27;, &#x27;-f&#x27;, &#x27;s16le&#x27;, &#x27;-ac&#x27;, &#x27;1&#x27;, &#x27;-acodec&#x27;, &#x27;pcm_s16le&#x27;, &#x27;-ar&#x27;, &#x27;16000&#x27;, &#x27;-&#x27;]&#x27; returned non-zero exit status 1.&#xA;&#xA;The above exception was the direct cause of the following exception:&#xA;&#xA;Traceback (most recent call last):&#xA;  File "/Users/db/Library/Python/3.11/lib/python/site-packages/whisper/transcribe.py", line 597, in cli&#xA;    result = transcribe(model, audio_path, temperature=temperature, **args)&#xA;             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^&#xA;  File "/Users/db/Library/Python/3.11/lib/python/site-packages/whisper/transcribe.py", line 133, in transcribe&#xA;    mel = log_mel_spectrogram(audio, model.dims.n_mels, padding=N_SAMPLES)&#xA;          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^&#xA;  File "/Users/db/Library/Python/3.11/lib/python/site-packages/whisper/audio.py", line 140, in log_mel_spectrogram&#xA;    audio = load_audio(audio)&#xA;            ^^^^^^^^^^^^^^^^^&#xA;  File "/Users/db/Library/Python/3.11/lib/python/site-packages/whisper/audio.py", line 60, in load_audio&#xA;    raise RuntimeError(f"Failed to load audio: {e.stderr.decode()}") from e&#xA;RuntimeError: Failed to load audio: ffmpeg version 4.4.4 Copyright (c) 2000-2023 the FFmpeg developers&#xA;  built with Apple clang version 15.0.0 (clang-1500.1.0.2.5)&#xA;  configuration: --prefix=/opt/local --cc=/usr/bin/clang --mandir=/opt/local/share/man --enable-audiotoolbox --disable-indev=jack --disable-libjack --disable-libopencore-amrnb --disable-libopencore-amrwb --disable-libxcb --disable-libxcb-shm --disable-libxcb-xfixes --enable-opencl --disable-outdev=xv --enable-sdl2 --disable-securetransport --enable-videotoolbox --enable-avfilter --enable-avresample --enable-fontconfig --enable-gnutls --enable-libass --enable-libbluray --enable-libdav1d --enable-libfreetype --enable-libfribidi --enable-libmodplug --enable-libmp3lame --enable-libopenjpeg --enable-libopus --enable-librsvg --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libzimg --enable-libzvbi --enable-lzma --enable-pthreads --enable-shared --enable-swscale --enable-zlib --enable-libaom --enable-libsvtav1 --arch=x86_64 --enable-x86asm --enable-gpl --enable-libvidstab --enable-libx264 --enable-libx265 --enable-libxvid --enable-postproc&#xA;  libavutil      56. 70.100 / 56. 70.100&#xA;  libavcodec     58.134.100 / 58.134.100&#xA;  libavformat    58. 76.100 / 58. 76.100&#xA;  libavdevice    58. 13.100 / 58. 13.100&#xA;  libavfilter     7.110.100 /  7.110.100&#xA;  libavresample   4.  0.  0 /  4.  0.  0&#xA;  libswscale      5.  9.100 /  5.  9.100&#xA;  libswresample   3.  9.100 /  3.  9.100&#xA;  libpostproc    55.  9.100 / 55.  9.100&#xA;soundfile1.opus: Invalid data found when processing input&#xA;&#xA;Skipping soundfile1.opus due to RuntimeError: Failed to load audio: ffmpeg version 4.4.4 Copyright (c) 2000-2023 the FFmpeg developers&#xA;  built with Apple clang version 15.0.0 (clang-1500.1.0.2.5)&#xA;  configuration: --prefix=/opt/local --cc=/usr/bin/clang --mandir=/opt/local/share/man --enable-audiotoolbox --disable-indev=jack --disable-libjack --disable-libopencore-amrnb --disable-libopencore-amrwb --disable-libxcb --disable-libxcb-shm --disable-libxcb-xfixes --enable-opencl --disable-outdev=xv --enable-sdl2 --disable-securetransport --enable-videotoolbox --enable-avfilter --enable-avresample --enable-fontconfig --enable-gnutls --enable-libass --enable-libbluray --enable-libdav1d --enable-libfreetype --enable-libfribidi --enable-libmodplug --enable-libmp3lame --enable-libopenjpeg --enable-libopus --enable-librsvg --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libzimg --enable-libzvbi --enable-lzma --enable-pthreads --enable-shared --enable-swscale --enable-zlib --enable-libaom --enable-libsvtav1 --arch=x86_64 --enable-x86asm --enable-gpl --enable-libvidstab --enable-libx264 --enable-libx265 --enable-libxvid --enable-postproc&#xA;  libavutil      56. 70.100 / 56. 70.100&#xA;  libavcodec     58.134.100 / 58.134.100&#xA;  libavformat    58. 76.100 / 58. 76.100&#xA;  libavdevice    58. 13.100 / 58. 13.100&#xA;  libavfilter     7.110.100 /  7.110.100&#xA;  libavresample   4.  0.  0 /  4.  0.  0&#xA;  libswscale      5.  9.100 /  5.  9.100&#xA;  libswresample   3.  9.100 /  3.  9.100&#xA;  libpostproc    55.  9.100 / 55.  9.100&#xA;soundfile1.opus: Invalid data found when processing input&#xA;&#xA;% echo $?&#xA;0&#xA;

    &#xA;

    When I try to reproduce the behaviour I have both tried to execute the script as well as just running the actual line of code from the command prompt. The actual script looks like this :

    &#xA;

    if whisper "$file" >> "${directory}/../${transdir}/${name}.txt"; then&#xA;    whispersuccess=$?&#xA;    echo "exit code $whispersuccess"&#xA;else&#xA;    whispersuccess=$?&#xA;    echo "exit code: $whispersuccess"&#xA;

    &#xA;

    I want it to return ¬0 when something like this happens. How do I achieve this ?

    &#xA;

  • Why does a command in my Bash-script return 0 even when it fails ? Python, Whisper, ffmpeg

    10 juin 2024, par d-b

    I have a bash script that executes whisper on all sound files in a directory. Whisper uses ffmpeg to decode sound files to a format it can handle. One of the files in the directory was corrupt and caused ffmpeg to fail. The first time I executed my script it returned 1 when it hit that file but when I try to reproduce the error it always returns 0.

    &#xA;

    Here is the log from the first run when 1 was returned :

    &#xA;

    Traceback (most recent call last):&#xA;  File "/Users/db/Library/Python/3.11/lib/python/site-packages/whisper/audio.py", line 48, in load_audio&#xA;    .run(cmd=["ffmpeg", "-nostdin"], capture_stdout=True, capture_stderr=True)&#xA;     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^&#xA;  File "/Users/db/Library/Python/3.11/lib/python/site-packages/ffmpeg/_run.py", line 325, in run&#xA;    raise Error(&#x27;ffmpeg&#x27;, out, err)&#xA;ffmpeg._run.Error: ffmpeg error (see stderr output for detail)&#xA;&#xA;The above exception was the direct cause of the following exception:&#xA;&#xA;Traceback (most recent call last):&#xA;  File "/Users/db/Library/Python/3.11/bin/whisper", line 8, in <module>&#xA;    sys.exit(cli())&#xA;             ^^^^^&#xA;  File "/Users/db/Library/Python/3.11/lib/python/site-packages/whisper/transcribe.py", line 437, in cli&#xA;    result = transcribe(model, audio_path, temperature=temperature, **args)&#xA;             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^&#xA;  File "/Users/db/Library/Python/3.11/lib/python/site-packages/whisper/transcribe.py", line 121, in transcribe&#xA;    mel = log_mel_spectrogram(audio, padding=N_SAMPLES)&#xA;          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^&#xA;  File "/Users/db/Library/Python/3.11/lib/python/site-packages/whisper/audio.py", line 130, in log_mel_spectrogram&#xA;    audio = load_audio(audio)&#xA;            ^^^^^^^^^^^^^^^^^&#xA;  File "/Users/db/Library/Python/3.11/lib/python/site-packages/whisper/audio.py", line 51, in load_audio&#xA;    raise RuntimeError(f"Failed to load audio: {e.stderr.decode()}") from e&#xA;RuntimeError: Failed to load audio: ffmpeg version 4.4.4 Copyright (c) 2000-2023 the FFmpeg developers&#xA;  built with Apple clang version 15.0.0 (clang-1500.1.0.2.5)&#xA;  configuration: --prefix=/opt/local --cc=/usr/bin/clang --mandir=/opt/local/share/man --enable-audiotoolbox --disable-indev=jack --disable-libjack --disable-libopencore-amrnb --disable-libopencore-amrwb --disable-libxcb --disable-libxcb-shm --disable-libxcb-xfixes --enable-opencl --disable-outdev=xv --enable-sdl2 --disable-securetransport --enable-videotoolbox --enable-avfilter --enable-avresample --enable-fontconfig --enable-gnutls --enable-libass --enable-libbluray --enable-libdav1d --enable-libfreetype --enable-libfribidi --enable-libmodplug --enable-libmp3lame --enable-libopenjpeg --enable-libopus --enable-librsvg --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libzimg --enable-libzvbi --enable-lzma --enable-pthreads --enable-shared --enable-swscale --enable-zlib --enable-libaom --enable-libsvtav1 --arch=x86_64 --enable-x86asm --enable-gpl --enable-libvidstab --enable-libx264 --enable-libx265 --enable-libxvid --enable-postproc&#xA;  libavutil      56. 70.100 / 56. 70.100&#xA;  libavcodec     58.134.100 / 58.134.100&#xA;  libavformat    58. 76.100 / 58. 76.100&#xA;  libavdevice    58. 13.100 / 58. 13.100&#xA;  libavfilter     7.110.100 /  7.110.100&#xA;  libavresample   4.  0.  0 /  4.  0.  0&#xA;  libswscale      5.  9.100 /  5.  9.100&#xA;  libswresample   3.  9.100 /  3.  9.100&#xA;  libpostproc    55.  9.100 / 55.  9.100&#xA;/soundfile1.opus: Invalid data found when processing input&#xA;&#xA;&#xA;exit: 1 //this is my own output&#xA;</module>

    &#xA;

    and here is an example of when it returns 0 despite the input file is corrupt :

    &#xA;

    % whisper soundfile1.opus&#xA;&#xA;Traceback (most recent call last):&#xA;  File "/Users/db/Library/Python/3.11/lib/python/site-packages/whisper/audio.py", line 58, in load_audio&#xA;    out = run(cmd, capture_output=True, check=True).stdout&#xA;          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^&#xA;  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/subprocess.py", line 571, in run&#xA;    raise CalledProcessError(retcode, process.args,&#xA;subprocess.CalledProcessError: Command &#x27;[&#x27;ffmpeg&#x27;, &#x27;-nostdin&#x27;, &#x27;-threads&#x27;, &#x27;0&#x27;, &#x27;-i&#x27;, &#x27;soundfile1.opus&#x27;, &#x27;-f&#x27;, &#x27;s16le&#x27;, &#x27;-ac&#x27;, &#x27;1&#x27;, &#x27;-acodec&#x27;, &#x27;pcm_s16le&#x27;, &#x27;-ar&#x27;, &#x27;16000&#x27;, &#x27;-&#x27;]&#x27; returned non-zero exit status 1.&#xA;&#xA;The above exception was the direct cause of the following exception:&#xA;&#xA;Traceback (most recent call last):&#xA;  File "/Users/db/Library/Python/3.11/lib/python/site-packages/whisper/transcribe.py", line 597, in cli&#xA;    result = transcribe(model, audio_path, temperature=temperature, **args)&#xA;             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^&#xA;  File "/Users/db/Library/Python/3.11/lib/python/site-packages/whisper/transcribe.py", line 133, in transcribe&#xA;    mel = log_mel_spectrogram(audio, model.dims.n_mels, padding=N_SAMPLES)&#xA;          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^&#xA;  File "/Users/db/Library/Python/3.11/lib/python/site-packages/whisper/audio.py", line 140, in log_mel_spectrogram&#xA;    audio = load_audio(audio)&#xA;            ^^^^^^^^^^^^^^^^^&#xA;  File "/Users/db/Library/Python/3.11/lib/python/site-packages/whisper/audio.py", line 60, in load_audio&#xA;    raise RuntimeError(f"Failed to load audio: {e.stderr.decode()}") from e&#xA;RuntimeError: Failed to load audio: ffmpeg version 4.4.4 Copyright (c) 2000-2023 the FFmpeg developers&#xA;  built with Apple clang version 15.0.0 (clang-1500.1.0.2.5)&#xA;  configuration: --prefix=/opt/local --cc=/usr/bin/clang --mandir=/opt/local/share/man --enable-audiotoolbox --disable-indev=jack --disable-libjack --disable-libopencore-amrnb --disable-libopencore-amrwb --disable-libxcb --disable-libxcb-shm --disable-libxcb-xfixes --enable-opencl --disable-outdev=xv --enable-sdl2 --disable-securetransport --enable-videotoolbox --enable-avfilter --enable-avresample --enable-fontconfig --enable-gnutls --enable-libass --enable-libbluray --enable-libdav1d --enable-libfreetype --enable-libfribidi --enable-libmodplug --enable-libmp3lame --enable-libopenjpeg --enable-libopus --enable-librsvg --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libzimg --enable-libzvbi --enable-lzma --enable-pthreads --enable-shared --enable-swscale --enable-zlib --enable-libaom --enable-libsvtav1 --arch=x86_64 --enable-x86asm --enable-gpl --enable-libvidstab --enable-libx264 --enable-libx265 --enable-libxvid --enable-postproc&#xA;  libavutil      56. 70.100 / 56. 70.100&#xA;  libavcodec     58.134.100 / 58.134.100&#xA;  libavformat    58. 76.100 / 58. 76.100&#xA;  libavdevice    58. 13.100 / 58. 13.100&#xA;  libavfilter     7.110.100 /  7.110.100&#xA;  libavresample   4.  0.  0 /  4.  0.  0&#xA;  libswscale      5.  9.100 /  5.  9.100&#xA;  libswresample   3.  9.100 /  3.  9.100&#xA;  libpostproc    55.  9.100 / 55.  9.100&#xA;soundfile1.opus: Invalid data found when processing input&#xA;&#xA;Skipping soundfile1.opus due to RuntimeError: Failed to load audio: ffmpeg version 4.4.4 Copyright (c) 2000-2023 the FFmpeg developers&#xA;  built with Apple clang version 15.0.0 (clang-1500.1.0.2.5)&#xA;  configuration: --prefix=/opt/local --cc=/usr/bin/clang --mandir=/opt/local/share/man --enable-audiotoolbox --disable-indev=jack --disable-libjack --disable-libopencore-amrnb --disable-libopencore-amrwb --disable-libxcb --disable-libxcb-shm --disable-libxcb-xfixes --enable-opencl --disable-outdev=xv --enable-sdl2 --disable-securetransport --enable-videotoolbox --enable-avfilter --enable-avresample --enable-fontconfig --enable-gnutls --enable-libass --enable-libbluray --enable-libdav1d --enable-libfreetype --enable-libfribidi --enable-libmodplug --enable-libmp3lame --enable-libopenjpeg --enable-libopus --enable-librsvg --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libzimg --enable-libzvbi --enable-lzma --enable-pthreads --enable-shared --enable-swscale --enable-zlib --enable-libaom --enable-libsvtav1 --arch=x86_64 --enable-x86asm --enable-gpl --enable-libvidstab --enable-libx264 --enable-libx265 --enable-libxvid --enable-postproc&#xA;  libavutil      56. 70.100 / 56. 70.100&#xA;  libavcodec     58.134.100 / 58.134.100&#xA;  libavformat    58. 76.100 / 58. 76.100&#xA;  libavdevice    58. 13.100 / 58. 13.100&#xA;  libavfilter     7.110.100 /  7.110.100&#xA;  libavresample   4.  0.  0 /  4.  0.  0&#xA;  libswscale      5.  9.100 /  5.  9.100&#xA;  libswresample   3.  9.100 /  3.  9.100&#xA;  libpostproc    55.  9.100 / 55.  9.100&#xA;soundfile1.opus: Invalid data found when processing input&#xA;&#xA;% echo $?&#xA;0&#xA;

    &#xA;

    When I try to reproduce the behaviour I have both tried to execute the script as well as just running the actual line of code from the command prompt. The actual script looks like this :

    &#xA;

    if whisper "$file" >> "${directory}/../${transdir}/${name}.txt"; then&#xA;    whispersuccess=$?&#xA;    echo "exit code $whispersuccess"&#xA;else&#xA;    whispersuccess=$?&#xA;    echo "exit code: $whispersuccess"&#xA;

    &#xA;

    I want it to return ¬0 when something like this happens. How do I achieve this ?

    &#xA;