VideoHelp Forum
+ Reply to Thread
Results 1 to 12 of 12
Thread
  1. 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
    Last edited by flexmcmurphy; 28th Sep 2024 at 07:24. Reason: Updating comment
    Quote Quote  
  2. Member
    Join Date
    Mar 2008
    Location
    United States
    Search Comp PM
    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
    Quote Quote  
  3. 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
    Quote Quote  
  4. Member
    Join Date
    Mar 2008
    Location
    United States
    Search Comp PM
    I'm not familiar with TSdoctor. MKtoolnix does not re-encode, just re-wraps the streams to an mkv
    Quote Quote  
  5. Captures & Restoration lollo's Avatar
    Join Date
    Jul 2018
    Location
    Italy
    Search Comp PM
    Originally Posted by davexnet View Post
    I'm not familiar with TSdoctor. MKtoolnix does not re-encode, just re-wraps the streams to an mkv
    Can you explain why a remux from a transport stream to mkv should fix a potential asynch in subtitle stream? A transport stream is the "native" container of the dvb-s/dvb-t flows, including PTS (Presentation Time Stamps) and so on
    Quote Quote  
  6. Member
    Join Date
    Mar 2008
    Location
    United States
    Search Comp PM
    Originally Posted by lollo View Post
    Originally Posted by davexnet View Post
    I'm not familiar with TSdoctor. MKtoolnix does not re-encode, just re-wraps the streams to an mkv
    Can you explain why a remux from a transport stream to mkv should fix a potential asynch in subtitle stream? A transport stream is the "native" container of the dvb-s/dvb-t flows, including PTS (Presentation Time Stamps) and so on
    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
    Quote Quote  
  7. @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
    But it replaces the existing narrator and (out of sync) subtitle streams. How do I keep those and just add another subtitle stream?

    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
    Quote Quote  
  8. Member
    Join Date
    Mar 2008
    Location
    United States
    Search Comp PM
    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 ?
    Quote Quote  
  9. Member
    Join Date
    Mar 2021
    Location
    Israel
    Search Comp PM
    Originally Posted by flexmcmurphy View Post
    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
    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.
    Quote Quote  
  10. @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
    A few things are bothering me still. As explained on this ffmpeg wiki there are lots of ways to add subtitles to a video. In my case I want to keep the .ts file. Since I can get the .srt file out of .ts file usign TSDoctor I was hoping I could just add that .srt file back in to the .ts file after fixing the timings.

    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"
    But I think this is simply not possible with a .ts file. I think you have no choice but to convert it to VobSub first which is another step and the results do not look as good to me as adding a .srt to an 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
    Quote Quote  
  11. 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
    Quote Quote  
  12. Member
    Join Date
    Mar 2008
    Location
    United States
    Search Comp PM
    Interesting, thanks for the update
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!