HDTVtoMPEG2 latest version - Page 40 - AVS Forum
Forum Jump: 
Reply
 
Thread Tools
post #1171 of 2239 Old 01-29-2006, 03:39 PM - Thread Starter
AVS Special Member
 
balazer's Avatar
 
Join Date: Feb 2001
Location: Sunnyvale, CA
Posts: 3,317
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 0 Post(s)
Liked: 10
I should have said that you aren't completely restricted to cutting on I-frame boundaries. You need to start a segment with an I-frame, but you can end a segment on an I-frame or a P-frame.
balazer is offline  
Sponsored Links
Advertisement
 
post #1172 of 2239 Old 01-29-2006, 08:54 PM
AVS Special Member
 
Cris Moore's Avatar
 
Join Date: Oct 1999
Location: Oregon
Posts: 1,157
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 0 Post(s)
Liked: 11
Quote:


I'm having difficulty keeping the damn audio in sync after cuts for stations that don't have the audio synced to PES packets.

It looks like I might have this problem solved. All sample test files of my local stations passed with audio in sync after cuts.

Now I need to look into why some transitions on some stations are not as smooth as I would like.

Cris Moore is online now  
post #1173 of 2239 Old 01-29-2006, 09:21 PM
Advanced Member
 
JohnTheDoe's Avatar
 
Join Date: Dec 2003
Location: San Jose, CA
Posts: 550
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 0 Post(s)
Liked: 10
Quote:
Originally Posted by Cris Moore View Post

It looks like I might have this problem solved. All sample test files of my local stations passed with audio in sync after cuts.

Now I need to look into why some transitions on some stations are not as smooth as I would like.

Hurray !!!!!! Looking forward to the first cut (no pun intended) of the program ;-)
JohnTheDoe is offline  
post #1174 of 2239 Old 01-31-2006, 12:25 PM
AVS Special Member
 
Wizziwig's Avatar
 
Join Date: Jul 2001
Location: SoCal, USA
Posts: 1,232
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 151 Post(s)
Liked: 130
FYI, AC3 doesn't use inter-frame coding. Each frame starts with a sync word (0x0b77) and is fixed size. There is a table in the official spec (see A52 doc at ATSC web site) that tells you the frame size. The frames are also sequential - decoding and presentation order is the same.

I think Cris will have a rough time getting this to work reliably with 100% of the streams out there. I've considered tackling it for MPEG2Repair but it seemed like a can of worms. Balazer covered some of the issues already but there are many more to deal with. Some things to consider:

a) MPEG2 frames are not stored in presentation order. Audio is. See the temporal reference value for display order.
b) MPEG2 frames have field repeat flags that change how long they are displayed and how interlacing is handled. You might introduce combing artifacts if you're not careful.
c) Audio frames are not always inside their own PES packet - often there are 4 or more audio frames per packet.
d) Transport streams often have errors and weird discontinuities (even before H2 editing).
e) Transport streams require a constant bitrate. Any in-place edits will break this. Important for CBR recording hardware like D-VHS.


The only proper way to edit a transport stream is to demux it into audio/video streams and recreate a new transport stream. The only program I know of that does this reliably is VideoRedo. I think trying to patch headers on an existing transport stream in not the right approach and will cause more problems than it solves. Good luck in any case.

-Mark
Wizziwig is offline  
post #1175 of 2239 Old 01-31-2006, 01:07 PM
AVS Addicted Member
 
TPeterson's Avatar
 
Join Date: May 2002
Location: San Carlos, CA
Posts: 11,846
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 3 Post(s)
Liked: 16
Mark (and Jacob)--

Thanks for helping us all to be properly amazed at Cris' feat when he emerges from his coding cave!
TPeterson is offline  
post #1176 of 2239 Old 01-31-2006, 02:06 PM
AVS Addicted Member
 
trbarry's Avatar
 
Join Date: Jan 2000
Location: Gainesville FL USA
Posts: 10,138
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 0 Post(s)
Liked: 10
Quote:
e) Transport streams require a constant bitrate. Any in-place edits will break this. Important for CBR recording hardware like D-VHS.

Just because some hardware (and ATSC) requires a constant bit rate is probably no longer justification to waste the space and pad all streams. Most output from H2 is no longer CBR anyway.

- Tom

Why don't we power our electric cars from greener, cheaper
To view links or images in signatures your post count must be 0 or greater. You currently have 0 posts.
?

Tom Barry - Find my video filters at
To view links or images in signatures your post count must be 0 or greater. You currently have 0 posts.
trbarry is offline  
post #1177 of 2239 Old 01-31-2006, 02:16 PM
AVS Addicted Member
 
TPeterson's Avatar
 
Join Date: May 2002
Location: San Carlos, CA
Posts: 11,846
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 3 Post(s)
Liked: 16
...and there are already free tools that can easily put the padding back in anyway when it's needed for one of those (increasingly arcane) devices.
TPeterson is offline  
post #1178 of 2239 Old 01-31-2006, 03:49 PM
AVS Special Member
 
Cris Moore's Avatar
 
Join Date: Oct 1999
Location: Oregon
Posts: 1,157
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 0 Post(s)
Liked: 11
Quote:
Thanks for helping us all to be properly amazed at Cris' feat when he emerges from his coding cave!

Thanks for the vote of confidence Terry but if I knew as much about transport streams as Mark, Jacob, and Ron do I would probably stop this foolish endeavor.

Cris Moore is online now  
post #1179 of 2239 Old 01-31-2006, 06:08 PM - Thread Starter
AVS Special Member
 
balazer's Avatar
 
Join Date: Feb 2001
Location: Sunnyvale, CA
Posts: 3,317
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 0 Post(s)
Liked: 10
Here is a crazy thought:

We know that players like the MyHD handle HDTVtoMPEG2's splice point discontinuities just fine, while other players don't.

Discontinuities are actually part of the MPEG-2 spec. Any fully compliant player should handle them fine - IF they're marked by setting the discontinuity bit. I imagine that HDTVtoMPEG2 is not setting this bit. I wonder if setting it would fix playback with some of those players that currently don't like HDTVtoMPEG2 streams - not making the splice point perfectly smooth, but at least letting the player play through the splice point without major problems like dropping the audio, audio going out of sync, or worse.

I don't mean to be a downer about Cris's recent efforts. If he can fix some of the problems that some players experience now, that's great. I'm just concerned that in doing so, the resulting streams might be less compliant than they are row, causing problems for players that have no problems now.
balazer is offline  
post #1180 of 2239 Old 01-31-2006, 06:26 PM
AVS Special Member
 
Cris Moore's Avatar
 
Join Date: Oct 1999
Location: Oregon
Posts: 1,157
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 0 Post(s)
Liked: 11
Quote:


I imagine that HDTVtoMPEG2 is not setting this bit. I wonder if setting it would fix playback with some of those players that currently don't like HDTVtoMPEG2 streams - not making the splice point perfectly smooth, but at least letting the player play through the splice point without major problems like dropping the audio, audio going out of sync, or worse.

H2M doesn't set this bit but I'm going to have to try it. Out of sync audio it currently a problem with some stations on my Roku after a slice (at least it doesn't drop the audio now). A quick pause\\pause on the remote to sync and its OK until the next slice. The Roku hates the slices. The MyHD handles the slice no problem.

Cris Moore is online now  
post #1181 of 2239 Old 02-01-2006, 05:09 PM
AVS Special Member
 
Cris Moore's Avatar
 
Join Date: Oct 1999
Location: Oregon
Posts: 1,157
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 0 Post(s)
Liked: 11
Jacob,

I think your suggestion of setting the discontinuity_indicator might have solved the audio sync problem on my Roku (at least for my WB station). Once I set the bit the audio was in sync after the slice.

Much more testing to do

Thanks for the insight.

Cris Moore is online now  
post #1182 of 2239 Old 02-04-2006, 11:43 AM
wm
AVS Special Member
 
wm's Avatar
 
Join Date: Jan 2000
Location: Spaceship Earth, usually on the California deck
Posts: 2,387
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 0 Post(s)
Liked: 10
I'm trying to "reorganize" a group of .ts files. The collection is a single program, and I want to make it into segments at edit points. I added all the files, defined my edit points with "Begin Include", clicked on "Clips", and then "Process". The output format selected is Transport Stream. I get one large file instead of a file for each segment. What am I doing wrong? Running 1.11.83. Do I need to merge into a single file first, then split into clips?

wm_avs6 (at) meier-phelps (dot) com (Note - new address! Please do not use AVS PM)
---
Optimized by William PhelpsÂ
wm is offline  
post #1183 of 2239 Old 02-04-2006, 11:59 AM
AVS Special Member
 
miimura's Avatar
 
Join Date: Apr 2002
Location: Cupertino, CA
Posts: 1,345
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 0 Post(s)
Liked: 10
The "Clips" button is a toggle. When the file size box is grayed you should get the clips. You do not have to merge first, H2 will do it all at once. However, you probably need to put a file number in the name so that it can be incremented. I use MyHD naming, so I use names like "Showname_00.tp" in the file name field. Then each clip gets a new number and the files play automatically in MyHD.

- Mike
miimura is offline  
post #1184 of 2239 Old 02-04-2006, 12:09 PM
AVS Special Member
 
Cris Moore's Avatar
 
Join Date: Oct 1999
Location: Oregon
Posts: 1,157
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 0 Post(s)
Liked: 11
wm,

It sounds like you don't have any "Exclude" points specified. H2Ms editing works by specifying a start (Include) and a stop (Exclude) point. These blocks are the "clips" that will be created. Note that a start and stop point cannot be on the same location, they must be at least 1 I-frame apart.

You can't use H2M to arbitrarily break a TS file into multiple different size files without specifying a "cut".

Cris Moore is online now  
post #1185 of 2239 Old 02-04-2006, 12:17 PM
wm
AVS Special Member
 
wm's Avatar
 
Join Date: Jan 2000
Location: Spaceship Earth, usually on the California deck
Posts: 2,387
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 0 Post(s)
Liked: 10
Ah, I see. So I need to add Exclude points as well, I can do that. That explains it. I'm hesitant to ask why this is necessary, given all the work you've put in to this...

Thanks, Cris!

wm_avs6 (at) meier-phelps (dot) com (Note - new address! Please do not use AVS PM)
---
Optimized by William PhelpsÂ
wm is offline  
post #1186 of 2239 Old 02-04-2006, 12:41 PM
AVS Special Member
 
Cris Moore's Avatar
 
Join Date: Oct 1999
Location: Oregon
Posts: 1,157
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 0 Post(s)
Liked: 11
Quote:


Ah, I see. So I need to add Exclude points as well, I can do that. That explains it.

Keep in mind that the info between an "Exclude" and "Include" point will be discarded. It has been "cut" out.
Quote:


I'm hesitant to ask why this is necessary, given all the work you've put in to this...

In don't undestand what your asking.

Cris Moore is online now  
post #1187 of 2239 Old 02-04-2006, 02:53 PM
wm
AVS Special Member
 
wm's Avatar
 
Join Date: Jan 2000
Location: Spaceship Earth, usually on the California deck
Posts: 2,387
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 0 Post(s)
Liked: 10
Quote:
Originally Posted by Cris Moore View Post

In don't undestand what your asking.

Split or Cut points. If there are only "Include" points, why couldn't they be split points?

wm_avs6 (at) meier-phelps (dot) com (Note - new address! Please do not use AVS PM)
---
Optimized by William PhelpsÂ
wm is offline  
post #1188 of 2239 Old 02-04-2006, 03:19 PM
AVS Special Member
 
Cris Moore's Avatar
 
Join Date: Oct 1999
Location: Oregon
Posts: 1,157
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 0 Post(s)
Liked: 11
Quote:


If there are only "Include" points, why couldn't they be split points?

I suppose they could be treated as splice points (if you didn't want to cut anything out) but that is not the way things were implemented. The purpose of H2M is to cut transport streams; hence the start here, stop here methodology.

Cris Moore is online now  
post #1189 of 2239 Old 02-04-2006, 03:23 PM
wm
AVS Special Member
 
wm's Avatar
 
Join Date: Jan 2000
Location: Spaceship Earth, usually on the California deck
Posts: 2,387
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 0 Post(s)
Liked: 10
Well, like I said, I hesitated to ask... It's not like it has to be everything to everyone!

wm_avs6 (at) meier-phelps (dot) com (Note - new address! Please do not use AVS PM)
---
Optimized by William PhelpsÂ
wm is offline  
post #1190 of 2239 Old 02-05-2006, 08:20 AM
Advanced Member
 
WinstonSmith's Avatar
 
Join Date: Jun 2005
Location: St. Louis Metro East
Posts: 951
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 0 Post(s)
Liked: 10
This is probably a stupid question and I'm sure that it is, thus I apologize for even asking. However, is there a noticable quality loss between the original TS file that I recorded using myHD and the mpeg2 files that I careted using this program after cutting out the commercials?

I guess, to boil it down even more simply, is the TS file(s) of better quality than after its changed to an mpeg2?

Thanks!

My Specs:

Sony KDF55WF655 HDTV | Pioneer VSX1015TX Receiver | JBL SCS180SC 6.1 Surround Speakers | DirecTV HR20 | HTPC | PlayStation3
WinstonSmith is offline  
post #1191 of 2239 Old 02-05-2006, 11:15 AM
AVS Special Member
 
Cris Moore's Avatar
 
Join Date: Oct 1999
Location: Oregon
Posts: 1,157
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 0 Post(s)
Liked: 11
Unless you have a real need to convert the transport stream to a program stream (mpeg2) it is best to keep the file as a transport stream.

There is no quality loss in converting a transport stream to a program stream.

Cris Moore is online now  
post #1192 of 2239 Old 02-05-2006, 12:18 PM
AVS Special Member
 
Stereodude's Avatar
 
Join Date: Jan 2002
Location: Detroit Metro Area
Posts: 9,922
Mentioned: 2 Post(s)
Tagged: 0 Thread(s)
Quoted: 506 Post(s)
Liked: 540
Quote:
Originally Posted by Cris Moore View Post

I suppose they could be treated as splice points (if you didn't want to cut anything out) but that is not the way things were implemented. The purpose of H2M is to cut transport streams; hence the start here, stop here methodology.

I think he wants to be able to drop split points, that H2M would follow instead of using the filesize to split.
Stereodude is online now  
post #1193 of 2239 Old 02-05-2006, 12:26 PM
AVS Special Member
 
Cris Moore's Avatar
 
Join Date: Oct 1999
Location: Oregon
Posts: 1,157
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 0 Post(s)
Liked: 11
Quote:
I think he wants to be able to drop split points, that H2M would follow instead of using the filesize to split.

Right. The wants to use "Include" points as split markers to break the transport stream into multiple files of varied size.

Cris Moore is online now  
post #1194 of 2239 Old 02-06-2006, 01:16 AM
 
HDTVFanAtic's Avatar
 
Join Date: Mar 2004
Location: 3rd Rock from the Sun
Posts: 8,143
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 0 Post(s)
Liked: 10
ok...I am scratching my head as I have done this before with H2 with a problem - but something appears to have changed in one of the recent builds.

I usually grab programs with MyHD in 1Gig files.

I wanted to take the first file and trim it to the correct start place - same with the last file - then know that I had nothing but the program from start to finish.

So I use H2 to cut the file file correctly.

However, now H2 or Mpeg2repair cannot see the second file on - until the last file which I also trimmed.

What's up here? This used to be a no brainer with H2?
HDTVFanAtic is offline  
post #1195 of 2239 Old 02-06-2006, 07:12 AM
AVS Addicted Member
 
TPeterson's Avatar
 
Join Date: May 2002
Location: San Carlos, CA
Posts: 11,846
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 3 Post(s)
Liked: 16
HDTVFanAtic--

With the usual settings, H2M modifies the PIDs in the edited file(s). So if you run only the first one through, the subsequent files do not appear to be in the same sequence anymore. If you run all files through H2M at the same time you'll be sure of preserving the sequence.
TPeterson is offline  
post #1196 of 2239 Old 02-06-2006, 07:17 AM
 
HDTVFanAtic's Avatar
 
Join Date: Mar 2004
Location: 3rd Rock from the Sun
Posts: 8,143
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 0 Post(s)
Liked: 10
I had started the Superbowl stuff at 11am or so not looking at Program Guide - and the NBA game ended at 2:30pm ish. So, I just deleted all the files prior to the PreGame - and then edited the first remaining file to get rid of the NBA Game ending and did the same thing for Grey's Anatomy at the end.

Wanted to see the total size of the complete package and play around with how I stored them.

Of course, then everything but the first and last file became usable and I had already deleted the original files.

I finally fixed it by running the body through H2 - but I am sure that I had done this in the past and did not run into this situation.
HDTVFanAtic is offline  
post #1197 of 2239 Old 02-06-2006, 07:22 AM
AVS Addicted Member
 
TPeterson's Avatar
 
Join Date: May 2002
Location: San Carlos, CA
Posts: 11,846
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 3 Post(s)
Liked: 16
Many versions ago, H2M did not change PIDs, so your memory is probably right.
TPeterson is offline  
post #1198 of 2239 Old 02-06-2006, 07:24 AM
 
HDTVFanAtic's Avatar
 
Join Date: Mar 2004
Location: 3rd Rock from the Sun
Posts: 8,143
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 0 Post(s)
Liked: 10
Quote:
Originally Posted by TPeterson View Post

Many versions ago, H2M did not change PIDs, so your memory is probably right.

That makes sense - though I was thinking it was more recent.

Of course, after the late night episode, this morning I was wondering why I wanted to keep any of it, lol.

Edit:

I bet it was the local TV stations were misusing Pid 11 and 14 back then so it matched up - and now most have gone to the legal Pid 31 and 34.
HDTVFanAtic is offline  
post #1199 of 2239 Old 02-06-2006, 08:14 AM - Thread Starter
AVS Special Member
 
balazer's Avatar
 
Join Date: Feb 2001
Location: Sunnyvale, CA
Posts: 3,317
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 0 Post(s)
Liked: 10
Quote:
Originally Posted by Cris Moore View Post

Jacob,

I think your suggestion of setting the discontinuity_indicator might have solved the audio sync problem on my Roku (at least for my WB station). Once I set the bit the audio was in sync after the slice.

Much more testing to do

Thanks for the insight.

If my guess is correct, if the Roku is really responding to the discontinuity_indicator, it wouldn't even care about the timestamps being rewritten. I.e. you could take an older version of HDTVtoMPEG2 that doesn't rewrite the timestamps, change it so it sets the discontinuity indicator, and it would work just as well as a version that does rewrite the timestamps.
balazer is offline  
post #1200 of 2239 Old 02-06-2006, 10:53 AM
AVS Special Member
 
Cris Moore's Avatar
 
Join Date: Oct 1999
Location: Oregon
Posts: 1,157
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 0 Post(s)
Liked: 11
Quote:
I bet it was the local TV stations were misusing Pid 11 and 14 back then so it matched up - and now most have gone to the legal Pid 31 and 34.

I agree.

I don't see any reason for H2M to continue to use the default Pids of 0x11/0x14. Unless there are objections I will change the defaults to be 0x31/0x34.

Cris Moore is online now  
Reply Home Theater Computers

User Tag List

Thread Tools
Show Printable Version Show Printable Version
Email this Page Email this Page


Forum Jump: 

Posting Rules  
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off