Hello,
I have a lot of DVB-S recordings made from satellite on an old Xoro 9000 box. The recordings are composed of several 1GB .ts files and I am using TSDoctor to combine them in to one .ts file.
I have come across one example where in the re-combined .ts file the audio and video are fine but the subtitles are out of sync. TSDoctor didn't mention or report any errors. What are my options to fix these out of sync subtitles? I don't think I can do anything else in TSDoctor?
Ideally I could avoid re-encoding the .ts file but interested to hear what the options are.
Any help much appreciated.
Flex
Try StreamFab Downloader and download from Netflix, Amazon, Youtube! Or Try DVDFab and copy Blu-rays!
+ Reply to Thread
Results 1 to 12 of 12
Thread
-
Last edited by flexmcmurphy; 28th Sep 2024 at 07:24. Reason: Updating comment
-
Once you combined into .ts files into one piece, it could be helpful to use mkvtoolnix GUI to create an mkv from it.
If it seems good, work with that.
You have to analyze the subs and figure out if they get progressivly worse, or whether it's'
a similar amout off all the way through.
You can use SubtitleEdit and it's synchronize tools to adjust them in a variety of ways -
Thanks. Is it possible to just fix the dvb subtitles stream and re-insert maybe the .srt file back in to the .ts file without having to re-encode?
I used Subtitles Edit to fix the offset of the subtitles. Can I use TSDoctor to add them back to the .ts file and not re-encode?
Flex -
-
I must admit, I don't know the technical details, but I've seen many times in the past it fixes problems
related to the timestamps and simlar.
Not a big deal to try it.
But as you say regarding the native subtitles - perhaps persisting with one the TS tools makes more sense -
@davexnet
Thanks for the help. Using TSDoctor I extracted the subtitles to a .srt file. I then used "Subtitle Edit" to fix the timing of the subtitles. They were all correct relative to one another just they were starting too early so out of sync with the audio.
I was then able to use MKVtoolnix to re-encode the .ts file with the corrected subtitles as a .mkv.
But I am unable to leave it at that! I want to add these corrected subtitles as a stream back in to my .ts file.
I used "Subtitle Edit" to export the subtitles with corrected timings out to VobSub format.
I now want to ADD this as another subtitle stream to my .ts file without re-encoding it. This can be done with ffmpeg and so far this is what I have got but need help understanding the command and fixing it:
Code:ffmpeg -i "V808.ts" -i "V808.[2357](41001ms).idx" -map 0:0 -map 0:1 -map 1:0 -c:v copy -c:a copy -c:s dvbsub -metadata:s:s:0 language=eng OUTPUT.ts
Can someone confirm does this approach NOT re-encode the stream? I do to want that to happen if possible.
Any other approaches to doing this are greatly appreciated.
Cheers,
Flex -
hello flexmcmurphy
Does the .ts contain the native subs you want to maintain?
Isn't a case of just adding another -map command to select them ? -
From my experience with TS Doctor, I get perfect subtitles synchronization if I don't tamper with the commercials.
Did you "clean" the individual 1GB TS files from commercials to start with?
If you still have the original TS files, then combine them in TS Doctor and ONLY then get rid of the commercials and extract the subtitles file from the cleaned file.
Before doing this, try to keep the commercials and extract the subtitles and see if they are still out of sync. -
@Subtitles
Nope, I have decided not to remove commercials after all. I'm not happy with the results that TSDoctor gives. You have to cut too far in to the movie to be sure of not seeing an artifact from the commercial that is just starting or ending even setting a Cut point on an I-Frame wasn't working for me. But if you do this you end up with a kind of skip in the viewing experience around the point you cut out commercials. So I'll just use the remote to skip through them!
@davexnet
After many hours of internet searching I have this command. It ADDs one more subtitle stream to my .ts file preserving everything else that is already in the .ts file. It is a lot of messing around but no need to re-encode the movie.
Code:ffmpeg -probesize 60M -analyzeduration 60M ^ -i "input.ts" ^ -i "subtitles.idx" ^ -map 0 -map 1 -vcodec copy -acodec copy -c:s:0 copy -c:s:1 dvbsub ^ -metadata:s:s:0 language=eng -metadata:s:s:0 handler_name=Bad -metadata:s:s:0 title=Bad ^ -metadata:s:s:1 language=eng -metadata:s:s:1 handler_name=Good -metadata:s:s:1 title=Good ^ output.ts
This is how it can be done using a .mp4 file...
Code:ffmpeg -probesize 60M -analyzeduration 60M ^ -i "input.mp4" ^ -i "subtitles.srt" ^ -map 0 -map 1 -vcodec copy -acodec copy -c:s:0 mov_text ^ -metadata:s:s:0 language=eng -metadata:s:s:0 handler_name=Name1 -metadata:s:s:0 title=Name1 ^ "output.mp4"
Does anyone know if the dvbsub codec is the only way to add a subtitle stream to a .ts file? I tried mov_text, srt and subrip but they don't seem to work adding a .srt to a .ts file.
Cheers,
Flex -
After some more research it seems to me that ts containers can only accept subtitles in image/bitmap based format and ffmpeg cannot convert subtitles from text to image and vica versa.
If anyone has this problem and wanted to keep the recording in a .ts file you have to convert the .srt text-based subtitle file to VobSub format which gives an .idx file you would use as in the first code sample in my last comment. SubtitleEdit can do that conversion but there are other tools.
Flex
Similar Threads
-
How do I fix out of sync video and audio in my stream copied video?
By Guernsey in forum Newbie / General discussionsReplies: 3Last Post: 13th Jun 2024, 15:11 -
Fix subtitles in batch
By UserName351 in forum SubtitleReplies: 3Last Post: 21st May 2024, 15:26 -
Fix MPEG2 Audio Sync Issues
By ENunn in forum Video ConversionReplies: 23Last Post: 29th Dec 2023, 22:01 -
AVIDemux Help: How do you fix a stream copied video that goes out of sync?
By Guernsey in forum EditingReplies: 6Last Post: 14th Oct 2021, 13:54 -
How can I fix audio to video sync issues?
By sarit1 in forum Newbie / General discussionsReplies: 1Last Post: 24th May 2021, 11:33