Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No ASS file could be found for the subs Ambor_Readings, but two files were matched previously, please report this case. #39

Closed
CarterLi opened this issue Sep 6, 2022 · 4 comments
Labels
bug Something isn't working

Comments

@CarterLi
Copy link

CarterLi commented Sep 6, 2022

$  ./GICutscenes batchDemux "C:\Program Files\Genshin Impact\Genshin Impact Game\YuanShen_Data\StreamingAssets\VideoAssets\StandaloneWindows64" --output './output' -m -s -e ffmpeg

Output folder : C:\Users\zhang\GI-cutscenes\src\bin\Release\net7.0\output
Finding encryption key for Ambor_Readings.usm...
key1=D53F3E0B key2=00000000
Demuxing Ambor_Readings.usm : extracting video and audio...
Converting Ambor_Readings_2.hca to wav...
Converting Ambor_Readings_1.hca to wav...
Converting Ambor_Readings_0.hca to wav...
Converting Ambor_Readings_3.hca to wav...
Extraction completed !
Merging using ffmpeg.
Subtitles name found: Ambor_Readings
Unhandled exception: System.IO.FileNotFoundException: No ASS file could be found for the subs Ambor_Readings, but two files were matched previously, please report this case.
   at GICutscenes.Program.MergeFiles(String outputPath, String basename, String engine, Boolean subs) in C:\Users\zhang\GI-cutscenes\src\Program.cs:line 285
   at GICutscenes.Program.BatchDemuxCommand(DirectoryInfo inputDir, DirectoryInfo outputDir, String engine, Boolean merge, Boolean subs, Boolean noCleanup) in C:\Users\zhang\GI-cutscenes\src\Program.cs:line 183
   at GICutscenes.Program.<>c.<<Main>b__1_1>d.MoveNext() in C:\Users\zhang\GI-cutscenes\src\Program.cs:line 135
--- End of stack trace from previous location ---
   at System.CommandLine.Invocation.AnonymousCommandHandler.InvokeAsync(InvocationContext context)
   at System.CommandLine.Invocation.InvocationPipeline.<>c__DisplayClass4_0.<<BuildInvocationChain>b__0>d.MoveNext()
--- End of stack trace from previous location ---
   at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass18_0.<<UseParseErrorReporting>b__0>d.MoveNext()
--- End of stack trace from previous location ---
   at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass13_0.<<UseHelp>b__0>d.MoveNext()
--- End of stack trace from previous location ---
   at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass22_0.<<UseVersionOption>b__0>d.MoveNext()
--- End of stack trace from previous location ---
   at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass20_0.<<UseTypoCorrections>b__0>d.MoveNext()
--- End of stack trace from previous location ---
   at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c.<<UseSuggestDirective>b__19_0>d.MoveNext()
--- End of stack trace from previous location ---
   at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass17_0.<<UseParseDirective>b__0>d.MoveNext()
--- End of stack trace from previous location ---
   at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c.<<RegisterWithDotnetSuggest>b__6_0>d.MoveNext()
--- End of stack trace from previous location ---
   at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass9_0.<<UseExceptionHandler>b__0>d.MoveNext()
$ cat .\appsettings.json
{
  "Settings": {
    "MkvMergePath": "",
    "FfmpegPath": "C:\\Users\\zhang\\scoop\\shims\\ffmpeg.exe",
    "SubsFolder": "C:\\Users\\zhang\\Grasscutter_Resources\\Resources\\Subtitle"
  }
}
$  ll C:\\Users\\zhang\\Grasscutter_Resources\\Resources\\Subtitle\\CHS
.rwxrwx--- MSIGE76\zhang MSIGE76\zhang 1.5 KB Tue Sep  6 21:40:58 2022  Ambor_Readings_CHS.srt
.rwxrwx--- MSIGE76\zhang MSIGE76\zhang 1.5 KB Tue Sep  6 21:40:58 2022  Ambor_Readings_CHS.txt
.rwxrwx--- MSIGE76\zhang MSIGE76\zhang 627 B  Tue Sep  6 21:40:58 2022  battlePass_CHS.srt
.rwxrwx--- MSIGE76\zhang MSIGE76\zhang 627 B  Tue Sep  6 21:40:58 2022  battlePass_CHS.txt
@ToaHartor
Copy link
Owner

Alright, maybe my code was too restrictive on that part, because there is duplicate subtitles. What you can do is to remove either the .srt or the .txt version (it should be the same to be honest). It shouldn't be an error though, as I should've added an additional case.

@ToaHartor ToaHartor added the bug Something isn't working label Sep 6, 2022
@CarterLi
Copy link
Author

CarterLi commented Sep 6, 2022

@ToaHartor
Copy link
Owner

Hmm, maybe since 3.0, the files no longer have the txt extension but have the srt one instead (which is their right format). I'll make a fix to choose the srt extension in priority, but as a temporary fix you can remove the txt ones I believe.

@CarterLi
Copy link
Author

CarterLi commented Sep 6, 2022

It worked with .txt files removed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants