Subtitles off centered
Subtitles off centered
I use MakeMKV to rip both dvd’s and blurays with only minor issues and complaints.
But sometimes, I need to do some post-processing on ripped video files. In the case of bluray discs, the mkv files are generally rather large (around 20 GB) and they would quickly fill up my hard disks if I would leave them like that.
So I compress them with Handbrake into smaller mkv files using RF = 18. This typically reduces the filesize with a factor of 3-4 with only minor loss in quality.
I already did this for a few blurays, which went well including the subtitles, and I recently tried the same with a Peter Falk bluray comprising 4 movies. These movies have English subtitle tracks (PGS) which I would like to keep.
Unfortunately, the subtitles in the resulting mkv files are off centered (horizontally misaligned), but not in a consistent way. Some are shifted to the left, some to the right and some are correctly centered. The vertical offset is mostly correct.
Anybody a suggestion how to solve this?
But sometimes, I need to do some post-processing on ripped video files. In the case of bluray discs, the mkv files are generally rather large (around 20 GB) and they would quickly fill up my hard disks if I would leave them like that.
So I compress them with Handbrake into smaller mkv files using RF = 18. This typically reduces the filesize with a factor of 3-4 with only minor loss in quality.
I already did this for a few blurays, which went well including the subtitles, and I recently tried the same with a Peter Falk bluray comprising 4 movies. These movies have English subtitle tracks (PGS) which I would like to keep.
Unfortunately, the subtitles in the resulting mkv files are off centered (horizontally misaligned), but not in a consistent way. Some are shifted to the left, some to the right and some are correctly centered. The vertical offset is mostly correct.
Anybody a suggestion how to solve this?
-
- Posts: 405
- Joined: Mon Oct 18, 2021 12:23 am
Re: Subtitles off centered
The very first thing I would suggest is to check whether they are like that in the source files (IE. watch the disc)?
If not, and Handbrake has done something to screw up the positioning, you can either:
If not, and Handbrake has done something to screw up the positioning, you can either:
- figure out what setting within HB caused this, correct it, and re-encode again; or
- extract the subs from the source files and mux them into the end-result using MKVToolNix, effectively bypassing whatever HB did.
Re: Subtitles off centered
Some titles off-set the subtitles to the direction their audio would come from. I.e., if the speaker is left of center, the subtitle will be offset to the left, same with right and center. I have a couple of GKids disks like this. But, select a different subtitle track, and they're all centered.
Could this be what you're seeing? Handbrake will align subtitles with how they're displayed on the picture... if you're not changing the resolution of the video at the same time you're encoding it.
Could this be what you're seeing? Handbrake will align subtitles with how they're displayed on the picture... if you're not changing the resolution of the video at the same time you're encoding it.
MakeMKV Frequently Asked Questions
FAQ about BETA and PERMANENT keys.
How to aid in finding the answer to your problem: Activating Debug Logging
FAQ about BETA and PERMANENT keys.
How to aid in finding the answer to your problem: Activating Debug Logging
Re: Subtitles off centered
I checked (I should have done that in the first place, foolish of me), and they are like that in the original ripped file as well. So it seems not to be a Handbrake problemRadiocomms237 wrote: ↑Sun Mar 10, 2024 12:41 amThe very first thing I would suggest is to check whether they are like that in the source files (IE. watch the disc)?
I will give this a try. I.e. use SubtitleEdit to do the OCR on the subtitle and generate a SRT file. Then use that SRT in the Handbrake compression as an external subtitle file.Radiocomms237 wrote: ↑Sun Mar 10, 2024 12:41 amOr in either case, you could extract the subs from the end result and modify the position of each image using SubtitleEdit, and then mux them back in.
I never modified the position of the subtitles in an SRT file beore, to be honest I didn't even know it was actually in there.
Thx.
Re: Subtitles off centered
Your suggestion got me thinking and you might be right. As the subtitles are like that in the orginally ripped file, it could have been done on purpose. Generally they seem to follow the person speaking (i.e. they follow the audio). So if the actor is on the left side (and the audio is probably on the left speaker), subtitles are to the left, and so on. Incidentally, the subtitles are moved to the top, no idea why they did that.Woodstock wrote: ↑Sun Mar 10, 2024 12:44 amSome titles off-set the subtitles to the direction their audio would come from. I.e., if the speaker is left of center, the subtitle will be offset to the left, same with right and center. I have a couple of GKids disks like this. But, select a different subtitle track, and they're all centered.
I have tried a few audio audio settings (other audio track, switching to mono) but to no avail.
To be honest, I don't understand what they were thinking when they did this. The subtitles are jumping all over the place, it's very wearing to follow them. What a bad idea to do that!
Unfortunately, there is just one subtitle track, I can only switch it on or off. No other options.
Could very well be, I did not change the resolution of the video.
Last edited by RAHRL on Tue Mar 12, 2024 7:29 pm, edited 1 time in total.
-
- Posts: 405
- Joined: Mon Oct 18, 2021 12:23 am
Re: Subtitles off centered
You don't need to go through the OCR process. Simply open SubtitleEdit and use:RAHRL wrote: ↑Sun Mar 10, 2024 12:06 pmI will give this a try. I.e. use SubtitleEdit to do the OCR on the subtitle and generate a SRT file. Then use that SRT in the Handbrake compression as an external subtitle file.
I never modified the position of the subtitles in an SRT file beore, to be honest I didn't even know it was actually in there.
Thx.
"File > Import > Blu-ray (.sup) subtitle file for edit..."
Then edit the position of any affected lines directly.
Re: Subtitles off centered
Deleted as no longer relevant.
Last edited by RAHRL on Sat Mar 16, 2024 6:22 pm, edited 3 times in total.
-
- Posts: 405
- Joined: Mon Oct 18, 2021 12:23 am
Re: Subtitles off centered
Sorry, I should have explained that you need to extract the subtitle track(s) from the .mkv file first.
There are many options for extracting tracks from .mkv files. You can use MKVToolNix with the MKVEXtractGUI-2 add-on, plus there are many stand-alone programs that will do it, as well as most video editing suites.
I use Inviska MKVExtract (no longer supported but I believe you can download it here).
Once open, simply drag 'n drop the .mkv file into the program, check the tracks you want, and click "Begin". It will then extract the selected tracks into the same folder as the source file.
Once you have the subtitle track you need, import it into SubtitleEdit as above and you will be able to adjust the position of the individual images.
You can modify each and every line individually, or you can change the entire file at once using "Tools > Alignment..." from the menu.
Once you're happy, remember to "File > Save as..." (I recommend saving under a different file name so you still have an unmodified copy).
Then use MKVToolNix to mux the modified subtitle back into the .mkv file (you can remove the original subs or leave them there so users can choose).
There are many options for extracting tracks from .mkv files. You can use MKVToolNix with the MKVEXtractGUI-2 add-on, plus there are many stand-alone programs that will do it, as well as most video editing suites.
I use Inviska MKVExtract (no longer supported but I believe you can download it here).
Once open, simply drag 'n drop the .mkv file into the program, check the tracks you want, and click "Begin". It will then extract the selected tracks into the same folder as the source file.
Once you have the subtitle track you need, import it into SubtitleEdit as above and you will be able to adjust the position of the individual images.
You can modify each and every line individually, or you can change the entire file at once using "Tools > Alignment..." from the menu.
Once you're happy, remember to "File > Save as..." (I recommend saving under a different file name so you still have an unmodified copy).
Then use MKVToolNix to mux the modified subtitle back into the .mkv file (you can remove the original subs or leave them there so users can choose).
Re: Subtitles off centered
Deleted content as no longer relevant.
Last edited by RAHRL on Sat Mar 16, 2024 6:30 pm, edited 2 times in total.
Re: Subtitles off centered
Deleted content as no longer relevant.
Last edited by RAHRL on Sat Mar 16, 2024 6:30 pm, edited 3 times in total.
Re: Subtitles off centered
Deleted as no longer relevant.
Last edited by RAHRL on Sat Mar 16, 2024 6:29 pm, edited 2 times in total.
Re: Subtitles off centered
Deleted content as no longer relevant.
Last edited by RAHRL on Sat Mar 16, 2024 6:30 pm, edited 3 times in total.
Re: Subtitles off centered
Deleted as no longer relevant.
Last edited by RAHRL on Sat Mar 16, 2024 6:29 pm, edited 2 times in total.
Re: Subtitles off centered
Problem solved!
Deleted content as no longer relevant.
I still have a question about a warning "track ID does not exist" when muxing the a new subtitle track in with mkvmerge from a .sup file.
Deleted content as no longer relevant.
I still have a question about a warning "track ID does not exist" when muxing the a new subtitle track in with mkvmerge from a .sup file.
Last edited by RAHRL on Sat Mar 16, 2024 6:29 pm, edited 1 time in total.
-
- Posts: 405
- Joined: Mon Oct 18, 2021 12:23 am
Re: Subtitles off centered
Glad you got it sorted out. I use the GUI of all these programs, so command line stuff is beyond me (seems like ten times as much work if you ask me).
The "track ID" error is nothing really, you will get that almost every time you add a track into an .mkv file.
Every track within an MKV container (including video, audio and subs) is assigned a "track ID", and if you introduce a track from another source it will likely have a track ID identical to one already present, or no track ID at all. Both scenarios will generate an error and in both cases MKVToolNix will automatically reassign a new track ID anyway.
The "track ID" error is nothing really, you will get that almost every time you add a track into an .mkv file.
Every track within an MKV container (including video, audio and subs) is assigned a "track ID", and if you introduce a track from another source it will likely have a track ID identical to one already present, or no track ID at all. Both scenarios will generate an error and in both cases MKVToolNix will automatically reassign a new track ID anyway.