
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 (106)
-
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. -
Ajouter des informations spécifiques aux utilisateurs et autres modifications de comportement liées aux auteurs
12 avril 2011, parLa manière la plus simple d’ajouter des informations aux auteurs est d’installer le plugin Inscription3. Il permet également de modifier certains comportements liés aux utilisateurs (référez-vous à sa documentation pour plus d’informations).
Il est également possible d’ajouter des champs aux auteurs en installant les plugins champs extras 2 et Interface pour champs extras. -
Contribute to translation
13 avril 2011You can help us to improve the language used in the software interface to make MediaSPIP more accessible and user-friendly. You can also translate the interface into any language that allows it to spread to new linguistic communities.
To do this, we use the translation interface of SPIP where the all the language modules of MediaSPIP are available. Just subscribe to the mailing list and request further informantion on translation.
MediaSPIP is currently available in French and English (...)
Sur d’autres sites (9643)
-
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")



-
mkv file progressively out of sync
29 avril 2017, par PiruzzoloI have a bunch of mkv files, with FLAC as the audio codec and FFV1 as the video one.
The files were created using an EasyCap acquisition dongle from a VCR analog source. Specifically, I used VLC’s "open acquisition device" prompt and selected PAL. Then, I converted the files (audio PCM, video raw YUV) to (FLAC, FFV1) using
ffmpeg.exe -i input.avi -acodec flac -vcodec ffv1 -level 3 -threads 4 -coder 1 -context 1 -g 1 -slices 24 -slicecrc 1 output.mkv
Now, the files are progressively out of sync. It may due to the fact that while (maybe) the video has a constant framerate, the FLAC track has variable framerate. So, is there a way to sync the track to audio, or something alike ? Can FFmpeg do this ? Thanks
EDIT
On Mulvya hint, I plotted the difference in sync at various times ; the first column shows the seconds elapsed, the second shows the difference - in secs. The plot seems to behave linearly, with 0.0078 as a constant slope. NOTE : measurements taken by hands, by means of a chronometer
EDIT 2
Playing around with VirtualDub, I found that changing the framerate to 25 fps from the original 24.889 (
Video
->Frame rate...
->Change frame rate to
) and using the track converted to wav definitely does work. Two problems, though : VirtualDub crashes when importing the original FFV1-FLAC mkv file, so I had to convert the video to H264 to try it out ; more, I find it difficult to use an external encoder to save VirtualDub output.So, could I avoid using VirtualDub, and simply use ffmpeg for it ? Here’s the exported vdscript :
VirtualDub.audio.SetSource("E:\\Cassette\\Filmini\\masters\\Cassetta 4_track2_ita.wav", "");
VirtualDub.audio.SetMode(0);
VirtualDub.audio.SetInterleave(1,500,1,0,0);
VirtualDub.audio.SetClipMode(1,1);
VirtualDub.audio.SetEditMode(1);
VirtualDub.audio.SetConversion(0,0,0,0,0);
VirtualDub.audio.SetVolume();
VirtualDub.audio.SetCompression();
VirtualDub.audio.EnableFilterGraph(0);
VirtualDub.video.SetInputFormat(0);
VirtualDub.video.SetOutputFormat(7);
VirtualDub.video.SetMode(3);
VirtualDub.video.SetSmartRendering(0);
VirtualDub.video.SetPreserveEmptyFrames(0);
VirtualDub.video.SetFrameRate2(25,1,1);
VirtualDub.video.SetIVTC(0, 0, 0, 0);
VirtualDub.video.SetCompression();
VirtualDub.video.filters.Clear();
VirtualDub.audio.filters.Clear();The first line imports the wav-converted audio track.
Can I set an equivalent pipe in ffmpeg (possibly, using FLAC - not wav) ?SetFrameRate2
is maybe the key, here. -
How to "filter" a file through command line before apache sends it to client ?
1er septembre 2020, par Timothe JahanI have large collection of video files which are available on our website.
For each video we have multiple quality and language, so in order to save space we store only 1 file, which contains all audio and video tracks.


Our streaming server can handle these multitrack files in order to serve only the useful part to each user, but we also make them available for download through the apache web server.
Currently, when a user request a file (certain quality, certain language), we first create a temporary file with only his needs, and give him for download.
I would like to remove this intermediate step and extract on the fly.
Extraction can be done by ffmpeg, but I need to have apache "pipe" the file through ffmpeg before sending the bytes out. Do you have any way of doing this.


example :




Filename_multi.mp4 [SD,HD,fr,en,ru]
User request : Filename_HD_fr.mp4 [HD,fr]
Apache fetch the file Filename_multi.mp4 and pipe it through an ffmpeg command and send the bytes as > they are encoded, not waiting for the end.




Note this is on linux, and the ffmpeg part is not a problem.


Thx
Timothé