
Recherche avancée
Médias (1)
-
Rennes Emotion Map 2010-11
19 octobre 2011, par
Mis à jour : Juillet 2013
Langue : français
Type : Texte
Autres articles (100)
-
MediaSPIP 0.1 Beta version
25 avril 2011, parMediaSPIP 0.1 beta is the first version of MediaSPIP proclaimed as "usable".
The zip file provided here only contains the sources of MediaSPIP in its standalone version.
To get a working installation, you must manually install all-software dependencies on the server.
If you want to use this archive for an installation in "farm mode", you will also need to proceed to other manual (...) -
Multilang : améliorer l’interface pour les blocs multilingues
18 février 2011, parMultilang est un plugin supplémentaire qui n’est pas activé par défaut lors de l’initialisation de MediaSPIP.
Après son activation, une préconfiguration est mise en place automatiquement par MediaSPIP init permettant à la nouvelle fonctionnalité d’être automatiquement opérationnelle. Il n’est donc pas obligatoire de passer par une étape de configuration pour cela. -
Personnaliser en ajoutant son logo, sa bannière ou son image de fond
5 septembre 2013, parCertains 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 ;
Sur d’autres sites (13798)
-
Why are rectangular boxes ([]) showing instead of text in burned subtitles when using ffmpeg/MoviePy on Google Colab ?
14 mai, par LavishI'm working on a Python script that adds subtitles to a video using MoviePy and burns/hardcodes them directly onto the video. The subtitles contain Hindi text, and I’ve specified a custom font that supports Devanagari (Hindi) script.


The code works perfectly fine on my local machine, the subtitles appear correctly with Hindi characters. However, when I run the same code on Google Colab, the subtitles display as rectangular boxes (something like this -> [][][]) instead of proper characters.


Things I've tried :


- 

- Ensured the font used supports Hindi (I'm using NotoSansDevanagari-Regular.ttf renamed as font.ttf).
- Uploaded the font to Colab and specified the full path correctly.
- Verified that the text is passed as a proper Unicode string.








Here's the code snippet :


def add_subtitles(video_path, subtitles_path, output_path):
 """Adds subtitles using FFmpeg with proper path escaping."""
 # Convert to absolute paths and normalize
 
 video_path = os.path.abspath(video_path)
 subtitles_path = os.path.abspath(subtitles_path)
 output_path = os.path.abspath(output_path)


 # Subtitle path
 font_path = "input_files/font.ttf"
 font_path = os.path.abspath(font_path).replace("\\", "\\\\")
 subtitles_path_escaped = os.path.abspath(subtitles_path).replace("\\", "\\\\")
 
 # Escape backslashes in paths
 subtitles_path = subtitles_path.replace("\\", "\\\\")
 # Remove all files in final_videos
 [os.remove(os.path.join(base_dir, "final_videos", f)) for f in os.listdir(os.path.join(base_dir, "final_videos")) if os.path.isfile(os.path.join(base_dir, "final_videos", f))]

 os.makedirs(os.path.dirname(output_path), exist_ok=True)
 escaped_path = subtitles_path.replace(':', '\\:').replace('\\', '\\\\')

 cmd = [
 "ffmpeg",
 "-i", video_path,
 "-vf", f"subtitles={escaped_path}:force_style='FontFile={font_path}'",
 "-c:v", "libx264",
 "-c:a", "copy",
 "-preset", "fast",
 "-crf", "22",
 output_path
]


 # Debug: Print the exact command being executed
 print("Executing:", " ".join(cmd))
 try:
 subprocess.run(cmd, check=True, capture_output=True, text=True)
 print(f"✅ Success! Output saved to: {output_path}")
 except subprocess.CalledProcessError as e:
 print(f"❌ FFmpeg failed with error:\n{e.stderr}")




What could be causing this issue on Colab, and how can I get non-English subtitles (like Hindi) to render properly when burning subtitles using MoviePy/ffmpeg in a Colab environment ?


-
Installing "ffmpeg" package from setup.py in Apache Beam pipeline running on Google Cloud Dataflow
17 avril 2019, par John AllardI’m trying to run an Apache Beam pipeline on Google Cloud Dataflow that utilizes FFmpeg to perform transcoding operations. As I understand it, since ffmpeg is not a python package (available through PIP), I need to install it from setup.py using the following lines
# The output of custom commands (including failures) will be logged in the
# worker-startup log.
CUSTOM_COMMANDS = [
['apt-get', 'update'],
['apt-get', 'install', '-y', 'ffmpeg']]Unfortunately, this is not working. My pipeline is stalling and when I go to examine the logs I’m seeing this
RuntimeError: Command ['apt-get', 'install', '-y', 'ffmpeg'] failed: exit code: 100
It appears to be unable to find the package ’ffmpeg’. I’m curious as to why this is - ffmpeg is a standard package that should be available under apt-get.
-
Google cloud speech to text not giving output for OGG & MP3 files
27 avril 2021, par Vedant JumleI am trying to perform speech to text on a bunch of audio files which are over 10 mins long. I don't want to waste storage on the cloud bucket by straight-up uploading wav files on it. So I am using
ffmpeg
to convert the files either to ogg or mp3 like :
ffmpeg -y -i audio.wav -ar 12000 -r 16000 audio.mp3


ffmpeg -y -i audio.wav -ar 12000 -r 16000 audio.ogg


For testing purpose I ran the speech to text service on a dummy wav file and it seemed to work, I got the text as expected. But for some reason it isn't detecting any speech when I use the ogg or mp3 file. I could not give amr files to work either.


My code :


def transcribe_gcs(gcs_uri):
 client = speech.SpeechClient()

 audio = speech.RecognitionAudio(uri=gcs_uri)
 config = speech.RecognitionConfig(
 encoding="OGG_OPUS", #replace with "LINEAR16" for wav, "OGG_OPUS" for ogg, "AMR" for amr
 sample_rate_hertz=16000,
 language_code="en-US",
 )
 print("starting operation")
 operation = client.long_running_recognize(config=config, audio=audio)
 response = operation.result()
 print(response)



I have set up the authentication properly, so that is not a problem.


When I run the speech to text service on the same audio but in ogg or mp3(I just comment out the encoding setting from the config for mp3) format, it gives no response, just prints out a line break and done.


What can I do to fix this ?