PDA

View Full Version : grayline with mpeg2source


lexor
10th December 2005, 03:41
heya guys,

I'm having a weired problem with avisynth 2.5.6a (I just got this one after reinstall), I capture my HDTV fine (1080i which is what's broadcast), no problem with .ts, I used HDTVtoMPEG2 no problem, got my .mpg file, plays fine no artifacts. open it up in DGIndex, save the project, no probs.

now avs script:
mpeg2source("clip.d2v")

simple, huh? and it produces a thick gray line under the image (in the black area) if I try to playback .avs, and it's still there if I encode a sample to x264 (tried xvid too) so it's not an on-the-fly artifact, it actually adds gray line to picture.

any ideas what the problem could be? I never had avisynth do this before on any source and quite frankly I'm at a loss as to what could be wrong in such a simple setup.
(I know it needs deinterlace, that doesn't help, so here I keep the script simple for debugging)

Pookie
10th December 2005, 03:46
I'm not certain of the cause, but you might want to run Fix1088.exe on the source file.

"fix1088 Will process a transport stream recording to remove the grey
or black bar that you see at the bottom of some 1080i broadcasts. It
will replace any vertical size value of 1088 in the sequence headers
with 1080. Note that sometimes the grey bar is caused by a bug in
the decoder rather than in the encoder, in which case this will not help.

Usage: fix1088 [-s] <input file/pattern> <PID>
-s: save input files instead of overwriting them
specify PIDs in hex without the leading 0x.


fix1088 has not been tested with files greater than 2 GB, but I think
it should work."

http://www-personal.umich.edu/~balazer/fix1088/fix1088.exe

neuron2
10th December 2005, 04:11
Why do you need to run HDTVtoMPEG2, rather than just opening it in DGIndex directly?

laserfan
10th December 2005, 04:41
When I encounter this (using AutoGK to convert my 1080i ts to Xvid) AGK "sometimes" adds that line to the Xvid. Something about needing 1088 not 1080 to be divisible by 16. Dunno why, but the grey/white line doesn't always appear, but...

The solution with AutoGK is just to crop it off (CTRL-F9). Not sure what you are trying to do, but avisynth can crop it of course.

lexor
10th December 2005, 16:02
Why do you need to run HDTVtoMPEG2, rather than just opening it in DGIndex directly?
becouse it doesn't open them, tells me to check pids, but the .mpg I extract plays back fine, I'll try that fix1088 later, but does it take in .ts or .mpg?

Pookie
10th December 2005, 19:19
Fix1088 works on Transport Streams.

laserfan
10th December 2005, 20:31
I use AutoGK which is Avisynth-based. AGK always detects my 1080i ts captures as '1920x1088'. When I look at these captures with other tools, they say 1920x1080. Then I run fix1088 on them, and it finds nothing to fix!

When I run a FILM-based 1080i program thru AGK (again, detected as 1920x1088) it applies Telecide to the program, and it comes out (Xvid) with no grey line.

When I run an Interlaced 1080i program thru AGK (which always as I've said states it is 1088) it applies KernelDeint to the program and it comes out with the grey line at the bottom.

As I said, fix1088 doesn't work. Something about the way AGK detects these files, and Telecide (OK) and KernelDeInt (not OK).

Bottom line: I have to use CTRL-F9 and crop 8 pixels off the bottom of an interlaced 1080i ts program to avoid the grey line. Film-based doesn't have the same problem.

lexor
10th December 2005, 23:57
sweet gorilla of manila, crop(0,0,0,-8) fixed it, and I run leakkerneldeint no probs on it as well. thanx a bunch laserfan :)

now I just have a nice clean script without needing to run any other tools :)

neuron2
11th December 2005, 01:44
becouse it doesn't open them, tells me to check pids If you'd bother to read the user manual, you'd know how to set your PIDs.

Here's a hint for you: Stream menu/Detect PIDs.

lexor
11th December 2005, 04:10
If you'd bother to read the user manual, you'd know how to set your PIDs.

Here's a hint for you: Stream menu/Detect PIDs.
Well the only reason I even use DGIndex is because d2v is what mpeg2source likes, I can't be motivated to learn about program I have no wish to use, but am required to. For me it's just another hoop I need to jump through to get my video to avisynth, quite ennoying going file -> open, file -> save project everytime (I mean it has no other purpose on its own), so I try to pretend it doesn't exist.

neuron2
11th December 2005, 06:43
If you use the Stream menu, which is very simple, you can eliminate one of the tools that you are using. So it will simplify your process, which you seem keen to do. It will also be faster, since you will make one less pass over the source file.

laserfan
11th December 2005, 19:26
I have never used DGindex directly myself, only via AutoGK and maybe some others I don't even know about. But owing to this question (the grey line) I launched DGindex and opened one of my 1920x1080 transport streams, and it is recognized as a 1920x1088 file, and sure enough a grey line appears at the bottom.

neuron2 I wonder why DGindex does this (says it is 1088)? If you know can you suggest--is it something that could be tweaked about DGindex, or should I raise this with len0x re: AutoGK? Seems strange to have to always think for 1920x1080 sources to "leave alone if FILM and crop-off if Interlaced" in AutoGK.

scharfis_brain
11th December 2005, 19:57
OMG. if the line bothers you, just use this workaround:

mpegsource("1080i.d2v")
(height==1088) ? crop(0,0,0,-8) : last

laserfan
12th December 2005, 02:38
OMG. if the line bothers you...The line is quite troublesome when viewing 16:9 programs on a 4:3 TV!

lexor
12th December 2005, 03:46
@scharfis_brain we already figured that out, no need to quote my own posts to me

@neuron2 Problem is that my capture machine is what you would call legacy (read an array of small FAT32 drives) which means I have to break up .ts on capture into relatively small files (about 500mb) to make my hardware keep up (it chockes if I try to make larger continuous files), and after I fill them up, I just do one batch encode (of multiple movies cupped continuously, I separate them later rather than make breaks at capture time, there is a reason for this too, and it can't be helped), problem being that there seems to be an uppper limit on how many .ts files I can add to DGIndex at once (though I didn't try to find out how many), so I need HDTVtoMPEG2, to make one big .ts on my encode machine anyway, though now that you pointed it out, I no longer covert to .mpg, but single .ts. Still my process can't be simplified by heavier use of DGIndex. So unless someone wants to sponsor my capture machine's upgrades, I'm afraid there isn't much that can be done in the current chain, which is:

hdtvtompeg2 -> many .ts to one .ts -> load in DGIndex -> save project -> mpeg2source in avisynth -> megui

I dunno, but that dgindex step just seems like pointless busy work, just because I can't load .ts directly... well that sounded like a dis of some great software and effort (I think you developed it?) but it really isn't, it's just this separation of tools to make them more modular really backfires in my setup.

neuron2
12th December 2005, 04:04
problem being that there seems to be an uppper limit on how many .ts files I can add to DGIndex at once (though I didn't try to find out how many), so I need HDTVtoMPEG2 DGIndex will open up to 512 files. I find it hard to believe you hit that limit. Are you saying that you tried to add all your files and ran into a problem? If so, please tell me about it so I can fix it.

I dunno, but that dgindex step just seems like pointless busy work, just because I can't load .ts directly... well that sounded like a dis of some great software and effort (I think you developed it?) but it really isn't, it's just this separation of tools to make them more modular really backfires in my setup. MPEG2Source() could not work without the index file created by DGIndex.

neuron2
12th December 2005, 04:10
I have never used DGindex directly myself, only via AutoGK and maybe some others I don't even know about. But owing to this question (the grey line) I launched DGindex and opened one of my 1920x1080 transport streams, and it is recognized as a 1920x1088 file, and sure enough a grey line appears at the bottom. If it is encoded as a 1088 high file in the MPEG2 syntax, then that is what DGIndex will give you. It's not just making stuff up to irritate you. Use Crop().

I wonder why DGindex does this (says it is 1088)? Because the MPEG2 stream is coded as 1088.

If you know can you suggest--is it something that could be tweaked about DGindex, or should I raise this with len0x re: AutoGK? Seems strange to have to always think for 1920x1080 sources to "leave alone if FILM and crop-off if Interlaced" in AutoGK. I don't consider it worth modifying DGIndex and DGDecode to support an auto-crop to support this special case when it is so easy to add a crop call to your script.

laserfan
12th December 2005, 04:27
Having a bad day, Donald?

The only program I can find that says these are 1088 files is DGindex. So I asked the question.

Sorry you find this irritating!!!

scharfis_brain
12th December 2005, 05:59
@lexor: I didn't quote anywhere.

@laserfan: I thought it was for recoding purposes, so always put this line after mpegsource and get happy ;)

neuron2
12th December 2005, 06:06
Having a bad day, Donald?

The only program I can find that says these are 1088 files is DGindex. So I asked the question.

Sorry you find this irritating!!! Please read and follow forum rules, specifically, rule 4: respect the moderator. Thank you.
:readrule:

I made no attack on you, nor am I irritated; I merely stated the facts as I see them. Please follow up with a PM if you want to pursue this; it is off topic for this thread.

lexor
12th December 2005, 12:26
max 512 files you say? then there is definitely a problem, I have this whole day marathon captured in only 89 or 90 .ts, I can't add them all at once.

/EDIT: omg I just noticed something, if I add them in batches of like 10, it will add them all to the list, I just can't select all and add. Now I don't need to convert to one .ts, hdtvtompeg2 is out of the picture :)

neuron2
12th December 2005, 13:50
I just can't select all and add Can you please explain what stops you from adding them all at once? Can't you just hightlight all the files in the file open dialog? If not, why not? If you get an error message, what is it?

lexor
12th December 2005, 18:34
ok I load dgindex -> file -> open -> navigate to folder -> ctrl-a (select all, tried selecting manually too) -> click open -> dgindex opens File List window (the one with add/up/down/del/del all buttons) and it's empty it didn't add anything to it.

also I can try to use add button in that window, also select all, click open, list empty.

I just did trial and error test, I can add 64 at once, if I select 65 or more, the list is empty. but I can select 64, add them, then select the rest add them too, it will make complete list and load fine.

I'm using 1.4.6b2, I get no error messages.

neuron2
12th December 2005, 22:04
Thank you. Please tell me the filenames and how they increment.

lexor
13th December 2005, 00:15
filename format: name.of.show.1080i.0001.ts -> name.of.show.1080i.0080.ts

1080i or 720p depending on source, just because I don't want to load software to see what source I've got capped.

neuron2
13th December 2005, 04:27
Sorry, I forgot to ask. What operating system are you running? Thank you.

lexor
13th December 2005, 12:58
OS is XP SP2

neuron2
31st May 2006, 02:54
Well, laserfan was correct and I eat crow. The 1088 vs. 1080 issue (and any other case where the display size is not a multiple of 16) is fixed in DGMPGDec 1.4.7 RC 4.