
Recherche avancée
Médias (91)
-
MediaSPIP Simple : futur thème graphique par défaut ?
26 septembre 2013, par
Mis à jour : Octobre 2013
Langue : français
Type : Video
-
avec chosen
13 septembre 2013, par
Mis à jour : Septembre 2013
Langue : français
Type : Image
-
sans chosen
13 septembre 2013, par
Mis à jour : Septembre 2013
Langue : français
Type : Image
-
config chosen
13 septembre 2013, par
Mis à jour : Septembre 2013
Langue : français
Type : Image
-
SPIP - plugins - embed code - Exemple
2 septembre 2013, par
Mis à jour : Septembre 2013
Langue : français
Type : Image
-
GetID3 - Bloc informations de fichiers
9 avril 2013, par
Mis à jour : Mai 2013
Langue : français
Type : Image
Autres articles (75)
-
Gestion générale des documents
13 mai 2011, parMédiaSPIP ne modifie jamais le document original mis en ligne.
Pour chaque document mis en ligne il effectue deux opérations successives : la création d’une version supplémentaire qui peut être facilement consultée en ligne tout en laissant l’original téléchargeable dans le cas où le document original ne peut être lu dans un navigateur Internet ; la récupération des métadonnées du document original pour illustrer textuellement le fichier ;
Les tableaux ci-dessous expliquent ce que peut faire MédiaSPIP (...) -
MediaSPIP Core : La Configuration
9 novembre 2010, parMediaSPIP Core fournit par défaut trois pages différentes de configuration (ces pages utilisent le plugin de configuration CFG pour fonctionner) : une page spécifique à la configuration générale du squelettes ; une page spécifique à la configuration de la page d’accueil du site ; une page spécifique à la configuration des secteurs ;
Il fournit également une page supplémentaire qui n’apparait que lorsque certains plugins sont activés permettant de contrôler l’affichage et les fonctionnalités spécifiques (...) -
Participer à sa traduction
10 avril 2011Vous pouvez nous aider à améliorer les locutions utilisées dans le logiciel ou à traduire celui-ci dans n’importe qu’elle nouvelle langue permettant sa diffusion à de nouvelles communautés linguistiques.
Pour ce faire, on utilise l’interface de traduction de SPIP où l’ensemble des modules de langue de MediaSPIP sont à disposition. ll vous suffit de vous inscrire sur la liste de discussion des traducteurs pour demander plus d’informations.
Actuellement MediaSPIP n’est disponible qu’en français et (...)
Sur d’autres sites (11354)
-
avformat/mxfdec : Read Apple private Content Light Level from MXF
9 septembre 2020, par Harry Mallon -
POST 500 (internal server error) involving ffmpeg and ffprobe on Gradio [closed]
24 juillet 2023, par AlessandraI'm trying to run a local program on my Windows computer off Visual Studio Code. However, when I run it I keep getting the error below in the console :


POST http://127.0.0.1:7860/run/predict 500 (Internal Server Error)



The terminal in Visual Studio Code displays the following error :


Running on local URL: http://127.0.0.1:7860

Could not create share link. Missing file: C:\Users\02009753\AppData\Local\Programs\Python\Python311\Lib\site-packages\gradio\frpc_windows_amd64_v0.2.

Please check your internet connection. This can happen if your antivirus software blocks the download of this file. You can install manually by following these steps: 

1. Download this file: https://cdn-media.huggingface.co/frpc-gradio-0.2/frpc_windows_amd64.exe
2. Rename the downloaded file to: frpc_windows_amd64_v0.2
3. Move the file to this location: C:\Users\02009753\AppData\Local\Programs\Python\Python311\Lib\site-packages\gradio
C:\Users\02009753\AppData\Local\Programs\Python\Python311\Lib\site-packages\pydub\utils.py:198: RuntimeWarning: Couldn't find ffprobe or avprobe - defaulting to ffprobe, but may not work
 warn("Couldn't find ffprobe or avprobe - defaulting to ffprobe, but may not work", RuntimeWarning)
Traceback (most recent call last):
 File "C:\Users\02009753\AppData\Local\Programs\Python\Python311\Lib\site-packages\gradio\processing_utils.py", line 145, in audio_from_file
 audio = AudioSegment.from_file(filename)
 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 File "C:\Users\02009753\AppData\Local\Programs\Python\Python311\Lib\site-packages\pydub\audio_segment.py", line 728, in from_file
 info = mediainfo_json(orig_file, read_ahead_limit=read_ahead_limit)
 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 File "C:\Users\02009753\AppData\Local\Programs\Python\Python311\Lib\site-packages\pydub\utils.py", line 274, in mediainfo_json
 res = Popen(command, stdin=stdin_parameter, stdout=PIPE, stderr=PIPE)
 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 File "C:\Users\02009753\AppData\Local\Programs\Python\Python311\Lib\subprocess.py", line 1026, in __init__
 self._execute_child(args, executable, preexec_fn, close_fds,
 File "C:\Users\02009753\AppData\Local\Programs\Python\Python311\Lib\subprocess.py", line 1538, in _execute_child
 hp, ht, pid, tid = _winapi.CreateProcess(executable, args,
 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [WinError 2] The system cannot find the file specified

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

Traceback (most recent call last):
 File "C:\Users\02009753\AppData\Local\Programs\Python\Python311\Lib\site-packages\gradio\routes.py", line 439, in run_predict
 output = await app.get_blocks().process_api(
 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 File "C:\Users\02009753\AppData\Local\Programs\Python\Python311\Lib\site-packages\gradio\blocks.py", line 1387, in process_api
 inputs = self.preprocess_data(fn_index, inputs, state)
 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 File "C:\Users\02009753\AppData\Local\Programs\Python\Python311\Lib\site-packages\gradio\blocks.py", line 1230, in preprocess_data
 processed_input.append(block.preprocess(inputs[i]))
 ^^^^^^^^^^^^^^^^^^^^^^^^^^^
 File "C:\Users\02009753\AppData\Local\Programs\Python\Python311\Lib\site-packages\gradio\components\audio.py", line 204, in preprocess
 sample_rate, data = processing_utils.audio_from_file(
 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 File "C:\Users\02009753\AppData\Local\Programs\Python\Python311\Lib\site-packages\gradio\processing_utils.py", line 155, in audio_from_file
 raise RuntimeError(msg) from e
RuntimeError: Cannot load audio from file: `ffprobe` not found. Please install `ffmpeg` in your system to use non-WAV audio file formats and make sure `ffprobe` is in your PATH.



Below is my code :


import gradio as gr
import openai
import winsound
import os
#pip install elevenlabs
from elevenlabslib import *
from pydub import AudioSegment
from pydub.playback import play
import io

#in my actual code my API keys are entered below instead of "**(OPENAI) API KEY HERE**" 
openai.api_key = "**OPENAI API KEY HERE**"
api_key = "**API KEY HERE**"
from elevenlabslib import ElevenLabsUser
user = ElevenLabsUser(api_key)

messages = ["you are a friendly AI assistant"]


def transcribe(audio): #handles audio input from the user
 global messages
 audio_file = open(audio,"rb")
 transcript = openai.Audio.transcribe("whisper-1",audio_file)

 #commit the transcript to the console for debugging
 messages.append(f"\nUser: {transcript['text']}")

 #send audio transcription to NLP model
 response = openai.Completion.create(
 engine='text-davinci-003',
 prompt=messages[-1],
 max_tokens=4096,
 n=1,
 stop=None,
 temperature=0
 )

 system_message=response["choices"][0]["text"]
 messages.append(f"{system_message}")

 #generate ElevenLabs audio response
 voice = user.get_voices_by_name("Antoni")[0]
 audio = voice.generate_audio_bytes(system_message)

 audio = AudioSegment.from_file(io.BytesIO(audio), format="mp3")
 audio.export("output.wav", format="wav")

 winsound.PlaySound("output.wav, winsound.SND_FILENAME")

 chat_transcript = "\n".join(messages)
 
 return chat_transcript

iface=gr.Interface(
 fn=transcribe,
 inputs=gr.Audio(source="microphone", type = "filepath", placeholder="Please start speaking..."),
 outputs="text",
 title="AI Assistant",
 description="Hi, I'm your AI assistant. How can I help?")

iface.launch(share=True)



I have already downloaded FFmpeg via the following instructions : https://www.wikihow.com/Install-FFmpeg-on-Windows . However that didn't solve the error.


How do I fix internal server error ? Thank you in advance for your help.


-
ffmpeg : match audio video duration post concatenation
20 janvier 2020, par Massimo VantaggioI wrote this bash to automate concatentation of videos for dash mpeg streaming infinite loop.
Im unable to obtain same duration for audio and video, with the videos that i’m using for testing i get always 6 ms more for audio track.
May ask help to debug it and understand how to get same duration for both audio and video track ?#!/bin/bash
#CANCAT 0.3
cd input
fps=()
# GET FPS OF EACH VIDEO INTO ARRAY
for f in *.mp4; do
_f=$(ffmpeg -i "$f" 2>&1 | sed -n "s/.*, \\(.*\\) fp.*/\\1/p")
fps+=("$_f")
done
#GET NUMBER OF ELEMENTS IN FPS ARRAY
tLen=${#fps[@]}
#CHECK FPS EQUALITY
for tLen in "${fps[@]:1}"; do
if [[ $tLen != ${fps[0]} ]]; then
printf "WARNING: VIDEO’S FRAME-RATE ARE NOT EQUALS, THE PROCESS CAN’T START."
printf "%s\\0" "${fps[@]}" |
sort -zu |
xargs -0 printf " %s"
printf "\\n"
exit 1
fi
done
#AUDIO ENCODING
for f in *.mp4;
do
NAME=$(echo "$f" | cut -d'.' -f1)
ffmpeg -y -i "$f" -c copy -video_track_timescale 90k -c:a aac -b:a 384k -ar 44100 -ac 2 -shortest -af aresample=async=1 ../buffer/${NAME}_buffer.mp4
done
#-af aresample=async=1000
#-filter_complex " [1:0] apad "
cd ..
cd buffer
times=()
for f in *.mp4;
do
echo "file '$f'" >> list.txt;
# GET DURATION OF EACH VIDEO
_t=$(ffprobe -i "$f" -show_entries format=duration -v quiet -of csv="p=0")
times+=("$_t")
done
#SUM ALL DURATIONS
TOTALDURATION=$( echo "${times[@]}" | sed 's/ /+/g' | bc )
DURROUND=$(echo "$TOTALDURATION" | cut -d'.' -f1)
TOTDELTA="$((DURROUND%2))"
TOTDUR="$(($DURROUND-$TOTDELTA))"
#GET FPS
FPS="$(ffmpeg -i ${f[0]} 2>&1 | sed -n "s/.*, \(.*\) fp.*/\1/p")"
#ROUND FPS
FPSC=$( echo "($FPS+0.5)/1" | bc )
#GET GOP
GOP="$((FPSC*2))"
#ENCODING MASTER TRACK
ffmpeg -f concat -safe 0 -y -i list.txt -loop 1 -i ../logo/logo.png -c:a copy -c:v libx264 -x264opts keyint=$GOP:min-keyint=$GOP:no-scenecut -bf 0 -r $FPSC -b:v 4800k -maxrate 9600k -bufsize 19200k -profile:v main -crf 22 -filter_complex "[0:v][1:v]overlay=main_w-overlay_w-10:10,scale=1920:1080,setsar=1" -t $TOTDUR 1080set.mp4
#EXTRACTING AUDIO FROM MASTER VIDEO TRACK
ffmpeg -y -i 1080set.mp4 -c copy -vn ../output/output_audio.mp4
#REMOVE AUDIO FROM MASTER VIDEO TRACK
ffmpeg -y -i 1080set.mp4 -c copy -an ../output/output_1080.mp4
#CLEAN BUFFER
rm *.mp4
rm *.txt
cd ..
cd output
#ENCODE 720p
ffmpeg -y -i output_1080.mp4 -an -c:v libx264 -x264opts keyint=$GOP:min-keyint=$GOP:no-scenecut -bf 0 -s 1280x720 -r $FPSC -b:v 2400k -maxrate 4800k -bufsize 9600k -profile:v main -crf 22 output_720.mp4
#ENCODE 360p
ffmpeg -y -i output_1080.mp4 -an -c:v libx264 -x264opts keyint=$GOP:min-keyint=$GOP:no-scenecut -bf 0 -s 640x360 -r $FPSC -b:v 800k -maxrate 1600k -bufsize 3200k -profile:v main -crf 22 output_360.mp4
#VALIDATOR
echo 1080p ENCODING
echo GOP: $GOP
echo VIDEO FORMAT CONTAINER DURATION:
ffprobe -v error -show_entries format=duration \
-of default=noprint_wrappers=1:nokey=1 output_1080.mp4
echo VIDEO STREAM DURATION:
ffprobe -v error -select_streams v:0 -show_entries stream=duration \
-of default=noprint_wrappers=1:nokey=1 output_1080.mp4
echo AUDIO FORMAT CONTAINER DURATION:
ffprobe -v error -show_entries format=duration \
-of default=noprint_wrappers=1:nokey=1 output_audio.mp4
echo ______________________________________________________________
echo 720p ENCODING
echo GOP: $GOP
echo VIDEO FORMAT CONTAINER DURATION:
ffprobe -v error -show_entries format=duration \
-of default=noprint_wrappers=1:nokey=1 output_720.mp4
echo VIDEO STREAM DURATION:
ffprobe -v error -select_streams v:0 -show_entries stream=duration \
-of default=noprint_wrappers=1:nokey=1 output_720.mp4
echo DONE
exit 1Here the script with my videos for test and relative folders :
https://gofile.io/?c=WPAC0Q