From 8765d2102c2b1458795affb6a2020fcdccc2b89e Mon Sep 17 00:00:00 2001 From: MoathTar Date: Sat, 1 Jun 2024 06:10:49 +0300 Subject: [PATCH] fixed for now --- src/app/GeneratorPage/generator/generator.component.html | 4 ++-- src/app/GeneratorPage/generator/generator.component.ts | 6 ++++-- src/app/Services/quran.service.ts | 2 +- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/app/GeneratorPage/generator/generator.component.html b/src/app/GeneratorPage/generator/generator.component.html index a1d0a75..4bc756f 100644 --- a/src/app/GeneratorPage/generator/generator.component.html +++ b/src/app/GeneratorPage/generator/generator.component.html @@ -67,9 +67,9 @@
-
{{this.executingProgressLabel()}} Elapsed Time {{this.clock + ' s'}}
+
{{this.executingProgressLabel()}} Elapsed Time {{this.executingTime + ' s'}}
- +
diff --git a/src/app/GeneratorPage/generator/generator.component.ts b/src/app/GeneratorPage/generator/generator.component.ts index 83311fc..0196389 100644 --- a/src/app/GeneratorPage/generator/generator.component.ts +++ b/src/app/GeneratorPage/generator/generator.component.ts @@ -89,7 +89,7 @@ export class GeneratorComponent { async load() { this.loaded = false; - this.ffmpeg.on("log", ({ message,type }) => { + this.ffmpeg.on("log", ({ message }) => { this.message = message; }); this.ffmpeg.on("progress",({progress,time}) =>{ @@ -107,7 +107,7 @@ export class GeneratorComponent { this.loaded = true; }; async transcode(audios:Blob[]) { - this.ffmpegExecuting = true; + this.firstLoad = true; this.loadedAudio = true; @@ -142,6 +142,8 @@ export class GeneratorComponent { await this.ffmpeg.writeFile('subtitles.ass',subtitleFile); await this.ffmpeg.writeFile('/tmp/Al-QuranAlKareem',await fetchFile('/assets/fonts/Al-QuranAlKareem.ttf')); // await this.ffmpeg.writeFile('subtitles.ass',await fetchFile('/assets/subs/test.ass')); + this.ffmpegExecuting = true; + this.executingProgress.set(0); await this.ffmpeg.exec(['-stream_loop', '-1', '-i', 'video.mp4', '-i', 'output.mp3', '-c:v', 'copy', '-c:a', 'aac', '-map', '0:v:0', '-map', '1:a:0', '-shortest','output.mp4']); //:fontsdir=/tmp:force_style='Fontname=Arimo,Fontsize=24,PrimaryColour=&H00FFFFFF,OutlineColour=&H000000FF,BackColour=&H00000000,Bold=1,Italic=0,Alignment=2,MarginV=40 let command = ['-i','output.mp4',"-vf","ass=subtitles.ass:fontsdir=tmp","-c:v","libx264","-preset","ultrafast","-crf","32","-c:a","copy",'outputsub.mp4']; diff --git a/src/app/Services/quran.service.ts b/src/app/Services/quran.service.ts index ba15192..eaaee73 100644 --- a/src/app/Services/quran.service.ts +++ b/src/app/Services/quran.service.ts @@ -32,7 +32,7 @@ export class QuranService { map(ayahs => { let text: string[] = []; ayahs.forEach(ayah => { - text.push(language == 'arabic' ? ayah.arabic1 : ayah.english); + text.push(language == 'arabic' ? ayah.arabic2 : ayah.english); }); return text; })