nate.deepcreek.org.au / Programming / TSNowAndNext


TSNowAndNext is a command line tool that creates a ProjectX cut file from the now and next information contained within the transport stream.

While experimenting with Comskip I discovered that the large pre and post padding i use with my recordings was causing a lot of unnecessary processing. I originally had the idea that using the now and next information should be added to Comskip, and to help out with that I set out to write some code to see how well it could be implemented. This is the result.

TSNowAndNext is free software you can redistribute it and/or modify it however you like so long as you acknowledge I take no responsibility for any problems it has.



Command line usage is very basic at the moment. If you just specify the input transport stream file the output file will be the same as the input file with .Xcl appended to the end.
> TSNowAndNext.exe [-percentage:nn] <filename.ts>
-percentage:<nn> : Use a percentage value from 0 to 99 (default: 35)


This batch file runs TSNowAndNext.exe and then loads the generated .Xcl file in ProjectX.
  • You will need to edit NowAndNext.bat to set the following variables
    • PROJECTX - The location of your ProjectX .jar file
    • PROJECTXINIFILE - The location of your ProjectX .ini file
    • PROJECTXOUTPATH - The output location for ProjectX to use
> NowAndNext.bat <filename.ts>
By default the -gui option is supplied when the batch file starts ProjectX. I put that there so that I could review the cut points before demuxing, but if you want the demux to start automatically you can remove the -gui option.
TSNowAndNext Zip File (68kb) Source Code (33kb) History
TSNowAndNext Zip File (66kb) Source Code (19kb) History
TSNowAndNext Zip File (65kb) Source Code (17kb) History

Latest Source Code


  • Fixed problem parsing EIT event when the events section is longer than 255 bytes.
  • Added a message when printing events to warn about long gaps without Now EIT packets.
  • Added -percentage command line option for specifying where in the file the show is.
More ...