Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion. Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules. |
4th February 2005, 07:06 | #61 | Link | |||||
Registered User
Join Date: Dec 2001
Posts: 234
|
Quote:
1) Enabling Drop Frame This has to do with the way the mpeg counts time in relation to frames. When you encode the video at 23.96 and make it play back as if it were 29.97, the mpeg's "natural seconds" appear to play longer than a "real" second. This results in the video's duration appear to be shorter than it actually is... Now, when I first read about this, I thought the flag would cause the video to actually skip playing a frame or something, but that's not the case. This guys dissertation explains it rather well: "It is not so much frames which are dropped as frame numbers which are skipped." In the end, if you do not use the Drop Frame Flag in your .m2v, you could have a real hard time setting chapters accurately or getting subtitles to sync right. 2) Setting all Frames to Progressive Now, I don't really know how beneficial this is, but here's my line of thought... The video -is- encoded with progressive frames. The 2:3 pulldown flags makes it appear to be 29.97fps, which is typically an Interlaced video. So in truth, a 29.97fps Progressive scan video would actually contain duplicate frames. By setting this flag, you're telling the players not to deinterlace when decoding and just show the frame. Progressive scan enabled dvd players should love that. Now, I've tried using the other prog_seq switch that marks the entire stream as progressive but found playback to be...problematic. Xbox Media Center hated it anyway, so marking the frames progressive and not the stream seemed to be the way to go. So, how do you apply pulldown? I made a .bat file (see below) and made a shortcut to it on my desktop. When CCE has finished making it's .mpv I just drag and drop it on the shortcut and this .bat makes an .m2v for me. So for example, I encode lost-s1e14.mpv and drop it on the shortcut and it spits out lost-s1e14_PULLED.m2v for me to mux with the ac3. Code:
@echo off set INFILE=%1 set OUTFILE=%INFILE:~0,-4%_PULLED.m2v PULLDOWN.EXE %INFILE% %OUTFILE% -drop_frame true -prog_frames p pause WoofSoft built a GUI out of the source code from this command line app and called it DoPulldown v1.0.0.0, but I prefer to drag and drop my .mpv on the shortcut. Old habits die hard, but it'd be easier if DoPulldown supported Drag-n-Drop (@WoofSoft: hint hint) Quote:
Quote:
And incidentally, decimate(cycle=2) is probably a lot slower than just using SelectEven() or SelectOdd() which would yield (probably) the same result. Quote:
Quote:
You can pick it up here. You have to open avi2mpg2.exe which opens this interface for...honestly, I have no idea. But you have to click the "Load" button as if you wanted to load a project file and click Cancel (apparently there is a known bug that this fixes, *shrug*). Then you click the "Start Encoding" button, even though you are not encoding anything, and this opens the bbMPEG window. At this point you can click the "Settings" button and go to the "Program Stream Settings" tab and tick the dot for ~DVD. The defaults should be fine, then go to the "Input and Output files" tab to select the target .mpg and your source .m2v and .ac3 files. Click OK, then Start and it'll mux it up for you. What can you do with the final .mpg? I've found InterVideo WinDVD to be a great app for playing the video, that or Xbox Media Center. You can also use the .mpg to author a DVD using TMPGEnc DVD Author. |
|||||
4th February 2005, 15:40 | #62 | Link |
Registered User
Join Date: Nov 2004
Posts: 92
|
Thanks FreQi. Very informatinve. My project for the weekend is set. I am going to try all of this on my videos.
As for changefps, you are right. Thats what happens when I try to write from memory. I meant assumefps. I stopped using it because it changed the video rate so that audio and video no longer were in synch. I guess that changefps was also incorrect. |
24th April 2005, 23:22 | #63 | Link |
Registered User
Join Date: Jan 2003
Posts: 28
|
I am using this method to convert 720p material to DVD, and am not sure why I need to use 'Telecide()' for 720p material? Surely I could just use FDecimate to get the frame rate down to 24, since there are no interlaced frames present?
Or am I missing something?! |
25th April 2005, 06:01 | #65 | Link |
Registered User
Join Date: Dec 2001
Posts: 234
|
You're right, Telecide() is not used on 720p (it's an option for 1080i) but I use Decimate(cycle=5) because I first use SelectEven() which takes it down to a progressive 29.97fps. My scripts for 720p all look something like this:
Code:
LoadPlugin("C:\Program Files\theeo\DGMpegDec\DGDecode.dll") LoadPlugin("C:\Program Files\theeo\AVISynth\Decomb.dll") LoadPlugin("C:\Program Files\theeo\AVISynth\BT709ToBT601.dll") MPEG2Source("F:\According.to.Jim.s4e23\atj-s4e23.d2v") # correct the slight color error SDTV->HDTV introduces BT709ToBT601() theeoAddRange(302,9931)++theeoAddRange(18822,22801)++theeoAddRange(53890,21667) # InverseTelecine and Decimation SelectEven().Decimate(cycle=5) Crop(4,4,-4,-4) # take 4 pixels of left, top, right, bottom LanczosResize(720,480).ConvertToYUY2().AudioDub(BlankClip()) function theeoAddRange(clip c, int s, int r) { return c.Trim(s,s+r-1) } |
26th April 2005, 01:56 | #67 | Link |
Registered User
Join Date: Dec 2001
Posts: 234
|
How do you determine when it needs correction? Is there some way to detect it in software, or is it just visually apparent? Perhaps there is a way to determine it logically.
For example, when something is transferred from Film to HD, it would need correction...? I believe that would be the case with just about all Drama's and Sitcoms. When something is filmed with an HD Camera, then it would not...? The only thing I can think of here would be things like the specials you'd see on PBS, NASCAR races, the Superbowl and other live broadcast events. Incidentilly, these types of HD streams would probably not take to well to being IVTC'd either. |
26th April 2005, 16:13 | #69 | Link |
Registered User
Join Date: Nov 2004
Posts: 92
|
OK. I have learned a lot here. A brief delay while I had to remove a very persistent virus on my pc that just refused to go away, but now I am back in business.
I process my 720p using dgindex, convert to 23.976 using fdecimate since they happen to be 3:2 format. I convert to avi using vdubmod and everything is in perfect synch. I convert to m2v using quenc and then run dgpulldown to convert to 29.97, and covert to dvd using muxman. Again everything is in perfect synch. I then open the puldown m2v file and the ac3 audio in Mpeg2Schnitt to cut the commercials. First problem is that there is no place to put the audio delay. Even in Mpeg2Schnitt I can see audio synch errors greater than would be caused by the delay alone. I tried the original 23.976 m2v, and I still have audio errors. I then tried delaycuter utility on the audio with both the original and pulldown m2v and I still have audio synch errors. Pulling the audio into gspot, It says the audio frame rate is 31.5fps. Somehow this synchs with the 23.976 or 29.97 pulldown audio and sitll maintain perfect audio synch while cutting causes audio errors. I read somewhere of a utility that will take the cut list from Mpeg2Schnitt and perform the same cuts in the audio seperately. I will look for that and try again. |
26th April 2005, 18:09 | #71 | Link |
Registered User
Join Date: Nov 2004
Posts: 92
|
I would love to. How to cut an HD transport stream. I process the hd stream to a d2v project. Open the d2v in an avsynth script. Cutter tools need an m2v which I get only after processing with quenc. I tried cutting in vdubmod, but it takes forever.
In your sample, I saw theeoAddRange(302,9931)++theeoAddRange(18822,22801)++theeoAddRange(53890,21667) How did you get these ranges? Any limit to the number of ranges I can add here? How is the range affected by the fps changes needed to convert the 3:2 720p to 23.976? Thanks |
26th April 2005, 18:31 | #72 | Link | ||
Registered User
Join Date: Dec 2001
Posts: 234
|
Check out my second post on page 2 of this thread. It's explains pretty much what I still do today, except I wrote an app to automate the whole process (called theeo, which still needs a little tweaking before I publicly release it).
Keep in mind that in order to cut the AC3 with VirtualDubMod, you have to use v1.4.13. The newer 1.5x doesn't cut the ac3 stream when you demux it with trim's. Not sure why. Also, rather than using BeSplit, I'd suggest you use DelayCut to Fix the trimmed ac3. It seems to do a better job of maintaining sync. Quote:
Quote:
Last edited by FreQi; 26th April 2005 at 18:34. |
||
2nd May 2005, 09:29 | #73 | Link | |
Registered User
Join Date: Dec 2004
Location: Melbourne, AU
Posts: 1,963
|
Quote:
|
|
17th May 2005, 21:45 | #75 | Link |
Registered User
Join Date: Nov 2004
Posts: 92
|
I never timed it. It takes a long time regardless. I am processing 1 hour hd programmming. Taking out commercials, it comes to about 45 minutes. Encoding this takes about 8 hours. Three hours for the first pass and 5 for the second. I would assume FDecimate would be slower because it checks all frames to find best frames to drop, while SelectEven.Decimats() does not have to be too intelligent, but I could be wrong. I just process overnight and so do not care how long it takes.
|
17th May 2005, 21:49 | #76 | Link |
Guest
Join Date: Jan 2002
Posts: 21,901
|
Decimate() also compares frames.
If you want a fast but dumb decimation, use ChangeFPS(). You can compare that to FDecimate() to get an idea of the time difference. I doubt it is as bad as you suggest. The advantage of FDecimate() is that it preferentially drops duplicates where possible. |
19th May 2005, 21:07 | #77 | Link |
Registered User
Join Date: Dec 2001
Posts: 234
|
Yeah ChangeFPS would probably be faster but I really wouldn't trust it to make a good looking video (it would probably jitter pretty regularly). Decimation is the way to go, dispite the potential speed hit.
I've got a P4 2.8 and I find encoding times to be about 4x the runtime. So if you have a 30min show, it takes me about 2hrs to encode. That's a really rough estimate... I don't know the real times off hand as I also set up my encodes and go to sleep. They're all done bu the time I wake up. |
26th May 2005, 03:39 | #78 | Link |
Registered User
Join Date: May 2005
Posts: 3
|
learned some great stuff here, thanks for all the info. I'm still having some sync issues but I think i'm on the right track.
Most of my concern though is for converting interlaced HD content (like leno/conan/letterman and live music on pbs) down to DVD. does anyone have a good script for those? i end up playing with the settings a lot. this was one of my scripts for an Austin City Limits performance (which was upconverted and, broadcast 1080i widescreen) Code:
LoadPlugin("C:\progra~1\gordia~1\MPEG2Dec3.dll") mpeg2source("P:\HDTV\pixies.d2v") crop(16,0,-16,-8) SeparateFields SeparateFields Lanczos4Resize(720,240) SelectEvery(4,0,2) doubleWeave selectodd I then encoded that with CCE and authored a 16x9 DVD, with original AC3 audio. Didn't have any sync issues because I didn't cut out any commercials. But I tried a lot of the info here on SNL from a couple weeks ago, and best I got was bad field ordering and a constant sync offset (improvement over a sliding one). Last edited by Leehro; 26th May 2005 at 03:41. |
26th May 2005, 18:56 | #79 | Link |
Registered User
Join Date: Dec 2001
Posts: 234
|
The live programming that you're talking about is filmed natively in NTSC, which means you do not want to decimate it. If you do you'll get jitter and general baddness. I'd try something like this:
Code:
LoadPlugin("C:\progra~1\gordia~1\MPEG2Dec3.dll") mpeg2source("P:\HDTV\pixies.d2v") SeparateFields() SelectEven() Crop(16,0,-16,-8) Lanczos4Resize(720,240) You could use Decomb.dll to run Telecide() in order to deinterlace it (do not decimate), but you'd be spending more processing time for something that's going to be less than what you get from simply SeparateFileds().SelectEven() anyway. It might look better tho. Try both, see what you prefer. LMK. Last edited by FreQi; 26th May 2005 at 19:03. |
26th May 2005, 21:15 | #80 | Link |
Registered User
Join Date: May 2005
Posts: 3
|
yeah it's NTSC stuff like letterman, SNL. stuff that is natively 480i (probably slightly higher than 480 but still standard def, interlaced video)
i don't want progressive video. I want to keep it interlaced. Sometimes i want to convert to divx/xvid, and in that case yeah i want progressive. but if it's originally standard def, interlaced video at 29.97fps, that's what I want to be able to put on a DVD. |
Thread Tools | Search this Thread |
Display Modes | |
|
|