SageTV Community  

Go Back   SageTV Community > SageTV Products > SageTV Software

Notices

SageTV Software Discussion related to the SageTV application produced by SageTV. Questions, issues, problems, suggestions, etc. relating to the SageTV software application should be posted here. (Check the descriptions of the other forums; all hardware related questions go in the Hardware Support forum, etc. And, post in the customizations forum instead if any customizations are active.)

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 02-25-2022, 09:37 PM
CptKirk CptKirk is offline
Sage Aficionado
 
Join Date: Sep 2010
Posts: 256
Adding SRT subtitles to a Blueray rip

This is coming from another thread I started but I wanted to break this off on its own since it is more of a how-to (with potentially a couple of subtitle bugs found).

Original thread (Problem playing a ripped MKV file

If I was going to do this for the hundreds of DVDs I have I don't think I would bother. But since I only just now started with blueray I only have 2 of them. I know, late to the party...

What I am doing:

I have the blueray main title with all EN audio and all EN subtitles ripped to a directory on my server. That is my 'start' for then ripping to change from 30 GB down to 5 GB MKV files.

Subtitle Edit v3.6.4 - To extract the subtitles to SRT (lots of websites post SRT files, but I prefer to make my own from the source)

Quote:
1. Clicked on the Open icon and navigated/selected the blueray .m2ts file.
2. The program starts to parse through the file (takes a while, progress is shown at the bottom)
3. When it is almost done parsing the program through a 'Windows Forms Thread Exception' stating that the thread was too long (guess it doesn't like a 30GB .m2ts file)
4. Would have hoped it did not error but have to exit from Subtitle Edit to work around my getting that error

I posted this info in case you try this and also get an error.
Handbrake v1.5.1 - To get a smaller file that Subtitle Edit can handle without having problems

Quote:
1. Drag and drop my blueray folder containing my move
2. Click on Presets and select H.264 MKV 480p30
3. Filters tab and turn off any filters
4. Video tab and set: Video Encoder - H.264 (NVidia NVEnc) (if you have an NVidia graphics card), Framerate - same as source, Constant framerate, Encoder preset - Ultrafast (Same as source and constant for audio/video sync, NVidia and ultrafast to get it done in a hurry)
5. Subtitles tab and delete all that the preset added, then Tracks - Add All Remaining Tracks. Delete the ones I don't need/want, reorder them as needed, give them names.
6. Give it an output name and start the transcode.
7. The full movie transcode takes about 8 minutes instead of over an hour. Depends on your system. Remember this is just to get a small MKV to extract the subtitles from, don't care what it looks like.
Ok, back to...

Subtitle Edit v3.6.4 - To extract the subtitles to SRT

Quote:
1. Clicked on Open icon and navigated/select the blueray temporary MKV you just created.
2. The program starts to parse through the file.
3. If you did more than one subtitle it will ask you which one to use (It should parse through it very quickly).
4. Upper left of the screen for OCR method select Tesseract 5.00. I tried all of them and for me, it does the best job (really fast and accurate).
5. Click on Start OCR button
6. It starts running through the OCR process and if it needs help it stops and you provide a correction.
7. When done click OK
8. You can review the OCR'd text and double-check it, correct it, etc. So far it has been spot on for me.
9. Click on File-Save AS and name as you want as a *.srt.
10. Repeat as needed if you have other subtitles
Then on to...

Handbrake v1.5.1 - To make the best looking MKV that you like from your blueray

Quote:
1. Setup Handbrake using the settings you like. Way too subjective, everyone likes what they like, pick the settings right for you. For me, I started with the preset Matroska - H.264 MKV 1080p30 and tweaked from there.
2. Leave the subtitles tab empty though, you will be adding the SRT's you created earlier with another program.
3. For me the full blueray transcode with my settings takes about 1 hour. I tried having all my files and work done on both a spinning HD and an SSD. The time was about the same for both. So this is CPU-dependent.
Now to add SRT subtitles...

MKVToolNix v65.0.0 - To do the subtitles

Quote:
1. Open MKVToolNix GUI
2. Click the Add Source Files button and navigated/select the MKV you just created with no subtitles
3. Click the Add Source Files button and navigated/select the SRT subtitles you extracted earlier (repeat for however many you have)
4. You will see everything populate the window above
5. If you click on an added subtitle you can select some of the properties on the right side. I set Default Track to NO so that subtitles were not displayed automatically. I also give the subtitle track a name.
6. I have a movie with English audio but in places they speak in Chinese, so there is a forced subtitle track. Hopefully, I can get that to work as well.
7. Once you have all your settings made click on the Start Multiplexing button. For me, it finished in about 1 minute.
So now with the MKV file having true text-based SRT subtitles it plays immediately with no long pause.

I know this looks like a lot, but it really only a few more minutes of time.


So possible SageTV subtitle bug(s):

But I have discovered that no matter how many subtitles in the MKV file I have that SageTV will only play the first one. I can select the second or third subtitle track while the movie is playing but it still outputs the first subtitle track.

Also, if I try to name the tracks (ie: EN, CH, JP, EN Forced) SageTV does not display it, just shows #1 eng, #2 eng, etc.

If I use MKVToolNix GUI program to set the Forced flag on a subtitle SageTV will display #1 eng, #2 eng [Forced], etc. So SageTV can recognize that the Forced flag exists. But in the case of this example, only #1 eng will be used even if #2 eng [Forced] is selected.

The optimal/correct solution is like how a DVD or Blueray functions in a dedicated DVD or Blueray player. The Forced subtitle track would be the first/default track and the Forced flag would be set. So it would be ON by default so that if you were watching/listening in English and the actors started talking in Chinese the English subtitles would automatically be displayed. Then if you wanted all subtitles displayed in English (all the time) you could select subtitle track #2.


Quote:
NOTE: This only applies to the MKV file. If I drop the whole 30GB blueray folder in my SageTV movie folder it gets recognized as a blueray and I can select and play any of the subtitle tracks. The subtitle track names still do not show up, but you can select and play them.

ARGH!!!

Just used MediaInfo to look at a file that MKVToolNix GUI created and noticed that all sound tracks (DTS-MA 7.1 passthru, DTS 5.1 passthru and DTS 5.1 Dolby Pro Logic II) were changed to 2 channel audio.

Back to the drawing board for me. More investigation needed.
__________________
SageTV running on: Win10 21H2
SageTV 9.2.6.976 (64 bit)
Java 1.8.0 311 (64 bit)
OpenDCT 0.5.32 (64 bit)
Clients: HD300 (x2)
HDHR3-CC Prime 20220203 (Comcast CableCard) - 3 Tuners
HDFX-4K Flex 20220203 (OTA) - 4 Tuners

Last edited by CptKirk; 02-25-2022 at 10:05 PM.
Reply With Quote
  #2  
Old 02-25-2022, 10:50 PM
MattHelm MattHelm is offline
Sage Icon
 
Join Date: Jun 2005
Location: Chicago, IL
Posts: 1,208
Burn the forced track in while doing the handbrake encode, if only English speakers are in the house. Do the rest just like you did.

Audio, select audio tab, and work there!

You are getting close!
__________________
Server #1= AMD A10-5800, 8G RAM, F2A85-M PRO, 12TB, HDHomerun Prime, HDHR, Colossus (Playback - HD-200)
Server #2= AMD X2 3800+, 2G RAM, M2NPV-VM, 2TB, 3x HDHR OTA (Playback - HD-200)
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Samsung Blueray players... SageTV client! antisoshal Hardware Support 6 11-08-2012 12:01 PM
Steam DVD\BlueRay? NoodleNT SageTV Software 3 03-28-2011 08:02 AM
UK DVB-T Subtitles? jstockto2000 SageTV United Kingdom 0 02-17-2011 07:31 AM
Blueray to hard drive then on sagemc? cowboyway SageMC Custom Interface 1 12-10-2009 08:18 AM
Blueray backup, only one title? simonen SageTV Media Extender 6 08-04-2009 10:02 AM


All times are GMT -6. The time now is 07:26 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2022, vBulletin Solutions Inc.
Copyright 2003-2005 SageTV, LLC. All rights reserved.