
Recherche avancée
Médias (1)
-
Sintel MP4 Surround 5.1 Full
13 mai 2011, par
Mis à jour : Février 2012
Langue : English
Type : Video
Autres articles (51)
-
MediaSPIP v0.2
21 juin 2013, parMediaSPIP 0.2 est la première version de MediaSPIP stable.
Sa date de sortie officielle est le 21 juin 2013 et est annoncée ici.
Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
Comme pour la version précédente, il est nécessaire d’installer manuellement l’ensemble des dépendances logicielles sur le serveur.
Si vous souhaitez utiliser cette archive pour une installation en mode ferme, il vous faudra également procéder à d’autres modifications (...) -
MediaSPIP version 0.1 Beta
16 avril 2011, parMediaSPIP 0.1 beta est la première version de MediaSPIP décrétée comme "utilisable".
Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
Pour avoir une installation fonctionnelle, il est nécessaire d’installer manuellement l’ensemble des dépendances logicielles sur le serveur.
Si vous souhaitez utiliser cette archive pour une installation en mode ferme, il vous faudra également procéder à d’autres modifications (...) -
Publier sur MédiaSpip
13 juin 2013Puis-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
Sur d’autres sites (4457)
-
Why does my script return 0 when it fails ? Bash, Whisper, ffmpeg
30 avril 2024, par d-bI have a
bash
script that executeswhisper
on all sound files in a directory. Whisper usesffmpeg
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 returned1
when it hit that file but when I try to reproduce the error it always returns0
.

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


Traceback (most recent call last):
 File "/Users/db/Library/Python/3.11/lib/python/site-packages/whisper/audio.py", line 48, in load_audio
 .run(cmd=["ffmpeg", "-nostdin"], capture_stdout=True, capture_stderr=True)
 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 File "/Users/db/Library/Python/3.11/lib/python/site-packages/ffmpeg/_run.py", line 325, in run
 raise Error('ffmpeg', out, err)
ffmpeg._run.Error: ffmpeg error (see stderr output for detail)

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
 File "/Users/db/Library/Python/3.11/bin/whisper", line 8, in <module>
 sys.exit(cli())
 ^^^^^
 File "/Users/db/Library/Python/3.11/lib/python/site-packages/whisper/transcribe.py", line 437, in cli
 result = transcribe(model, audio_path, temperature=temperature, **args)
 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 File "/Users/db/Library/Python/3.11/lib/python/site-packages/whisper/transcribe.py", line 121, in transcribe
 mel = log_mel_spectrogram(audio, padding=N_SAMPLES)
 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 File "/Users/db/Library/Python/3.11/lib/python/site-packages/whisper/audio.py", line 130, in log_mel_spectrogram
 audio = load_audio(audio)
 ^^^^^^^^^^^^^^^^^
 File "/Users/db/Library/Python/3.11/lib/python/site-packages/whisper/audio.py", line 51, in load_audio
 raise RuntimeError(f"Failed to load audio: {e.stderr.decode()}") from e
RuntimeError: Failed to load audio: ffmpeg version 4.4.4 Copyright (c) 2000-2023 the FFmpeg developers
 built with Apple clang version 15.0.0 (clang-1500.1.0.2.5)
 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
 libavutil 56. 70.100 / 56. 70.100
 libavcodec 58.134.100 / 58.134.100
 libavformat 58. 76.100 / 58. 76.100
 libavdevice 58. 13.100 / 58. 13.100
 libavfilter 7.110.100 / 7.110.100
 libavresample 4. 0. 0 / 4. 0. 0
 libswscale 5. 9.100 / 5. 9.100
 libswresample 3. 9.100 / 3. 9.100
 libpostproc 55. 9.100 / 55. 9.100
/soundfile1.opus: Invalid data found when processing input


exit: 1 //this is my own output
</module>


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


% whisper soundfile1.opus

Traceback (most recent call last):
 File "/Users/db/Library/Python/3.11/lib/python/site-packages/whisper/audio.py", line 58, in load_audio
 out = run(cmd, capture_output=True, check=True).stdout
 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 File "/opt/local/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/subprocess.py", line 571, in run
 raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['ffmpeg', '-nostdin', '-threads', '0', '-i', 'soundfile1.opus', '-f', 's16le', '-ac', '1', '-acodec', 'pcm_s16le', '-ar', '16000', '-']' returned non-zero exit status 1.

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
 File "/Users/db/Library/Python/3.11/lib/python/site-packages/whisper/transcribe.py", line 597, in cli
 result = transcribe(model, audio_path, temperature=temperature, **args)
 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 File "/Users/db/Library/Python/3.11/lib/python/site-packages/whisper/transcribe.py", line 133, in transcribe
 mel = log_mel_spectrogram(audio, model.dims.n_mels, padding=N_SAMPLES)
 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 File "/Users/db/Library/Python/3.11/lib/python/site-packages/whisper/audio.py", line 140, in log_mel_spectrogram
 audio = load_audio(audio)
 ^^^^^^^^^^^^^^^^^
 File "/Users/db/Library/Python/3.11/lib/python/site-packages/whisper/audio.py", line 60, in load_audio
 raise RuntimeError(f"Failed to load audio: {e.stderr.decode()}") from e
RuntimeError: Failed to load audio: ffmpeg version 4.4.4 Copyright (c) 2000-2023 the FFmpeg developers
 built with Apple clang version 15.0.0 (clang-1500.1.0.2.5)
 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
 libavutil 56. 70.100 / 56. 70.100
 libavcodec 58.134.100 / 58.134.100
 libavformat 58. 76.100 / 58. 76.100
 libavdevice 58. 13.100 / 58. 13.100
 libavfilter 7.110.100 / 7.110.100
 libavresample 4. 0. 0 / 4. 0. 0
 libswscale 5. 9.100 / 5. 9.100
 libswresample 3. 9.100 / 3. 9.100
 libpostproc 55. 9.100 / 55. 9.100
soundfile1.opus: Invalid data found when processing input

Skipping soundfile1.opus due to RuntimeError: Failed to load audio: ffmpeg version 4.4.4 Copyright (c) 2000-2023 the FFmpeg developers
 built with Apple clang version 15.0.0 (clang-1500.1.0.2.5)
 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
 libavutil 56. 70.100 / 56. 70.100
 libavcodec 58.134.100 / 58.134.100
 libavformat 58. 76.100 / 58. 76.100
 libavdevice 58. 13.100 / 58. 13.100
 libavfilter 7.110.100 / 7.110.100
 libavresample 4. 0. 0 / 4. 0. 0
 libswscale 5. 9.100 / 5. 9.100
 libswresample 3. 9.100 / 3. 9.100
 libpostproc 55. 9.100 / 55. 9.100
soundfile1.opus: Invalid data found when processing input

% echo $?
0



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 :


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



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


-
How to modify this Windows script to do a match ?
21 janvier 2016, par Andrei Clearffmpeg 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 hasFILE_NAME_LOW_640.mp4
SKIP it
AND
if aFILE_NAME_LOW_640.mp4
has*640
SKIP itHere 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-directoriesIn other words my questions for help are :
-
How can I do a check for a string if it contains a string match ?
-
How can I have my script also process all the subdirectories ?
-
-
Where to add FilterChain when using with Shell Script
20 janvier 2016, par sentyI am trying to get a jpg out of an mp4 video’s middle. I used this line and it works like charm for generating jpg thumbnail in one line :
ffmpeg -i input.mp4 -vcodec mjpeg -vframes 1 -an -f rawvideo -ss `ffmpeg -i input.mp4 2>&1 | grep Duration | awk '{print $2}' | tr -d , | awk -F ':' '{print $3/2}'` output.jpg
However, I want to apply scaling and cropping a filter chain (
filter:v
) with the above line, but where ever I put the filter, I couldn’t make it work.-filter:v "scale=720:ih*720/iw, crop=720:720:280:1000"
.Where should I put it ?
The errors I receive :
At least one output file must be specified
Invalid duration specification for ss: -filter:v
Please note that this works :
ffmpeg -i fkj.mp4 -vcodec mjpeg -filter:v "scale=720:ih*720/iw, crop=720:720:280:1000" -vframes 1 -an -f rawvideo -ss 4 output.jpg