nanashi-1 / bilibili-extractor

Extracts🔩 and compiles🔨 downloaded content from Bilibili.
MIT License
2 stars 0 forks source link

`Soft Subtitles` not showing up in video players by default. #11

Closed husenunicorn closed 8 months ago

husenunicorn commented 8 months ago

The following is the download directory structure from Bilibili

download/
└── s_34641
    └── 359301
        ├── 64
        │   ├── audio.m4s
        │   ├── index.json
        │   └── video.m4s
        ├── id
        │   └── f9171d78e6aa73b2079d15ceb9b5e4f9139cd157.ass
        └── entry.json

For the download results from Bilibili, I found that the downloaded subtitle format was .ass rather than .json

when I run the command

./bilibili_extractor_cli compile download output

✔ Compiled Anime Name EP01!

it worked and didn't show any errors, but when I watched the video the subtitles didn't appear

and when I saw the download directory structure of bilibili changed like this

download/
└── s_34641
    └── 359301
        ├── 64
        │   ├── audio.m4s
        │   ├── index.json
        │   └── video.m4s
        ├── id  (empty)
        │   └── 
        └── entry.json
        └── subtitle.ass

Is there a way for the compilation to include subtitles in .ass format in the ID directory combined with video and audio? Thank You

nanashi-1 commented 8 months ago

bilibili-extractor should be able use the .ass subtitle without converting it to other formats. I don't know what happened here.

Can you give me the output of ffprobe path/to/output_file?

Can I also ask what anime this is?

husenunicorn commented 8 months ago

the name of the anime that I want to compile is Solo Leveling

Example of the structure

download/
└── s_2097863
    └── 13079919
        ├── 64
        │   ├── audio.m4s
        │   ├── index.json
        │   └── video.m4s
        ├── id
        │   └── f9171d78e6aa73b2079d15ceb9b5e4f9139cd157.ass
        └── entry.json

okay, here is a video when I compile the anime

I am using termux and ffmpeg version 6.1.1

https://github.com/nanashi-1/bilibili-extractor/assets/122751959/df7585e4-b219-4f5b-8855-6549f689c503

I changed this line of code

https://github.com/nanashi-1/bilibili-extractor/blob/7355724b6efa962da09dd69cd9c030639ba5c86b/src/cli/main.rs#L51

by changing it to "id" because I speak Indonesian and compiling the source code

when I watch a video in the SL directory the subtitles don't appear

nanashi-1 commented 8 months ago

Do you have access to ffprobe? I want to see if the subtitle is indeed in one of the streams. This is because some players doesn't display subtitles by default.

husenunicorn commented 8 months ago

it turns out I have to select the subtitles first so they appear, I tried using VLC😭, is there a way to make the subtitles appear without selecting them by default? and this is a screenshot from ffprobe By the way, thank you for making this bilibili-extractor very helpful for me, very grateful🙏

Screenshot_20240210-165902_VLC

Screenshot_20240210-170042_Termux

nanashi-1 commented 8 months ago

I have to make it work by default. I will release a fix in the next update.

By the way, thanks for the contribution.