Log in

View Full Version : Another Bad Blend


Jim_IT
3rd September 2005, 00:21
Neuron2,

Did you happen to check the clip I uploaded; "Two and a Half Men Broken Seg3.mpg"

The 10 second clip is 52% video. The source is CBS OTA HDTV recorded from Media Center Edition 2005, remuxed via elecard M71 ts muxer.

How can a network originated HD show be so badly blended?

Target frame rate is 29.97 for the PSP.
My IVTC handling is done with the following statements:
video = video.Telecide(order=1,guide=1)
video = video.FDecimate(threshold=1.2,rate=29.97)

Is there a way to properly maintain audio synchronization?

I thought I was close, feeding in raw m2v and ac3 from DGIndex into virtualdubmod, but the xvid output was no longer in sync.

Jim

Guest
3rd September 2005, 01:10
Did you happen to check the clip I uploaded; "Two and a Half Men Broken Seg3.mpg" I saw it but there was no text file description, no PM, and I could not find the file name with a search to tie it to a thread, so I assumed it was someone just using my FTP server for their own purposes. So I deleted it sight unseen. If it was called to my attention and I missed it, sorry. The safest thing to do is to send me a PM when you upload something.

The 10 second clip is 52% video. The source is CBS OTA HDTV recorded from Media Center Edition 2005, remuxed via elecard M71 ts muxer. Why do you need to remux it?

Is there a way to properly maintain audio synchronization?

I thought I was close, feeding in raw m2v and ac3 from DGIndex into virtualdubmod, but the xvid output was no longer in sync.
You cannot use VirtualDubMod on material that has irregular pulldown. Why? Because it will screw up the sync. Serve the video with Avisynth and DGDecode.

If you upload it again and alert me, I'll have a look.

[BTW, please don't include !!!! characters in thread titles, per forum rule 9. I've edited your title for you. No big deal, but I'm obligated to inform you. Thank you.]

Jim_IT
3rd September 2005, 03:18
Thanks, Neuron2.

I uploaded the file as I was trying to post a new message, but wasn't aware of the forum's 5 day membership requirement b4 posting, and I wasn't sure about how u felt about im's.

I am uploading again. I have a ton of OTA HD content recorded, which I'd love to convert. I built a nice pc just for this, but it needs to stretch it's legs and do some encoding full time. I believe I have it down to about 5-10 minutes to prep a new show for encoding served up with avisynth, but this problem is stopping me. I plan to do the whole upcoming NFL season to DVD, and need to get past this.

As you know HD dvr-ms files are just ts/ps mpeg with MS ASF wrapper.

No applications I have found can natively accept this format. Thus the need to run the dvr-ms thru graphedit or some other directshow utility to get output to plain mpeg format. The M71 filter allows video/audio pids to be selected and remuxed, and seems to be designed specifically for these streams.

I have had good success with 720p 59.94 content, and limited success with 1080i 29.97 content. When I started I assumed that the reverse would be true, but that was b4 I knew about IVTC.

I am using the following script for serving up to PSP video9 which uses ffmpeg, mencoder and various other tools to finally get mp4 AVC file output.
I've tried quenc to get reduced mpeg2 output, but same results.

#=====================================================
#AVS Script for 1080i 29.97fps source

#Load the DGDecode plugin.
#LoadPlugin("C:\Program Files\DGMPGDEC\DGDecode.dll")
#LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\Decomb.dll")
#LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\FDecimate.dll")


#Load the video and audio files.
video = MPEG2Source("Two and a Half Men Broken Seg3.d2v")
#video = video.AssumeTFF().SeparateFields()
audio = DirectShowSource("Two and a Half Men Broken Seg3 PID 3ea T01 2_0ch 384Kbps DELAY 306ms.ac3")

# QuEnc AC3 encoding has LOW volume level, so compensate by amplifying
audio = audio.Amplify(20)

#Crop video edges to get rid of any noise if needed: left,top,-right,-bottom
video = video.Crop(0,0,0,-8)

#Reduce framerate by half (to 29.97 fps)
video = video.Telecide(order=1,guide=1)
video = video.FDecimate(threshold=1.2,rate=29.97)


#Delay the audio (according to delay given by DGIndex)
audio = audio.DelayAudio(0.306)

#Resize the video to make it complient for end product specs.
video = video.BicubicResize(320,240)

#Interleave the video and audio together.
av = AudioDub(video,audio)

#Return the video/audio
return av
#=====================================================

I believe I am completely up to date on avisynth, dgindex as I have been reading along as you have recently made a ton of updates.

Thanks for all the work. Even from all of us who don't post.

Jim

Guest
3rd September 2005, 04:24
I don't know what the heck you uploaded, but neither DGIndex nor VirtualDub MPEG2 can decode it.

It's called .mpg but it looks like a transport stream. What are the video and audio PIDs?

If that's dvr-ms, please don't. I have no means of decoding that format, nor am I interested in getting the means. Give me plain old MPEG or transport.

Jim_IT
3rd September 2005, 05:45
I'm assuming since all OTA HD transmissions are transport streams, that this is too.

When the dvr-ms files is initially loaded into graphedit and pins attached to elecard M71 Transport stream muxer, the video stream shows mpeg2 video on 224 and ac3 audio on 189. When I load the muxed mpeg into DGIndex, I can detect both pids and video is displayed properly.

Jim


btw, projectx chokes on this recording also.

Guest
3rd September 2005, 11:32
When I load the muxed mpeg into DGIndex, I can detect both pids and video is displayed properly. Then why don't you give me the "muxed mpeg" that I can decode in DGIndex???

Jim_IT
3rd September 2005, 14:36
The file I uploaded is it, just a smaller piece.

Originally, the whole remuxed mpeg was loaded into DGIndex.

After avisynth processing, the audio remained in sync, up until this area around 9 minutes into the show.

I then used a MSDN dvr-ms utility to extract the area where it appeared,
remuxed the new segment, and uploaded it to your server.

I just uploaded the d2v file produced by DGIndex. DGIndex does not have a problem loading this file on my pc. What else can I provide to help identify this problem?

Jim

scharfis_brain
3rd September 2005, 14:46
here, nothing can open this file, too!

Guest
4th September 2005, 00:55
DGIndex does not have a problem loading this file on my pc. Sure, because it points to the complete stream on your hard disk! I can't load a D2V that points to your hard disk. :)

What else can I provide to help identify this problem? I need a stream that can be decoded by DGIndex. Instead of going through that strange procedure just chop a piece off the good stream with a binary editor.

Jim_IT
4th September 2005, 05:28
I Just downloaded dgmpgdec144b1.zip and replaced exe and dll in my existing dgmpgdec folder. Double clicked DGIndex, dragged "Two and a Half Men Broken Seg3.mpg" the same as ftp'ed on top of DGIndex window. File list appears, click add. The popup window for cannot find pids appeared, but they were detected correctly as video = 1001, 3e9; Audio = 1002, 3ea. Close open GOP video popup, select save project or save project and demux video. DGIndex properly decodes and finishes without any errors. I get d2v, m2v, and ac3 output. Tested again on another pc also. Is this not the same behavior that you get?

Sure, because it points to the complete stream on your hard disk! I can't load a D2V that points to your hard disk.

I uploaded d2v file just so you could see what were the detected settings on my system.

I need a stream that can be decoded by DGIndex. Instead of going through that strange procedure just chop a piece off the good stream with a binary editor.

Can you share the location of any freeware binary editors?
How can you select a correct range to save?

Guest
4th September 2005, 12:26
Is this not the same behavior that you get? No, it is not. The audio PID is not detected and when you set those PIDs you get garbage video. When you save project, the demuxed m2v is also garbage and the D2V file is nonsense.

Maybe your upload corrupted the file. Please try downloading it and decoding the downloaded one.

Can you share the location of any freeware binary editors?
How can you select a correct range to save? http://www.expertcomsoft.com/download.htm
Delete the parts of the file that you don't want.

Jim_IT
4th September 2005, 16:08
Maybe your upload corrupted the file. Please try downloading it and decoding the downloaded one.

The file was corrupted. I uploaded again, and this time it should work.

thanks, Jim

Guest
4th September 2005, 17:55
There are no blends in there. The problem is that you set the order parameter to Telecide() incorrectly. If you do Parse D2V on the D2V file you'll see that it is BFF but you have set order=1. This together with having the postprocessor on, explains the blending.

You can't use FF in DGIndex because there are mixed hard and soft telecined sections, even in the same scene! Bizarre.

I used DGIndex with Honor Pulldown Flags and converted the AC3 to WAV. Then I made a pan-and-scanned (640x480) XviD encode using this script:

MPEG2Source("E:\tmp\Jim_IT\Two.d2v")
telecide(order=0,post=0,guide=1)
decimate()
crop(0,0,0,-8)
lanczosresize(852,480)
vid=crop(106,0,-106,0)
#aud=NicAC3Source("Two PID 3ea T01 2_0ch 384Kbps DELAY 306ms.ac3", 2)
aud=WAVSource("Two PID 3ea T01 2_0ch 384Kbps 48KHz.wav")
AudioDub(vid,aud)

The video was fine but the audio sync was much different between the start and the end. I noticed that the demuxed audio was 9 seconds, while the demuxed video was 10, and the difference is comparable to the desync at the end. I would need a much longer sample to properly help with the audio issue. As a matter of interest, can you play that sample in sync on any player?

This is a very interesting case. If you'd like to upload a really big stream, feel free to go as large as 500MBytes. Lot's of talking heads if possible. :)

scharfis_brain
4th September 2005, 18:49
Maybe a bit OT here: can you modify Telecide in such a way, so it reads itself the avisynth internal fieldorder flag like getparity() does, if no order parameter is given to telecide()?

This would IMO result in lesser mistakes and difficulties for most people, because mpeg2source() already delivers the correct fieldorder to avisynth.

Jim_IT
4th September 2005, 19:28
And yes, the clip I sent or the original does play in any player without sync problems. I tested WinDVD, Media player, real player, etc. What version of Media Player? I have Windows Media Player 9 and it doesn't play.

Have you tried processing this file through ProjectX?

Guest
4th September 2005, 19:32
Maybe a bit OT here: can you modify Telecide in such a way, so it reads itself the avisynth internal fieldorder flag like getparity() does, if no order parameter is given to telecide()?

This would IMO result in lesser mistakes and difficulties for most people, because mpeg2source() already delivers the correct fieldorder to avisynth. I know it's possible because I have tested it. But I'm dubious about trusting Avisynth because Telecide is not always used with mpeg2source().

How about if I add a string to the exception box saying something like "This clip appears to require order=x, but that could be wrong yada yada".

scharfis_brain
4th September 2005, 19:37
How about if I add a string to the exception box saying something like "This clip appears to require order=x, but that could be wrong yada yada".

that could cause big trouble with fully automated scripts.

I prefer this language:

xxxsource("blah")
assume?ff()
anyfieldorderdependantfilter()

because I was never able to rember, whether order=1 is bff or order=0 is bff.
assume?ff() before is much more intuitive.

look at TFM or TDeint. both read it from AVIsynth.

Guest
4th September 2005, 19:40
@scharfis_brain

OK.

Jim_IT
4th September 2005, 20:00
No, All my pc's have been upgrade to media player 10.

And no, ProjectX will not process, this file. It doesn't seem to handle 1080i streams for me. It does work on 59.94 720p streams.

because I was never able to rember, whether order=1 is bff or order=0 is bff.
That is true for me too.

Guest
4th September 2005, 21:06
can you modify Telecide in such a way, so it reads itself the avisynth internal fieldorder flag like getparity() does, if no order parameter is given to telecide()? Here you go. The order parameter has been laid to rest. All documents were revised accordingly.

http://neuron2.net/decomb/decomb522.zip

The way to remember the meaning of order=1 is simple: it has the same semantics as the MPEG2 TFF flag (there is no BFF flag). :) Yeah, yeah, I know. Why didn't I call it the tff parameter? Ya got me.

scharfis_brain
4th September 2005, 21:37
WOW! That's fast :)

I'll try it tomorrow, cause now I've go to get some sleep.

But I risked a short look into the Docs ;)
So I see, that the order-parameter is completely removed now?

Guest
5th September 2005, 04:14
So I see, that the order-parameter is completely removed now? Sure, that was your idea. If you need to force the order, just use AssumeTFF() or AssumeBFF() as needed. As long as I am getting it from Avisynth, it's superfluous. Right, or did I miss something?

scharfis_brain
5th September 2005, 15:13
Right, or did I miss something?

Nono... You are right.
I just was curious about it.

Jim_IT
6th September 2005, 06:35
Neuron2,

I uploaded a bigger clip.

Jim

Guest
6th September 2005, 13:51
I uploaded a bigger clip. Thank you. I will check it out.

Jim_IT
14th September 2005, 01:19
Neuron2,

Did you get a chance to take a closer look as to what is causing the problem with the audio stream? I'm interested in seeing what you found.

Jim

Guest
17th September 2005, 13:33
Not yet.