Baselworld is only a few weeks away. Getting the latest news is easy, Click Here for info on how to join the Watchuseek.com newsletter list. Follow our team for updates featuring event coverage, new product unveilings, watch industry news & more!

I've re-united the readme and attempted to update the change log. This version includes the fixes in 1.10b and adds additional fixes by Cris Moore.

I can continue to host HDTVtoMPEG2 here for the time being, so if there isn't a more appropriate person or place to host it, please send your bug fixes to me.

Some basic info about HDTVtoMPEG2:

HDTVtoMPEG2 is primarily an MPEG-2 transport stream editor. Editing is performed as a simple transport packet level cut & splice, which means the output has a transport stream discontinuity at the splice points. Different decoders handle discontinuities with different amounts of grace. You may experience audio and/or video break-ups at the discontinuities. If you need editing with no discontinuities in the output, check out VideoReDo.

HDTVtoMPEG2 can break the output into multiple file segments. It can strip unwanted programs and PIDs from the input, and it regenerates tables. It can optionally preserve the transport stream bit rate (to keep a constant bit rate stream as such).

HDTVtoMPEG2 can scan for commercials by detecting black pillarbox bars.

I think the transport stream to program stream conversion was broken with newer versions of HDTVtoMPEG2. There are probably better programs to use for that. (X-Muxer or VideoReDo?)

What's it for?
Despite its name, HDTVtoMPEG2 main purpose is to edit commercials out of HDTV transport streams and write out another transport stream. It still has the capbability to convert to program streams (mpeg2) but this area has received little to no work since v1.10b. If you need this capability you should use another tool like VideoRedo.

HDTVtoMPEG2 Feature\\Bug fix history
Feature\\Bug fix history (v1.11.nn)
.94 - Fixed improper Output file name and crash when deleting from Input box introduced with tooltip change.
.93 - Input list box now only shows the file name. Tooltip shows the path.
.92 - Recognize .rec and .mpg as valid transport stream extensions
.92 - Fixed a bug that could cause the dreaded "Could not find a Channel" bug on valid TS files.
.91 - Clips button state is now saved in the ini file
.91 - Added grey color bar support during commercial scan.
.90 - Relaxed the color requirement for pure black on 4x3 color bars.
.90 - Fixed "The parameter is incorrect" dialog message when you scroll the mouse around in an empty Process list box.
.90 - Fixed code so it could handle TS streams with section encapsulated data, i.e. pointer_field != 0.
.89 - Fixed crash caused when no channel is found
.89 - Fixed crash during loading of some TS file when calculating avg TS rate
.89 - Updated to Visual Studio 2005
.88 - Fixed Max Size dialog popup bug when entering a size larger than 99999
.88 - Fixed invalid file name problem related to very large filenames when using Add
.88 - Fixed crash when using Preserve Bit Rate on some transport streams
.88 - Fixed bug that incorrectly extracted the PCR during PMT validation
.87 - Removed the transport stream extension case sensitivity.
.87 - Option to change the vertical_size_value in the sequence_header from 1088 to 1080
.87 - Added a Configuration menu
.87 - New Cut region marker. Forces a new file to be created at a specified point
.87 - Ability to re-order the input file list by dragging items with mouse
.86 - Region markers are now saved when closing H2M.
.86 - Fixed bug where shortcut keys would not work immediately after Deleting a file from the process list box
.86 - MaxSize, VideoPID, and AudioPID boxes now handled properly when shortcut keys are being used
.85 - Added Alt+D\\d to delete region marker
.85 - Default Channel is now auto checked
.85 - Added an RUSure dialog when the Clear All region markers button is clicked
.85 - Fixed bug where a .TRI file was not created if a .TRI file was selected as the input file
.85 - Region info is no longer saved when Clear All is selected, only when Process\\Include\\Exclude\\Delete\\Move
.84 - Fixed missing TS info (Resolution, FPS, etc.) for some streams
.83 - Fixed possible crash when editing low bitrate SD channels
.83 - Added message box indicating SD channels are not supported with Commercial Scan
.82 - Attempt to include black frames before and after program. Disable with IncludeBlackFrames=0
.81 - UI indicates Avg. TS Rate now instead of bogus Video rate
.81 - Weighted average TS Rate is now calculated instead of using a fixed 19.2Mbps rate
.81 - Option to select 10 second Commercial Scan rate instead of the default 60 seconds
.80 - Re-work of Commercial Scan code to fix troublesome ABC\\FOX stations
.79 - Small tweak to code that determines frame type
.78 - Fix bug that could cause the second file to be ignored during scan if Exclude section had been specified
.77 - Fix bug that would sometimes not let you type letters in the Output FileName and Ext boxes
.76 - Fix to scan code to handle pre-defined Include\\Exclude sections correctly during scanning
.75 - F5 refreshes the input file data if you are editing a TS file that is currently being recorded.
.74 - Files are now opened with FILE_SHARE_READ and FILE_SHARE_WRITE
.73 - Minor changes
.72 - Ability to disable .TRI file creation using the CreateTRIFiles=0 flag in the ini file
.72 - .TRI files not created until an Include, Exclude, button is pressed
.71 - Fixed major bug when Scan filters were being used
.70 - New Commercial Scan code (HDTV support only)
.70 - Jockeyed around the manual editing buttons
.56 - Changed default Channel to now be the first stream with a horizontal size >= 1280.
.55 - Default output file type is now transport stream instead of mpeg2. Last used setting is still saved in the .ini file.
.55 - File type list order is now Transport Stream, HiDTV, Mpeg2.
.55 - NOTE: You will need to manually update the Ext edit box
.54 - Default Channel is now the one with the lowest video PID number
.53 - Fixed possible crash caused by code being too slack when parsing for video start_codes.
.52 - Fixed bug where channel would not be displayed if the audio was of stream_type 0x06(PES private data).
.51 - Commented code out that ignored PMT's with CA_descriptors(build 49). This didn't always indicate that the channel was scrambled.
.50 - Fixed possible crash do to too aggressive of checking for corrupt PMT
.49 - Ignore PSIP packets for Channel info if any of the PMT's contain CA_descriptors
.48 - Fixed bug where audio was not being mapped properly if the PMT was incomplete.
.47 - Fixed possible crash when editing QAM files.
.46 - Fixed. If the KeepPSIP and KeepNULL keys were missing from the ini file(you were using an older Beta), H2M would keep the PSIP and NULL packets until you had de-selected them.
.45 - Fixed bug if "PreserveBitRate" is missing from the ini file H2M will ALWAYS include NULL packets
.45 - Fixed. When using "PreserveBitRate" a small number of packets would get stripped instead of being converted to NULL packets
.44 - Fixed PID swap bug when 2 PMT's referenced the same video PID
.43 - Fixed bug introduced in build 39. Files would not load if duplicate file was encountered
.42 - Fixed PID drop down list box for W2K displaying only 1 entry
.41 - "PreserveBitRate" option flag available in ini file
.40 - Increased scan buffer size a bit
.39 - 0 byte transport streams are now discarded with warning.
.38 - commented out some new code that could cause a crash if the MGT had a large number of tables
.38 - PID swap bug fixed
.37 - Fix to bug introduced by code to detect corrupted PAT and PMT
.36 - New Clip feature
.35 - .TRI files not created now until the "Include" or "Exclude" button is pressed
.34 - Contrast and Brightness settings saved
.33 - detect and strip corrupted PAT and PMT
.32 - write multiple PAT and PMT's at the beginning of the file to make sure H2M will have Channel info to display
.31 - PID 0x1fef recognized as a NULL packet (old HBO recordings?)
.31 - Fixed small memory leak
.30 - ??

1.11 Beta
NEW
- PID stripping support
- MPEG-2 audio now supported when converting TS to MPEG-2
- Option to create sequential "clip" files
- Ability to preserve the stream bit rate using the "PreserveBitRate" flag in the ini file.

FIXED
- Fixed an old memory leak in scan_channel_info() function
- Fixed problem with some transport streams not displaying a preview when "Show Progress Image" is checked
- Fixed missing preview display on Progress dialog for MPEG-2 conversion on some transport streams
- Fixed missing video\\audio on MPEG-2 conversion for some transport streams
- Fixed input path not being applied after selecting files from Explorer(Note: if a .tri file is selected, the path is set to the path to the transport streams NOT to where the .tri file was selected)

FIXED:
- >>| Seek to End would not move the bar to the end of the slider
- Crash in Progress dialog when showing progress image
- |<< Seek to beginning would not display first i-frame
- Channel resolutions were sometimes swapped

1.10.3
FIXED:
- Resolution\\FPS\\Aspect Ratio\\Bit Rate not displaying for some transport streams
- No preview picture for some 720p streams
- No preview picture for WB HD transport streams recored with TSReader
- Channel display now favors PSIP data if available and now displays digital and analog channels. If no PSIP data is available, you will get the familiar NONAME channel

History of HDTVtoMPEG2
Year 2002 - Ben Cooley
v1.00 to v1.07
The original developer of HDTVtoMPEG2. HDTVtoMPEG2's original purpose was to extract program streams from transport streams and create a mpeg compatible file that was playable by media players and compatible with video converter tools like VirtualDub. Hence the name of the tool, HDTVtoMPEG2. This original version of HDTVtoMPEG2 did not have any transport stream editing capabilities, it was strickly a conversion tool.

Year 2002 - Grant Reeve
v1.07 to v1.10b
The second developer to work on HDTVtoMPEG2. Grant Reeve's effort into H2M went into adding HDTV editing capabilties. His version allowed you to view and edit the stream on I-Frame bounderies and write out a new transport stream minus the "cut out" parts.

Year 2003 - Alan Halverson, Cris Moore
v1.10.3 to v1.10.5
These versions continued with the focus on improving the HDTV editing capabilties and robustness of the tool. New features like "hot" keys, the ability to use the mouse to step from one I-Frame to the next, contrast and brightness, and the ability to save edit points were added in these versions.

Year 2004 - 2007 - Cris Moore
v1.10.6 to v1.11.94
These versions continued with the focus on improving the HDTV editing capabilites and robustness of the tool. New features like PID stripping, Clips output, and new Commercial Scan were added in these versions.

litz,
- Problems with TS files
I'm downloading your sample files and will look at then when I get a chance. Please be patient though, debugging display preview problems takes a lot of time and effort.

- Timings are wrong
I believe H2 uses the bit rate specified in the TS file for the Video Rate and for calculating the times. Tools that remove items like NULL packets and PID's change the TS file from a CBR to a VBR file and the times are no longer accurate. I have the same problem when I record with TSReader when I have it remove NULL packets and PID's. I believe STB are removing items like NULL and possibly PID's(sub channels) too in order to save HD space. To fix this problem, I believe H2 would probably have to be changed to calculate the average bit rate of the TS file itself in order to be more accurate on the times.

Cliff,
This is probably a side effect of a "fix". Is the file your using 1 big huge file?

That is representative of the three different types of streams you can capture off a Motorola cable box (via the Mac firewire method) and they don't work very well with H2, so there's something fundamentally different about them versus a traditional MyHD .ts capture.

MyHD has fits playing them too, but it eventually gets around to it.

The goal is to figure out a way to transcribe these to something more "normal" so not only tools but playback works better.

I wasn't able to reproduce this with the files you supplied. What other resolutions are displayed?

"All of the above always have incorrect time length readings."

Covered in an above post.

"And all of the above WILL crash hdtvtompeg2 if you try to scroll within the file. Editing also is choppy (it's like the timeslices are way too far apart)."

Wasn't able to make H2 crash with the files you supplied by scrolling withing the file. Perhaps the sample files are too small. I wasn't able to download crash.m2t. The website is no longer available.

Choppy editing - I counted the i-frames in 3 of the samples you supplied and H2 displays all of the i-frames. Granted some of the preview pics don't look so good(528x480i) I think because of the scaling, but they are displayed. Again, perhaps the sample files are too small and I need a bigger file to see the problem.

choppiness -
I just wanted to make sure you understand that H2 only shows the i-frame pictures in a stream. The p-frames and b-frames between each i-frame are not decoded since H2 only allows editing on i-frame boundaries. The number of i-frames available in a stream will determine how smooth the "steps" are between each click. The number of i-frames available in the stream is up to then encoder I would guess.

I wasn't able to get crash.mt2 to crash while clicking or dragging the slider back and forth. I don't know what is causing the crashes on your systems. I've tried downloading the exe on balazer's web site and tried it on a Win2K system. Still no crash.

As far as version, on the left side of the title bar, if you click on the little icon, and then select About HDTVtoMPEG2, the version should be 1.10.3.

choppiness -
Here are the number of i-frames that are in some of the file samples you sent me:
1920X1080i - 63 i-frames
720X480i - 30 i-frames
528X480i - 53 i-frames
I verified the number of i-frames using Mpeg Stream Eye v1.02. When I load 1920X1080i into H2, I can click the right arrow 63 times and walk through all of the i-frames. Each one is different except for the first one and there is never any blank preview. I don't know whats going on except that you may not be running 1.10.3 but an older 1.10b version?

One of the very first versions of 1.10.3 that I sent to someone did include separate dll's. Since then, I been compiling using MFC as a static library so I don't have to include the dll's separately.

Glad you got the problem figured out. I was running out of ideas.

Quote:

The ability to save/load the edit points

Funny you should mention that. I've just about got that finished.

The way it works is that when you select "Convert" it will automatically create a "tsri.tri" file in the same directory as the TS file. tsri stands for "TS Region Information". If H2 crashes, restart H2, select Add, and then under "Files of type" select the new option "TSRI Files", then select the tsri.tri file. This will automatically load all of the TS files that were loaded before and reset all of the edit points to the way there were.

Quote:

fixing the >>| button would still be nice though ...

Yes I've noticed that too. Will ad it to my list of things to look at.

Also, I noticed with your file sets that none of them will display a preview in the Progress dialog box when you select the "Show Progress Image". Yet another problem to look at.

I haven't done ANY work on the problems with converting to .mpg. I've never used the option so I don't even know what the problems are.( Well, I guess I know one now ) When I've gotten some more of the TS editing problems solved I'll take a look at the mpg conversion problems. Right now thats kinda low priority for me.

Quote:

it would be nice to be able to save the file without starting the conversion

Being able to save at any time sounds like a good idea. I'll add yet another button to the dialog.