
Recherche avancée
Autres articles (79)
-
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 ;
-
Ecrire une actualité
21 juin 2013, parPrésentez les changements dans votre MédiaSPIP ou les actualités de vos projets sur votre MédiaSPIP grâce à la rubrique actualités.
Dans le thème par défaut spipeo de MédiaSPIP, les actualités sont affichées en bas de la page principale sous les éditoriaux.
Vous pouvez personnaliser le formulaire de création d’une actualité.
Formulaire de création d’une actualité Dans le cas d’un document de type actualité, les champs proposés par défaut sont : Date de publication ( personnaliser la date de publication ) (...) -
Installation en mode ferme
4 février 2011, parLe mode ferme permet d’héberger plusieurs sites de type MediaSPIP en n’installant qu’une seule fois son noyau fonctionnel.
C’est la méthode que nous utilisons sur cette même plateforme.
L’utilisation en mode ferme nécessite de connaïtre un peu le mécanisme de SPIP contrairement à la version standalone qui ne nécessite pas réellement de connaissances spécifique puisque l’espace privé habituel de SPIP n’est plus utilisé.
Dans un premier temps, vous devez avoir installé les mêmes fichiers que l’installation (...)
Sur d’autres sites (6247)
-
Handling multiple line subtitles of Right aligned languages(arabic) in Moviepy
24 décembre 2023, par Stanger DangerI am trying to add Arabic subtitles on a video using Moviepy. The issue I'm facing is related to alignment of Arabic text, as it progresses from right to left, instead of left to right in English language.




As text length gets more and more, Moviepy trims the words from both ends, this issue can be resolved if we break the text into multiple lines. This works well for English language but for Arabic, the first line becomes the last line because of the (Right-Left)alignment.




The text on Second line should come first on the first line at the start, while end chuck of first text towards the left corner should render on the second line, but it is getting rendered as English language, Left to right alignment.


Here is my code :


def add_subtitles(address_subtitles, address_video):
 video = VideoFileClip(address_video)
 generator = lambda txt: TextClip(txt, font='Arial', fontsize=22, color='black', stroke_width=2, method='caption', align='south', size=video.size)
 subtitles = SubtitlesClip(address_subtitles, generator)
 #print()

 result = CompositeVideoClip([video, subtitles.set_pos(('center','bottom'))])
 result.write_videofile("arabic_with_hardcoded_subtitles_3.mp4", fps=video.fps, temp_audiofile="temp-audio.m4a", remove_temp=True, codec="libx264"
 , audio_codec="aac")



-
Add subtitles starting at a specific timestamp using Ffmpeg-Python
21 août 2023, par grilo13I want to add a .srt file (subtitles) to a .mp4 video. How can I add the subtitles at a specific timestamp ?


As an example, my .mp4 video starts the talking part at 00:00:25, so thats there where I want to have the subtitles appearing with the audio.


I have this at the moment to add the subtitles in the video (and it works) :


video_clip = ffmpeg.input("background_video.mp4")
video_clip.filter("subtitles", f"Subtitles/{post_id}/sub.srt",
 fontsdir="fonts/Roboto-Black.ttf",
force_style="Alignment=10,FontName=Roboto-Regular,FontSize=12")
 



Thanks in advance.


What I have above adds the subtitles in the beginning of the video (instead of in the 25th second)


-
log : change color for filters from blue to bright green
20 juin 2012, par Michael Niedermayerlog : change color for filters from blue to bright green