
Recherche avancée
Médias (91)
-
Valkaama DVD Cover Outside
4 octobre 2011, par
Mis à jour : Octobre 2011
Langue : English
Type : Image
-
Valkaama DVD Label
4 octobre 2011, par
Mis à jour : Février 2013
Langue : English
Type : Image
-
Valkaama DVD Cover Inside
4 octobre 2011, par
Mis à jour : Octobre 2011
Langue : English
Type : Image
-
1,000,000
27 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Demon Seed
26 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
The Four of Us are Dying
26 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
Autres articles (40)
-
MediaSPIP v0.2
21 juin 2013, parMediaSPIP 0.2 est la première version de MediaSPIP stable.
Sa date de sortie officielle est le 21 juin 2013 et est annoncée ici.
Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
Comme pour la version précédente, il est nécessaire d’installer manuellement l’ensemble des dépendances logicielles sur le serveur.
Si vous souhaitez utiliser cette archive pour une installation en mode ferme, il vous faudra également procéder à d’autres modifications (...) -
Mise à disposition des fichiers
14 avril 2011, parPar défaut, lors de son initialisation, MediaSPIP ne permet pas aux visiteurs de télécharger les fichiers qu’ils soient originaux ou le résultat de leur transformation ou encodage. Il permet uniquement de les visualiser.
Cependant, il est possible et facile d’autoriser les visiteurs à avoir accès à ces documents et ce sous différentes formes.
Tout cela se passe dans la page de configuration du squelette. Il vous faut aller dans l’espace d’administration du canal, et choisir dans la navigation (...) -
MediaSPIP version 0.1 Beta
16 avril 2011, parMediaSPIP 0.1 beta est la première version de MediaSPIP décrétée comme "utilisable".
Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
Pour avoir une installation fonctionnelle, il est nécessaire d’installer manuellement l’ensemble des dépendances logicielles sur le serveur.
Si vous souhaitez utiliser cette archive pour une installation en mode ferme, il vous faudra également procéder à d’autres modifications (...)
Sur d’autres sites (4883)
-
avcodec/vp8 : Fix wrong vpx_rac_is_end() check
16 novembre 2022, par Hirokazu Hondaavcodec/vp8 : Fix wrong vpx_rac_is_end() check
The check of vpx_rac_is_end check(s) are added originally from
1afd246960202917e244c844c534e9c1e3c323f5. It causes a regression
of some vp8 stream. b6b9ac5698c8f911841b469af77199153278c55c fixes
the regression by a sort of band-aid way. This fixes the wrongness
of the original commit. vpx_rac_is_end() should be called against
the bool decoder for the vp8 headr context, not one for each
coefficient. Reference is vp8_dixie_tokens_process_row() in token.c
in spec 20.16.Fixes : Ticket 8069
Fixes : regression of 1afd246960202917e244c844c534e9c1e3c323f5.
Fixes : b6b9ac5698c8f911841b469af77199153278c55cCo-authored-by : Ronald S. Bultje <rsbultje@gmail.com>
Signed-off-by : Hirokazu Honda <hiroh@chromium.org>
Signed-off-by : Ronald S. Bultje <rsbultje@gmail.com> -
Open letter to the European Parliament’s LIBE committee
28 novembre 2019, par Joselyn Khor — Uncategorized -
Multiple Dialogue lines of an ASS subtitle file is displayed at the same time on the video file
14 janvier 2024, par Furkan GözükaraI am trying to code an ASS subtitle burner.


Converting given SRT file into ASS subtitle


Let me show examples


Below is given SRT file - generated with Whisper


1
00:00:00,000 --> 00:00:00,080
<u>American</u> XL Bully Dog

2
00:00:00,080 --> 00:00:00,640
American <u>XL</u> Bully Dog

3
00:00:00,640 --> 00:00:01,140
American XL <u>Bully</u> Dog

4
00:00:01,140 --> 00:00:01,280
American XL Bully <u>Dog</u>

5
00:00:01,280 --> 00:00:01,520
<u>is</u> a danger to

6
00:00:01,520 --> 00:00:01,640
is <u>a</u> danger to

7
00:00:01,640 --> 00:00:01,800
is a <u>danger</u> to

8
00:00:01,800 --> 00:00:02,220
is a danger <u>to</u>

9
00:00:02,220 --> 00:00:02,380
<u>our</u> communities, particularly our

10
00:00:02,380 --> 00:00:02,680
our <u>communities,</u> particularly our

11
00:00:02,680 --> 00:00:03,360
our communities, particularly our

12
00:00:03,360 --> 00:00:03,580
our communities, <u>particularly</u> our

13
00:00:03,580 --> 00:00:04,060
our communities, particularly <u>our</u>

14
00:00:04,060 --> 00:00:04,280
<u>children.</u>



Then this above SRT file is converted into the below ASS subtitle


[Script Info]
ScriptType: v4.00+
PlayResX: 384
PlayResY: 288

[V4+ Styles]
Format: Name, Fontname, Fontsize, PrimaryColour, SecondaryColour, OutlineColour, BackColour, Bold, Italic, Underline, StrikeOut, ScaleX, ScaleY, Spacing, Angle, BorderStyle, Outline, Shadow, Alignment, MarginL, MarginR, MarginV, Encoding
Style: Default,Arial,16,&H00FFFFFF,&H0000FF00,&H00000000,&H00000000,0,0,0,0,100,100,0,0,1,1,0,2,10,10,10,1

[Events]
Format: Layer, Start, End, Style, Name, MarginL, MarginR, MarginV, Effect, Text
Dialogue: 0,00:00:00.000,00:00:00.080,Default,,0,0,0,,{\c&H00FF00&}American{\c&HFFFFFF&} XL Bully Dog
Dialogue: 0,00:00:00.080,00:00:00.640,Default,,0,0,0,,American {\c&H00FF00&}XL{\c&HFFFFFF&} Bully Dog
Dialogue: 0,00:00:00.640,00:00:01.140,Default,,0,0,0,,American XL {\c&H00FF00&}Bully{\c&HFFFFFF&} Dog
Dialogue: 0,00:00:01.140,00:00:01.280,Default,,0,0,0,,American XL Bully {\c&H00FF00&}Dog{\c&HFFFFFF&}
Dialogue: 0,00:00:01.280,00:00:01.520,Default,,0,0,0,,{\c&H00FF00&}is{\c&HFFFFFF&} a danger to
Dialogue: 0,00:00:01.520,00:00:01.640,Default,,0,0,0,,is {\c&H00FF00&}a{\c&HFFFFFF&} danger to
Dialogue: 0,00:00:01.640,00:00:01.800,Default,,0,0,0,,is a {\c&H00FF00&}danger{\c&HFFFFFF&} to
Dialogue: 0,00:00:01.800,00:00:02.220,Default,,0,0,0,,is a danger {\c&H00FF00&}to{\c&HFFFFFF&}
Dialogue: 0,00:00:02.220,00:00:02.380,Default,,0,0,0,,{\c&H00FF00&}our{\c&HFFFFFF&} communities, particularly our
Dialogue: 0,00:00:02.380,00:00:02.680,Default,,0,0,0,,our {\c&H00FF00&}communities,{\c&HFFFFFF&} particularly our
Dialogue: 0,00:00:02.680,00:00:03.360,Default,,0,0,0,,our communities, particularly our
Dialogue: 0,00:00:03.360,00:00:03.580,Default,,0,0,0,,our communities, {\c&H00FF00&}particularly{\c&HFFFFFF&} our
Dialogue: 0,00:00:03.580,00:00:04.060,Default,,0,0,0,,our communities, particularly {\c&H00FF00&}our{\c&HFFFFFF&}
Dialogue: 0,00:00:04.060,00:00:04.280,Default,,0,0,0,,{\c&H00FF00&}children.{\c&HFFFFFF&}



Both when playing the subtitle in any video player or burning into video via FFMPEG, what happens is, multiple Dialogue lines are being displayed at the same time on the screen.


I am doing a lot of research regarding this but still couldn't find out the issue.


Here screenshot of what I mean. So how can I fix this issue ? What is wrong with my ASS file format ?




Here below the functio that I am use to generate that ASS format


def convert_srt_to_ass(srt_content):
 # ASS header
 ass_header = (
 "[Script Info]\n"
 "ScriptType: v4.00+\n"
 "PlayResX: 384\n"
 "PlayResY: 288\n\n"
 "[V4+ Styles]\n"
 "Format: Name, Fontname, Fontsize, PrimaryColour, SecondaryColour, OutlineColour, BackColour, Bold, Italic, Underline, StrikeOut, ScaleX, ScaleY, Spacing, Angle, BorderStyle, Outline, Shadow, Alignment, MarginL, MarginR, MarginV, Encoding\n"
 "Style: Default,Arial,16,&H00FFFFFF,&H0000FF00,&H00000000,&H00000000,0,0,0,0,100,100,0,0,1,1,0,2,10,10,10,1\n\n"
 "[Events]\n"
 "Format: Layer, Start, End, Style, Name, MarginL, MarginR, MarginV, Effect, Text\n"
 )

 ass_content = ass_header
 # Adjust regex to properly capture subtitle number, start time, end time, and text
 matches = list(re.finditer(r'(\d+)\n(\d{2}:\d{2}:\d{2},\d{3}) --> (\d{2}:\d{2}:\d{2},\d{3})\n(.+?)\n\n', srt_content, re.DOTALL))

 prev_end = None
 
 for match in matches:
 start, end, text = match.group(2), match.group(3), match.group(4)
 start = start.replace(',', '.')
 end = end.replace(',', '.')

 # Calculate the correct start and end times to ensure no overlap
 if prev_end and start <= prev_end:
 # Adjust the previous end time to be a bit before the current start time
 prev_end_time = datetime.strptime(prev_end, '%H:%M:%S.%f')
 adjusted_end_time = prev_end_time - timedelta(milliseconds=100) # Adjust by 100 milliseconds
 prev_end = adjusted_end_time.strftime('%H:%M:%S.%f')[:-3] # Truncate to 3 decimal places

 ass_content = ass_content.rstrip()
 ass_content = re.sub(r'(\d{2}:\d{2}:\d{2}\.\d{3}),Default,,$', f'{prev_end},Default,,', ass_content, 1)
 ass_content += '\n'

 prev_end = end

 # Formatting the text and adding it to the content
 text = text.replace('<u>', '{\\c&H00FF00&}').replace('</u>', '{\\c&HFFFFFF&}')
 text = text.replace('\n', '\\N') # Convert newlines within text for ASS format
 ass_content += f"Dialogue: 0,{start},{end},Default,,0,0,0,,{text}\n"

 
 # Conversion of text and other formatting remains the same

 return ass_content