Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion. Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules. |
![]() |
#1 | Link |
Registered User
Join Date: Nov 2022
Posts: 14
|
Muxing fonts only present in .ass file
Hi all,
I have some .ass subtitles, each using different fonts. I want to mux each subtitle and the matching fonts into different video files (mkv container). I want to do this without adding all the fonts into the container, instead adding only those that are actually listed in the .ass file. Since there are a lot of subtitles and I don't want to open them one by one and pick the fonts that are alike, I'm searching for a different method. For example if there was a method where the same fonts could be copied into separate folders using a script or batch file, that would be the best. I have no coding experience sadly. Also I'm on Win 10. Can you help me? Last edited by Tschizzey; 5th December 2022 at 21:37. |
![]() |
![]() |
![]() |
#2 | Link |
Registered User
Join Date: Nov 2022
Posts: 14
|
If anyone reads this in the future, I managed to solve my problem with a Linux command a friend gave me.
Code:
for x in *ass; do cat "$x" | grep 'Style:' | awk -F, '{ print $2 }' | sed '/^$/d' | sort -u > "$x".txt; done |
![]() |
![]() |
![]() |
#3 | Link |
Registered User
Join Date: Jul 2015
Posts: 4
|
There is an easier way:
https://github.com/moi15moi/FontCollector Code:
fontCollector -i "subtitle_episode_01.ass" -o "C:\fonts_for_episode_01" --additional-fonts "C:\all_fonts" Code:
SET attachments= FOR /F "delims=" %%f IN ('DIR /B /S "fonts_for_episode_01\*.ttf"') DO ( SET attachments=%attachments% --attach-file "%%f" ) FOR /F "delims=" %%f IN ('DIR /B /S "fonts_for_episode_01\*.otf"') DO ( SET attachments=%attachments% --attach-file "%%f" ) Last edited by Ninelpienel; 2nd February 2023 at 13:25. |
![]() |
![]() |
![]() |
Thread Tools | Search this Thread |
Display Modes | |
|
|