VideoHelp Forum
+ Reply to Thread
Page 1 of 2
1 2 LastLast
Results 1 to 30 of 40
Thread
  1. Member Lathe's Avatar
    Join Date
    Nov 2007
    Location
    Sunny Southern California
    Search Comp PM
    I am still working with these older films of mine. This one though is in pretty good shape; I'm PRETTY sure that it simply is a rip straight from the DVD, except it's been (pillarboxed / windowboxed) in the sense that it is a WS film put into a 4x3 frame with added black borders top and bottom. So, I need to process it to get rid of the xtra black borders and bring it into a true 16x9 AR.

    When I was doing my due diligence and carefully stepping through it frame by frame, what I THOUGHT I was seeing was just the usual 3-2 pattern. 3 progressive frames and 2 interlaced ones (with the combing) BUT... when I used the usual code to IVTC it, in the preview player the processed image looked kind of jerky for some reason, which I thought was weird because I had not seen that before. So, I ran it through MeGUI to analyze it to see what it said, and it came back with the usual stuff:

    Click image for larger version

Name:	avs001.gif
Views:	242
Size:	11.0 KB
ID:	39435

    EXCEPT... this time it said something about 'varying field order'... WHAT...??! Usually on all these films, which are pretty much the same type of file, it comes back this way except it will say TFF. Here is the script it is recommending:

    LoadPlugin("D:\EXECUTABLES\MeGUI_2624_x86\tools\ls mash\LSMASHSource.dll")
    LWLibavVideoSource("C:\x\00000.mkv")
    LoadPlugin("D:\EXECUTABLES\MeGUI_2624_x86\tools\av isynth_plugin\TIVTC.dll")
    tfm(order=-1).tdecimate(hybrid=1)

    Usually, it seems that for WHATEVER mysterious reason, it almost always suggests some 'hybrid', either 1 or 3, which I guess as per your explanations before means some kind of blending, which I don't think I want or need. I don't know why it keeps doing that because just about all these films only need a simply IVTC and that's it, but it bloody INSISTS on adding the 'hybrid' factor, but I never use it.

    BUT... it DID look kind of jerky when I just applied the usual IVTC code which is 'tfm(order=1).tdecimate() without the 'hybrid' So, I thought I'd better post a snippet of it here to see if I am missing something. But, honestly all I could see in stepping through it, or in another part of the film, was the usual 3-2 pattern.

    http://lathe-of-heaven.com/TCT.mkv And YES! I chose only 10 seconds where there is continuous movement!

    Appreciate any input!
    Quote Quote  
  2. Member Lathe's Avatar
    Join Date
    Nov 2007
    Location
    Sunny Southern California
    Search Comp PM
    Well, I guess it might have been a false alarm... I went ahead and processed the clip above and played it back and it looked just fine. I guess the preview player was just being spazzy or something. I just used the usual code that I always do as I stated above for IVTC, and it came out just fine.

    Don't know what the hell the 'varying field order' thing was about or why MeGUI just about ALWAYS recommends using either 'hybrid 1 or 3', but the film seems to be just fine with the regular IVTC treatment.

    Thanks...
    Quote Quote  
  3. Member Lathe's Avatar
    Join Date
    Nov 2007
    Location
    Sunny Southern California
    Search Comp PM
    Hmmm, well something definitely IS going on with this film because as soon as I IVTC'd it, it absolutely was now out of sync with the audio....??? That never happened before. And it wasn't just a simple delay. It started right on the nose with the lion roaring perfectly, and then within 2 minutes the sound was way out of sync! It's like the frame rate of the video is now faster than the audio...?! HUH...?!

    I wonder why the heck it would be different this time? So, what I am TRYING now is leaving it telecined, cropping the borders on top and bottom to make it 16x9, and HOPEFULLY my player will still play it in a BDMV folder, and HOPEFULLY see that it needs the 'pull-down' or whatever it does to make it flow properly like it does when it is an MKV file.

    We'll see I guess... Weird...

    ***EDIT

    Nope... no go... I've never seen this audio out-of-sync thing happen with these films before. So, since I couldn't really figure it out, I just left it the way it was and when I watch it on my OPPO I just have to zoom in a couple of steps. I don't know if it looks quite as sharp as having it cropped and sized properly, but I guess it will do.
    Last edited by Lathe; 12th Nov 2016 at 03:03.
    Quote Quote  
  4. Demux the video stream to an MPG or M2V file and use that instead. If that does't work use DgIndex to build an index file (honor pulldown flags) of the demuxed video (not the MKV file) and Mpeg2Source() to open that file, followed by TFM().TDecimate().
    Last edited by jagabo; 12th Nov 2016 at 08:01.
    Quote Quote  
  5. Yes, don't use l-smash for mpeg2 .

    1) the frame rate can be read incorrectly for mpeg2 in mkv - fixable with AssumeFPS, or if you demux it as suggested above

    2) mixed up frames, decoding issues, even when demuxed. It's unreliable, like ffms2 for mpeg2

    In your sample, I get a jump near the end when the guy is running up to the windshield with lsmash with (automatic) tivtc if you demux it or keep in mkv . No problems with Mpeg2Source() + tivtc
    Quote Quote  
  6. Member Lathe's Avatar
    Join Date
    Nov 2007
    Location
    Sunny Southern California
    Search Comp PM
    Oh good, thanks kindly guys!
    Quote Quote  
  7. Member Lathe's Avatar
    Join Date
    Nov 2007
    Location
    Sunny Southern California
    Search Comp PM
    Originally Posted by jagabo View Post
    Demux the video stream to an MPG or M2V file and use that instead. If that does't work use DgIndex to build an index file (honor pulldown flags) of the demuxed video (not the MKV file) and Mpeg2Source() to open that file, followed by TFM().TDecimate().
    The only thing is, shouldn't I specify the field order like this: tfm(order=1).tdecimate() or should I leave it blank as you did?
    Quote Quote  
  8. I always leave it blank, unless something screws up in the field matching and I check and find out it's wrong.
    Quote Quote  
  9. Member Lathe's Avatar
    Join Date
    Nov 2007
    Location
    Sunny Southern California
    Search Comp PM
    Originally Posted by manono View Post
    I always leave it blank, unless something screws up in the field matching and I check and find out it's wrong.
    Good to know, thank you.
    Quote Quote  
  10. Member Lathe's Avatar
    Join Date
    Nov 2007
    Location
    Sunny Southern California
    Search Comp PM
    BTW, the command 'Mpeg2Source()' does not work with the m2v file. Do I need to change the settings on something?

    I'm thinking from what you guys said that the indexing on MeGUI did something weird to the frame rate / timing. I'm trying DirectshowSource at the moment because I know at least it works. I know you guys say to use other opening commands because it is more frame accurate, but until I can get the command above to work, I'll give this a quick try with a fast encode to see if the audio stays in sync. FWIW, BTW, at the end of the commands, I do use Assumefps, so after the IVTC I state it as 23.xxx, but it still had the screwed up timing.
    Quote Quote  
  11. Member Lathe's Avatar
    Join Date
    Nov 2007
    Location
    Sunny Southern California
    Search Comp PM
    Is it a good idea to demux all the mpeg2 movies I have from the MKV files first to m2v every time before I process them?
    Quote Quote  
  12. Originally Posted by Lathe View Post
    BTW, the command 'Mpeg2Source()' does not work with the m2v file.
    Open the d2v file produced by DgIndex, not the m2v file directly -- Mpeg2Source("filename.d2v"). Be sure to use Video -> Field Operation -> Honor Pulldown Flags mode in DgIndex.

    Originally Posted by Lathe View Post
    Is it a good idea to demux all the mpeg2 movies I have from the MKV files first to m2v every time before I process them?
    Yes.
    Quote Quote  
  13. Member Lathe's Avatar
    Join Date
    Nov 2007
    Location
    Sunny Southern California
    Search Comp PM
    Originally Posted by jagabo View Post
    Originally Posted by Lathe View Post
    BTW, the command 'Mpeg2Source()' does not work with the m2v file.
    Open the d2v file produced by DgIndex, not the m2v file directly -- Mpeg2Source("filename.d2v"). Be sure to use Video -> Field Operation -> Honor Pulldown Flags mode in DgIndex.

    Originally Posted by Lathe View Post
    Is it a good idea to demux all the mpeg2 movies I have from the MKV files first to m2v every time before I process them?
    Yes.
    Will do. I've not used DGIndex before, but I will read about it; it shouldn't be that hard. And, by your instructions, I would GUESS that there is some kind of interface where I would select those parameters. I'll check it out.

    BTW, jagabo, I wanted to tell you that your posts (here or on doom9, I don't remember) concerning what the 'hybrid 1, 3' means, etc., were very helpful and informative. Also, your specific instructions to someone else about how to use Srestore were a great find! I followed the steps exactly as you stated them; I haven't actually tried to run it yet, but it was nice to see a simple step by step explanation and links to the PRECISE versions of the dll's that it needs. I'll hafta give that a try...

    Oh, heh, BTW using the demuxed m2v file and DirectshowSource did NOT work. The timing was still WAY off. I'll learn how to do it this way though. How weird that I keep running into all these odd, strange 'exceptions' on these encodes. For the most part I'm pretty sure they just about all are simply on the fly captures, or in this case, I THINK a rip from a DVD to mpeg2. And yet, all these different variations... I'm guessing then that there must be a MILLION ways to screw them up, apparently.

    ***EDIT

    DGIndex is super easy to use; demuxing now...
    Last edited by Lathe; 12th Nov 2016 at 18:35.
    Quote Quote  
  14. Member Lathe's Avatar
    Join Date
    Nov 2007
    Location
    Sunny Southern California
    Search Comp PM
    Here is the log output by DGIndex:

    Stream Type: Elementary
    Profile: main@main
    Frame Size: 704x480
    Display Size: [not specified]
    Aspect Ratio: 4:3 [2]
    Frame Rate: 29.970030 fps
    Video Type: Video 78.91%
    Frame Type: Interlaced
    Coding Type: B
    Colorimetry: BT.470-2 B,G*
    Frame Structure: Frame
    Field Order:
    Coded Number: 172415
    Playback Number: 2
    Frame Repeats: 0
    Field Repeats: 0
    VOB ID:
    Cell ID:
    Bitrate:
    Bitrate (Avg):
    Bitrate (Max):
    Timestamp:
    Elapsed: 0:03:06
    Remain: FINISH
    FPS:
    Info:

    I am going to try to process it now. I wonder why it says that the movie is 79% video...? Isn't this 'film' telecined for DVD? Also, interesting how it calls this file 'Interlaced' just like MediaInfo does, and yet that isn't really true, is it? It is telecined, right?
    Quote Quote  
  15. It's a mix of hard and soft telecine. It doesn't analyze the hard telecined part, just calls it video. You need to apply pulldown to all the soft telecined parts, then IVTC all of it. TFM() accepts the d2v file as an argument to help it with the field matching.
    Quote Quote  
  16. Member Lathe's Avatar
    Join Date
    Nov 2007
    Location
    Sunny Southern California
    Search Comp PM
    Hmmm, no... it is still the same, weird...

    Here is a snippet of the remuxed file (m2ts because it ultimately is going to go into a BDMV folder so my OPPO can play it) It is the exact point to where you can tell that the audio is ahead and then matches and then is behind the video.

    http://lathe-of-heaven.com/TCT.m2ts

    Here is the code I used after demuxing with DGIndex:

    Mpeg2Source("C:\x\00000.d2v")
    LoadPlugin("D:\EXECUTABLES\MeGUI_2624_x86\tools\av isynth_plugin\TIVTC.dll")
    tfm().tdecimate()
    Crop(0, 62, -0, -62)
    ConvertToYV12()
    AssumeFPS(24000, 1001)

    And then I used TSMuxer like I always do to remux the newly encoded video and the audio file into a BDMV folder (in this case an m2ts file so that I could post it here)

    I wonder why in THIS case the A/V is clearly running at two different frame rates / speeds...???

    I'm getting the impression that at this point I simply just have to change the frame rate of either the audio or the video to match the other...

    And, the ironic thing is that in this case, ALL I am bloody trying to do is crop the dang thing so I don't have to blow up the image on my telly screen! Remember too, the exact same thing happened when I left the frame rate, telecine, etc. alone and just tried to crop it and remux the audio.
    Last edited by Lathe; 12th Nov 2016 at 19:14. Reason: More stuff...
    Quote Quote  
  17. Member Lathe's Avatar
    Join Date
    Nov 2007
    Location
    Sunny Southern California
    Search Comp PM
    Hang on minute... I just realized that I didn't rename the d2v file to '00000', so I wonder WHAT the heck it processed...??? Let me rename that and rerun it and see. Perhaps it ran the older m2v file named '00000' that is in the same folder and was demuxed by Eac3to...
    Quote Quote  
  18. Member Lathe's Avatar
    Join Date
    Nov 2007
    Location
    Sunny Southern California
    Search Comp PM
    Okay, in the process of trying this again, I am keeping all of the files in the same folder for one... Also, I took the first 5 minutes from the MKV file and then loaded that into DGIndex since I didn't want to re-encode the entire film every time to find out if it worked properly.

    Interestingly, in loading the 5 minute segment into DGIndex, I got this prompt:

    Interesting that this involves 'field order'...

    So, I'm just going to select 'No' for now and continue to run the encode to see what happens...
    Image Attached Thumbnails Click image for larger version

Name:	DG.gif
Views:	180
Size:	5.4 KB
ID:	39452  

    Quote Quote  
  19. Mpeg2Source() can't open a m2v file directly. And it will give an error message if a non-existent d2v file is specified. It should be putting out YV12 video so ConvertToYV12() isnt' necessary. And after pulldown from an NTSC DVD the video will always be 30000/1001 fps. That is where all NTSC DVD video meets. That is, the base frames can be interlaced at 29.97 fps, or any progressive frame rate from 19.98 fps to 29.97 fps with pulldown flags. But the result of the pulldown will always be 29.97 fps interlaced frames. TDecimate() removes 1 frame out of every 5 by default. So the result of TFM().TDecimate() will be 24000/1001 fps. Which means you don't need the AssumeFPS(24000,1001) either. If any other frame rate shows up in the output you've done something wrong.
    Quote Quote  
  20. Member Lathe's Avatar
    Join Date
    Nov 2007
    Location
    Sunny Southern California
    Search Comp PM
    Strange... now all of the sudden when trying to encode the 5 minute segment generated by DGIndex I get a 'there is no function called 'Mpeg2Source' What the hell...?

    Thanks too for the further explanation above.

    That is REALLY strange because I used the exact same command last time with the entire file. Now that I chopped the first 5 minutes out and processed it through DGIndex and try the same thing, I get that error...
    Quote Quote  
  21. Originally Posted by Lathe View Post
    Strange... now all of the sudden when trying to encode the 5 minute segment generated by DGIndex I get a 'there is no function called 'Mpeg2Source' What the hell...?
    Since you always tell me you research and read everything, then you already know that besides the MPEG2Source line and a D2V you haven't renamed, you also need the DGDecode.dll. Right?
    Now that I chopped the first 5 minutes out and processed it through DGIndex and try the same thing, I get that error...
    Meaning you cut the M2V out from the complete film M2V and then made a fresh D2V project file from it? Once you've demuxed the M2V from your MKV you can use the [ and ] buttons to isolate the section you want to encode and then use the D2V file. No further demuxing is needed.

    And it's always a good idea to post your complete scripts when asking for help.
    Quote Quote  
  22. Is dgdecode.dll in the plugins folder ?

    Or try to load it manually in the script

    eg. (replace "PATH" with the actual path)
    LoadPlugin("PATH\dgdecode.dll")
    Quote Quote  
  23. Member Lathe's Avatar
    Join Date
    Nov 2007
    Location
    Sunny Southern California
    Search Comp PM
    Originally Posted by manono View Post
    Originally Posted by Lathe View Post
    Strange... now all of the sudden when trying to encode the 5 minute segment generated by DGIndex I get a 'there is no function called 'Mpeg2Source' What the hell...?
    Since you always tell me you research and read everything, then you already know that besides the MPEG2Source line and a D2V you haven't renamed, you also need the DGDecode.dll. Right?
    Yep...

    And, I don't read 'everything' Mr. Funny Guy, I just TRY to read thoroughly as much as I can when I want to learn something.
    Quote Quote  
  24. Member Lathe's Avatar
    Join Date
    Nov 2007
    Location
    Sunny Southern California
    Search Comp PM
    Originally Posted by poisondeathray View Post
    Is dgdecode.dll in the plugins folder ?

    Or try to load it manually in the script

    eg. (replace "PATH" with the actual path)
    LoadPlugin("PATH\dgdecode.dll")
    I'll try that, but why the heck would the entire file run just fine, but not the 5 minute snippet when I did exactly the same thing? But, I will try that...

    Guys, I'm thinking by now that this is yet ANOTHER weird encode from another dimension and I will just have to live with it...

    Thanks though.
    Quote Quote  
  25. Originally Posted by Lathe View Post
    Guys, I'm thinking by now that this is yet ANOTHER weird encode from another dimension and I will just have to live with it...
    I doubt that. Upload that small M2V if you'd like someone to have a look.
    And, I don't read 'everything' Mr. Funny Guy...
    Hehe, you know I meant 'read everything about what I'm trying to do'. Me too. I don't try and learn everything which is why there are huge gaps in my AviSynth and encoding knowledge. But what I know I know pretty well and since you have to work with problematic sources, our interests overlap.
    Quote Quote  
  26. Member Lathe's Avatar
    Join Date
    Nov 2007
    Location
    Sunny Southern California
    Search Comp PM
    Well, this time it DID run after loading the dll specifically (I didn't have to do it last time) but this time the picture came all weird, pixelized, and jumpy! I didn't change any other settings. This just keeps getting weirder and weirder. If I can actually GET a small m2v file I will gladly post it, thank you Manono. But, it looks like I'm accelerating faster and faster down the Rabbit Hole...

    Let me see if I can at least get what I had before so I can post it. I DID post a snippet of the m2ts file where I used DGIndex for the encode of the entire film. But, I will keep trying here to see what the heck I'm doing...
    Quote Quote  
  27. Originally Posted by Lathe View Post
    I'm thinking by now that this is yet ANOTHER weird encode from another dimension
    Mixed hard and soft pulldown are quite common. In fact, I'd go as far as to say it's the most common. But most of the time the majority is one and only a small portion is another. Sometimes the studio logo might be hard telecined but the main movie is soft telecined. Or some black frames at the start of the movie are hard telecined and the main movie is soft telecined. Or vice versa.

    I suggest you clean up your working folder so it has only the files your currently working on. This will prevent you from accidentally loading the wrong file, etc. So start with just the m2v file. Use DgIndex to mark a section and build a d2v file for it. Make a new script to load the d2v file. Add TFM() and TDecimate() (or whatever you're going to test). Check the script by opening it with VirtualDub and scrubbing through it. Once you're satisfied the script is working and delivering what you want encode it with whatever encoder you're using...
    Quote Quote  
  28. Member Lathe's Avatar
    Join Date
    Nov 2007
    Location
    Sunny Southern California
    Search Comp PM
    Originally Posted by jagabo View Post
    Originally Posted by Lathe View Post
    I'm thinking by now that this is yet ANOTHER weird encode from another dimension
    Mixed hard and soft pulldown are quite common. In fact, I'd go as far as to say it's the most common. But most of the time the majority is one and only a small portion is another. Sometimes the studio logo might be hard telecined but the main movie is soft telecined. Or some black frames at the start of the movie are hard telecined and the main movie is soft telecined. Or vice versa.

    I suggest you clean up your working folder so it has only the files your currently working on. This will prevent you from accidentally loading the wrong file, etc. So start with just the m2v file. Use DgIndex to mark a section and build a d2v file for it. Make a new script to load the d2v file. Add TFM() and TDecimate() (or whatever you're going to test). Check the script by opening it with VirtualDub and scrubbing through it. Once you're satisfied the script is working and delivering what you want encode it with whatever encoder you're using...
    Okay. I am pretty much keeping only the .avs, MKV, and resulting DGIndex files in this working folder and nothing else. I will try that again as you say.

    BTW, in my plugins folder I also have other forms of DGDecode.dll I have the one that ends in 'IM' and 'NV' and 3 associated files with each one: .exe & .ini & .html Should I delete these...?
    Quote Quote  
  29. Member Lathe's Avatar
    Join Date
    Nov 2007
    Location
    Sunny Southern California
    Search Comp PM
    Great... now DGIndex will only process about 25% of the file and it just stops... Heh... seriously, I'm thinking that this movie is just frigg'n jinxed or something
    Quote Quote  
  30. Member Lathe's Avatar
    Join Date
    Nov 2007
    Location
    Sunny Southern California
    Search Comp PM
    Well, jagaboo, if this is a mixture then, should I just go ahead and run it through MeGUI and accept and TRY to use it's IVTC code with the 'hybrid 1' included as it suggested? I can't see how it could come out any worse...
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!