
Recherche avancée
Médias (3)
-
Exemple de boutons d’action pour une collection collaborative
27 février 2013, par
Mis à jour : Mars 2013
Langue : français
Type : Image
-
Exemple de boutons d’action pour une collection personnelle
27 février 2013, par
Mis à jour : Février 2013
Langue : English
Type : Image
-
Collections - Formulaire de création rapide
19 février 2013, par
Mis à jour : Février 2013
Langue : français
Type : Image
Autres articles (111)
-
Submit bugs and patches
13 avril 2011Unfortunately 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 (...) -
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 -
Script d’installation automatique de MediaSPIP
25 avril 2011, parAfin de palier aux difficultés d’installation dues principalement aux dépendances logicielles coté serveur, un script d’installation "tout en un" en bash a été créé afin de faciliter cette étape sur un serveur doté d’une distribution Linux compatible.
Vous devez bénéficier d’un accès SSH à votre serveur et d’un compte "root" afin de l’utiliser, ce qui permettra d’installer les dépendances. Contactez votre hébergeur si vous ne disposez pas de cela.
La documentation de l’utilisation du script d’installation (...)
Sur d’autres sites (11982)
-
Decoding the h.264 stream from a serial port
18 mars, par PeterI would like to know if there is a reliable way to decode an H.264 NAL stream coming through a serial port using software.


So far, I have managed to decode a single frame using a python script. In this script, I first write the incoming data to a file, and when the end-of-frame marker 00_00_00_01 appears, I display the frame using ffplay.


import serial
import subprocess
import os
import time

ser = serial.Serial('COM3', 115200, timeout=1)
output_file = "output.264"

# Variable to store the ffplay process
ffplay_process = None

# Open the file for writing in binary mode
with open(output_file, "wb") as file:

 print("Writing bytes to output.264. Waiting for the end-of-frame marker 0x00000001.")

 buffer = bytearray()
 marker = b'\x00\x00\x00\x01'

 try:
 while True:
 if ser.in_waiting: # If there is data in the buffer
 data = ser.read(ser.in_waiting) # Read all available bytes
 buffer.extend(data)

 # Check if the end-of-frame marker is in the buffer
 while marker in buffer:
 index = buffer.index(marker) + len(marker) # Position after the marker
 frame = buffer[:index] # Extract the frame
 buffer = buffer[index:] # Keep the remaining data

 print(f"Frame recorded: {len(frame)} bytes")
 file.write(frame) # Write the frame to the file
 file.flush() # Force writing to disk

 # Close the ffplay window if it is already open
 if ffplay_process and ffplay_process.poll() is None:
 ffplay_process.terminate()
 ffplay_process.wait() # Wait for the process to terminate

 # Play the recorded frame, reopening the window
 ffplay_process = subprocess.Popen(["ffplay", "-f", "h264", "-i", output_file])

 except KeyboardInterrupt:
 print("\nRecording stopped.")
 finally:
 # Close the serial port and the ffplay process
 ser.close()



However, each time a new end-of-frame marker is detected, the ffplay window closes and reopens to show the next frame. It will flicker when transferring the video. Is there a way to display the frames in the same window for seamless playback when streaming video ?


Or is there a better approach or software that is more suited for this task ? I do not know where to start, so I will be glad for any hints.


-
Error audio loading when runing Whisper Open AI model
9 juin 2024, par John mickThe problem I'm trying to solve is that I can't run Whisper model for some audio, it says something related to audio decoding.


payload.wav: Invalid data found when processing input.
raise RuntimeError(f"Failed to load audio: {e.stderr.decode()}") from e



I tried using the
micro-machines.wav
and it works fine but when i used other audio it gives me an error.

import whisper

model = whisper.load_model("base")
text=model.transcribe('micro-machines.wav',fp16=False)
print(text)
text=model.transcribe('payload.wav',fp16=False)
print(text)



Error I'm getting for payload :


d:\...\venv\lib\site-packages\whisper\transcribe.py:79: UserWarning: FP16 is not supported on CPU; using FP32 instead
 warnings.warn("FP16 is not supported on CPU; using FP32 instead") 
Traceback (most recent call last):
 File "d:\...\venv\lib\site-packages\whisper\audio.py", line 42, in load_audio
 ffmpeg.input(file, threads=0) 
 File "d:\...\venv\lib\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 "C:\....\Python\Python39\lib\runpy.py", line 197, in _run_module_as_main
 return _run_code(code, main_globals, None,
 File "C:\.....\Python\Python39\lib\runpy.py", line 87, in _run_code
 exec(code, run_globals)
 File "D:\...\venv\Scripts\whisper.exe\__main__.py", line 7, in <module>
 File "d:\...\venv\lib\site-packages\whisper\transcribe.py", line 314, in cli
 result = transcribe(model, audio_path, temperature=temperature, **args)
 File "d:\...\venv\lib\site-packages\whisper\transcribe.py", line 85, in transcribe
 mel = log_mel_spectrogram(audio)
 File "d:\...\venv\lib\site-packages\whisper\audio.py", line 111, in log_mel_spectrogram
 audio = load_audio(audio)
 File "d:\...\venv\lib\site-packages\whisper\audio.py", line 47, in load_audio
 raise RuntimeError(f"Failed to load audio: {e.stderr.decode()}") from e
RuntimeError: Failed to load audio: ffmpeg version 6.0-essentials_build-www.gyan.dev Copyright (c) 2000-2023 the FFmpeg developers
 built with gcc 12.2.0 (Rev10, Built by MSYS2 project)
 configuration: --enable-gpl --enable-version3 --enable-static --disable-w32threads --disable-autodetect --enable-fontconfig --enable-iconv --enable-gnutls --enable-libxml2 --enab
le-gmp --enable-lzma --enable-zlib --enable-libsrt --enable-libssh --enable-libzmq --enable-avisynth --enable-sdl2 --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxv
id --enable-libaom --enable-libopenjpeg --enable-libvpx --enable-libass --enable-libfreetype --enable-libfribidi --enable-libvidstab --enable-libvmaf --enable-libzimg --enable-amf 
--enable-cuda-llvm --enable-cuvid --enable-ffnvcodec --enable-nvdec --enable-nvenc --enable-d3d11va --enable-dxva2 --enable-libmfx --enable-libgme --enable-libopenmpt --enable-libo
pencore-amrwb --enable-libmp3lame --enable-libtheora --enable-libvo-amrwbenc --enable-libgsm --enable-libopencore-amrnb --enable-libopus --enable-libspeex --enable-libvorbis --enab
le-librubberband
 libavutil 58. 2.100 / 58. 2.100
 libavcodec 60. 3.100 / 60. 3.100
 libavformat 60. 3.100 / 60. 3.100
 libavdevice 60. 1.100 / 60. 1.100
 libavfilter 9. 3.100 / 9. 3.100
 libswscale 7. 1.100 / 7. 1.100
 libswresample 4. 10.100 / 4. 10.100
 libpostproc 57. 1.100 / 57. 1.100
payload.wav: Invalid data found when processing input
</module>


I tried searching for solutions and I found one which says It appears that the code failed to load the audio file for some reason and even failed to display that error because e.stderr did not contain a valid UTF-8 string


-
configure : Separate subsystem for Immersive Audio Model
3 avril 2024, par Eugene Zemtsovconfigure : Separate subsystem for Immersive Audio Model
This change allows users to build libavfomat without support
for Immersive Audio Model by specifying —disable-iamf.
It helps to save on binary size in cases where it's important.Co-authored-by : James Almer <jamrial@gmail.com>
Signed-off-by : Eugene Zemtsov <eugene@chromium.org>
Signed-off-by : James Almer <jamrial@gmail.com>