Looking for a way to join subtitles from individual episodes joined into one show

nlkelly

Member
Hi; i have a series of episodes of a show ( ton of them) that are normally shown in 25 minute epidoes with 4 to 8 episodes making up a storyline. i have embedded subtitles in each episode which i can extract and work with. i plan to join all the episodes together to make one mp4 and woudl like to be able to edit the SRT files ripped from the episodes into an overall SRT for the full story line. i've found that subtitle edit can join SRT files but it starts the 2nd SRT's timing at the end of the first srt's last entry. Since the last entry in a SRT file is usually not the end of the episode (credits and end themes still left - yes i want them to play as individual episodes linked back to back), the timing of the 2nd, third, forth, (and so on) SRT gets offset incorrectly. What i have done is add a cc at the very last second of the video (with subtitle edit) so that the next SRT will will be added one at the end of the video. i have hundreds of these to do and was hoping somebody would know of a utiltiy to automatically add the new SRT at the end of the episode's physical video end time. Even a utility that would automatically add a 1 second CC at the very end of each video ( so that they could be link together correctly in subtitle eidt) would be a vast time saver. Thanks in advance P.S. if your wondering why i want the end and start titles buried in the overall stoy line, it's to i can watch them as they were originally broadcast but randomize the playback (one full story line at a time).
 

Danr

Administrator
Staff member
Why are you using SRT files instead of simply playing the MP4 files with their original embedded subtitles?
 

jmc

Well-known member
The only "text" subtitles I run into (dvds) are CC (Closed Captions). You can extract these into .srt text files.
But as Danr says...Why do this?

What are the text subtitles that are in the MP4s if not CCs?

I do have better luck with subtitles being displayed IF they are a separate file.

EXCEPT with my LG OLED tv. SRTs work but dvd .idx, .sub (image) subtitles do not work at all.
So I have started "burning in" all subtitles...That always works every time.

Oh, I can OCR the .idx/.sub files but there will be so, so many mis spellings.
If there are any OCR programs that have 99.9% accuracy let me know!

Thanks,
jmc
 
Last edited:

nlkelly

Member
Okay so my application is a little specific. I have a video server (emby which works fine with SRTs or embedded MP4 subtitles) which i use for background entertainment while I’m working in my workshop. The individual files (let’s say four episodes for example) played in sequence to form a complete story arc. Normally I play these types of files in series, however I would like to randomize the play back, so, I have a story arc from season 3 could be followed by a story arc from season 8 and so on. If I manually join the files using videoredo, I get one video file with 4 subtitle sets all starting at time zero. What I want is a single subtitle file timed for the full joined mp4 file. I can manually edit the SRT files to include a CC at the end of each file (so that Subtitle edit has a reference to the absolute end of the video) and then join them with Subtitle edit but I thought that possibly there was an app that would look at the length of mp4 #1 and then add that length as an offset to the start of the srt associated with mp4 #2 and so on. I can then embed the full subtitle file in the full mp4 if I want to or leave it separate (emby works with it either way). Most tv series have individual episodes and many cover a general story arc but this particular series ends on a cliff hanger, so you need to see the next successive episode to see what happens. Again, unique application but I thought someone might know of a utility to speed it up.
 

Danr

Administrator
Staff member
If VideoReDo retained the embedded MP4 subtitles would you even need to bother with the SRT files?
 

nlkelly

Member
Videoredo does retain the embedded subtitles (four individual subtitle files in the joined mp4) but they all start at time 0 for the overall file . in vlc i can pick which of the four i want to watch but each one is the length of AN episode and starts at the start first joined episode. So the second joined eposode wont have any subtitles to display while running becasue all four subtitles started and ended in the first joined episode. i've alreaedy tried it. Videoredo doen't offest the subtitle data when joining the video files together. i want to combine 4 episodes into one with one either embedded or external subtitle file that plays for the lenght of the combined file. i want a combined file since i can't randomize the playback and have entire story lines playout. the series is doctor who and there are 25 seasons. Most season have 4 to 6 episodes making up a single story and they have 4 to 6 stories per season. i want to randomize the playback of stories vs episodes and have full subtiles edited correctly for the story. I can do it manually but wondered if there was a utility that would offset the time code in each srt file by the lenght of the mp4 video associated with the previous srt file in the sequence. i can playback the overall file with a single embedded joided subtitle or a single external joined srt file, either way it doesn't make any difference to emby. These came from a DVD and in the original dvd menu, you can play a story arc as a set but it doesn't play the end titles and start titles between the episodes (which highlights the cliffhanger). i want it to look the way it did when originally broadcast with end credit and starting credits between the episodes. Happy Thanksgiving by the way :)
 
Last edited:

Danr

Administrator
Staff member
I'm not understanding then why the joiner doesn't work for you? Can can join multiple episodes into one file and retain the subs from each.
 

jmc

Well-known member
jmc, does your LG play timed text subtitles embedded in the MP4s?
My OLED is a new one, the smallest one - 48 inches and I had hopes...but no.
.mpg CC or .mp4 CC nothing, Extract to .srt file and that works.

TV captions is all about broadcast CC.
.ISO nothing.
DVD folder and the tv will play the separate .VOB files, so usless.

One positive note...I can plug in a USB keyboard and use it in the menu!

TV still have a LONG way to go to be useful for what I need.
 

nlkelly

Member
we seem to be misunderstanding each other. maybe I'm misusing the term "embedded". I'll try again. i took four episodes of dr who and joined them with Videoredo. they had embedded subtitles (not burnt in). media info showed them as a "text" section in the file, one in each episode. After they were joined media info showed the joined file had 4 "text" sections. i tried to play the joined file on VLC. VLC showed 4 subtitles available (just as if you had a choice between English and French subtitles for instance). if i chose the first one it would display subtitles only during the first section fo the joined video. when i chose the second one, it also would only display subtitles (ones for a different section) during the first section of the joined video, and the same with subtitle 3 and 4. Are you saying the Videoredo should have joined all four subtitle files into one file on the joined mp4 and that subtitles would have them been displayed throughout the entire mp4's playback ? That's what i expected to happen, but it didn't work for me.

Thanks
 

jmc

Well-known member
I'm not understanding then why the joiner doesn't work for you? Can can join multiple episodes into one file and retain the subs from each.
I Just joined 3 (5minute) .mpg CC files with the joiner and all the CCs are there and work.
So wonder what kind of subs the OP is dealing with?

nlkelly
..What does VRD Tools>"Show video program info" show under "Captioning" ?

Medianfo has... for CC.
----------------------------------------------
Text
ID : 1-CC1
Format : EIA-608
-----------------------------------------------

OP just posted and sounds like his "text" subs are not "Closed Caption" EIA608 per VRD.
Think that CC is NTSC, maybe America only?
 
Last edited:

Danr

Administrator
Staff member
Frankly, I'm surprised that any text subtitles played after joining as that's a feature we are working on and hasn't been released. But yes, the ultimate goal is to let you join multiple files with multiple text subtitles and have all the captions retained. How about uploading a couple of small source files to us so we can play with it. I'd like to see the ones where VLC is showing 4 subtitles.
 

Danr

Administrator
Staff member
I Just joined 3 (5minute) .mpg CC files with the joiner and all the CCs are there and work.
So wonder what kind of subs the OP is dealing with?
Generally mpg CC are stored either as user data in the video stream or as teletext streams for DVB broadcast. VRD will handle these without issue. MP4 files usually use timed text captions which is a feature we are working on.
 

nlkelly

Member
Ok - so we are back to where we started :). any body know of a utility yada yada yada. I'll just manually edit them it's only about 400 files :(. Subtitle edit will work (for those of you how come after and need to add two episodes together like part 1 and part 2 of something and want subtitles to work) manually to do this. First you load the video into subtitle edit and then double click on the last subtitle displayed in the subtitle list. The video is also displayed in the working windows and shows the point in the video where the last subtitle is displayed. it also shows the end of the file. Drag the video slider to the end of the video (stops at about 1 second to the end) and then use the "create subtitle here" button to add a subtitle at this point with a duration of 1 second . type the text "bye" or what ever. Then hit the "save" button and save the subtitle file (whatever format you want- i have been using SRT files). Do this for each separate video except the last one in the series you want to join. just "save" the subtitle for that one. Now go into the joiner function in the toolbox menu and manually add each subtitle (SRT) file, in the sequence you want them joined, clik on the button to offset each start by the last position defined in the previous subtitle ( add a fixed additional delay - more on that later) and then join them. You now have one subtitle file (SRT in my case) with each section properly offset. use videoredo to join the video files. Now use a utility (to be determined - probably ffmpeg ) to physically delete / remove the embedded subtitles in the joined file. Then use a utility (probably ffmpeg or maybe Subtitle Edit - not that far along yet) to embedded the joined SRT into the joined MP4 or make sure the joined SRT filename is the same as the MP4 name (if you want to stay with external subtitle files) and you are good to go.

as to the additional delay i mentioned above. as i type this, i haven't determined if Subtitle Edit uses the last entries start time (from the previous SRT file) as an offset or the time at which the last subtitle disappears from the screen (both times are in the subtitle file (SRT), to offset the next subtitle file. if it uses the start time of the last subtitle "bye" then add an additional delay of 1000mS (1 second) if it uses the end time (which due to your editing should be the actual end of the mp4 file) you don't need any additional delay. Will be testing this all out over the holiday weekend.

Danr; if you get the subtitle joiner working in the next weeek or so :) , please shoot me an email . Thanks for listening.
 

Danr

Administrator
Staff member
Danr; if you get the subtitle joiner working in the next weeek or so :) , please shoot me an email . Thanks for listening.
OK, will do. I still want to know what embedded subs VRD is currently saving in your MP4 files.
 

Danr

Administrator
Staff member
If the subtitles are in edited MP4 file then we can start with MediaInfo.
 

nlkelly

Member
Ok - so i redid everything again and i must have mistaken the combined mp4 file created with videoredo with the other combined file i tried to create using MP4Joiner (from mp4tools). But to back up, the original files report the embedded text section as

Text
ID : 4
Format : Timed Text
Muxing mode : sbtl
Codec ID : tx3g
Duration : 23 min 37 s
Bit rate mode : Variable
Bit rate : 78 b/s
Stream size : 13.5 KiB (0%)
Title : English [CC]
Language : English
Default : Yes
Forced : No
Alternate group : 3


after the mp4s are combined with videoredo, mediainfo reports

Menu #1
ID : 3
Codec ID : txet
Duration : 1 h 35 min
Language : English
Bit rate mode : CBR
Menu For : 1,2
Bit rate mode : Constant

Menu #2
00:00:00.000 : Chapter 1
00:24:41.200 : Chapter 2
00:49:32.640 : Chapter 3
01:13:02.200 : Chapter 4

when i try to open the file in VLC and play the subtitle, i get "

Codec not supported:

VLC could not decode the format "txet" (No description for this codec)

"

if i join the files with MP4Joiner (takes longer than VRD to join them), mediainfo reports

Text #1
ID : 4
Format : Timed Text
Muxing mode : sbtl
Codec ID : tx3g
Duration : 23 min 37 s
Bit rate mode : Variable
Bit rate : 78 b/s
Stream size : 13.5 KiB (0%)
Title : English [CC]
Language : English
Default : Yes
Forced : No
Alternate group : 3
Tagged date : UTC 2021-11-24 20:05:49

Text #2
ID : 2
Format : Timed Text
Muxing mode : sbtl
Codec ID : tx3g
Duration : 23 min 59 s
Bit rate mode : Variable
Bit rate : 86 b/s
Stream size : 15.2 KiB (0%)
Title : English [CC]
Language : English
Default : Yes
Forced : No
Alternate group : 3
Tagged date : UTC 2021-11-24 20:05:49

Text #3
ID : 5
Format : Timed Text
Muxing mode : sbtl
Codec ID : tx3g
Duration : 22 min 35 s
Bit rate mode : Variable
Bit rate : 93 b/s
Stream size : 15.3 KiB (0%)
Title : English [CC]
Language : English
Default : Yes
Forced : No
Alternate group : 3
Tagged date : UTC 2021-11-24 20:05:49

Text #4
ID : 6
Format : Timed Text
Muxing mode : sbtl
Codec ID : tx3g
Duration : 21 min 17 s
Bit rate mode : Variable
Bit rate : 79 b/s
Stream size : 12.3 KiB (0%)
Title : English [CC]
Language : English
Default : Yes
Forced : No
Alternate group : 3
Tagged date : UTC 2021-11-24 20:05:49


Runing with vlc shows you now have 4 subtitle choices and all for work and start at the start of the combined mp4 but only for 1 episode length.

Sorry about the confusion in the details but the main issue is still the same - looking for an easy way to do this. hope the details help :)

p.s. i'm using VideoRedo Pro 6.92.13.828
 

nlkelly

Member
wow - now that I'm really looking at and playing the joined file from Videoredo , i noticed that the audio from the second third and forth file sections is slightly out of sync. I used Wondershare Uniconveter to join the files and the audio stays in sync. i did strip the subtitle file that won't play from the videoredo combined file and that may have caused an issue. will test recombining source files again and see if audio is out of sync after just the combine. never thought this would be so complicated :)
 

nlkelly

Member
ok thats fun. i stripped the "bad" subtitles from the videoredo joined file with uniconverter. the original files were constant frame rate, the combined file is constant frame rate but after uniconverter touches it, it's varaible frame rate. man what a pain. the file that i joined with uniconverter is also varriable frame rate but the audio stays in sync. The newly VRD joined file is fine and the audio is in sync throughout. i may just give up on the subtitles all together at this rate.
 
Top Bottom