VideoHelp Forum
+ Reply to Thread
Page 1 of 2
1 2 LastLast
Results 1 to 30 of 42
Thread
  1. Hi guys,
    I've been spending days trying to convert a captured MPEG2 video with a .mp2 audio file (MPEG audio version 1, layer 2, which MediaInfo says is CBR although I'm not completely sure about that), with no success in getting synchronized videos. The audio synchronism is getting lost progressively, but not in the same way all the time, since I've even tried to change the video fps to get the synch back (even if I have to interpolate) and I can get some scenes synchronized but not all of them. I'm just getting crazy with that, I don't know what else can I do. I've read there are many problems synching VBR audios, so I thought that could be my problem.
    It looks like I have this sync problems after creating the DGIndex, since when I open it I loose this synchronism. I'm not very good with avisynth, so one of the scripts I've used is:

    video=DGDecode_mpeg2source("Cinta num 3.d2v", info=3)
    audio=MPASource("Cinta num 3 3 Tc0 L2 2ch 48 224 DELAY 0ms.mp2", normalize = false)
    audiodub(video,audio)

    Before doing that, I was converting this mp2 file to wav and then add it in virtualdub/virtualdubmod, but also without luck.

    I've also tried many options in DGIndex. Again, no luck. Also there are some threads here talking about that, but I could not solve my problem with them. That might also be because many of this threads start with AVI videos, and I have to use first this DGIndex file that looses my synchronism.

    Can anyone help me with that? I'll really appreciate it, since really need to convert that and I don't know what else to do

    Thanks!!
    Last edited by mahonni; 31st Mar 2011 at 20:07. Reason: some extra info
    Quote Quote  
  2. I'm a MEGA Super Moderator Baldrick's Avatar
    Join Date
    Aug 2000
    Location
    Sweden
    Search Comp PM
    Is the source mpeg2 video okey? If so try "repair" it with the quick stream fix in videoredo.
    Quote Quote  
  3. Member hech54's Avatar
    Join Date
    Jul 2001
    Location
    Yank in Europe
    Search PM
    Originally Posted by mahonni View Post
    I'm not very good with avisynth
    Then stop using it.

    You are converting MPEG2 clips to xvid or divx?
    Drag the video clip into VirtualDub or AviDemux and output to whatever you need. Don't over-complicate things.
    Quote Quote  
  4. Originally Posted by Baldrick View Post
    Is the source mpeg2 video okey? If so try "repair" it with the quick stream fix in videoredo.
    Impressive, Baldrick, I was totally hopeless and now you made my week . I had tried many many tools to fix this file, all options in DGIndex and almost everything, but not Videoredo. Great tool, I wasn't expecting to solve it that fast!

    Thanks again for that!!


    Originally Posted by hech54 View Post
    Originally Posted by mahonni View Post
    I'm not very good with avisynth
    Then stop using it.

    You are converting MPEG2 clips to xvid or divx?
    Drag the video clip into VirtualDub or AviDemux and output to whatever you need. Don't over-complicate things.
    Thank you for your advise, but I had already tried that with no success.

    I needed Avisynth at least to load the indexed mpg file in Virtualdub, since it doesn't accept mpg2. I'm not very good with it, but spending a lot of time I was able to adjust color, levels, remove some dirt and noise and stabilize the image, which is all I want to do to repair my old Video8 captures. I only know how to do that with Avisynth, so I needed to use it. The only problems were the sync issues, which were also not fixed with AviDemux, even trying all the fixing options I found there.

    The fix tool in Videoredo worked perfectly, and now all programs can encode without synchronizing problems
    Quote Quote  
  5. Member hech54's Avatar
    Join Date
    Jul 2001
    Location
    Yank in Europe
    Search PM
    Originally Posted by mahonni View Post
    i needed avisynth at least to load the indexed mpg file in virtualdub, since it doesn't accept mpg2.
    wrong.
    Quote Quote  
  6. You don't need any external tool, you can open MPEG-2 directly in VirtualDub + MPEG-2 input plugin.

    The latest version of VirtualDub support every version of MPEG audio and it support also VBR audio.
    Codec Toolbox RS (A tool to read/change merit of codecs and many other things)
    Quote Quote  
  7. Originally Posted by hech54 View Post
    Originally Posted by mahonni View Post
    i needed avisynth at least to load the indexed mpg file in virtualdub, since it doesn't accept mpg2.
    wrong.
    Originally Posted by ale5000 View Post
    You don't need any external tool, you can open MPEG-2 directly in VirtualDub + MPEG-2 input plugin.

    The latest version of VirtualDub support every version of MPEG audio and it support also VBR audio.
    Thanks for noting that, I was aware of an old version that had this MPEG compatibility, but it gave me problems with long movies, saying it was out of memory and I thought there was no solution to that. Now, with this plugin I can open it perfectly.

    I still need to first fix the movie with videoredo before opening it with virtualdub if I don't want to have sync problems.
    Quote Quote  
  8. You don't need an external tool, but beware vdub doesn't handle interlaced mpeg2 chroma ideally (unless you use avisynth as input) - interlaced chroma bug. Vdubmod handles interlaced mpeg2 better
    Quote Quote  
  9. Originally Posted by poisondeathray View Post
    You don't need an external tool, but beware vdub doesn't handle interlaced mpeg2 chroma ideally (unless you use avisynth as input) - interlaced chroma bug. Vdubmod handles interlaced mpeg2 better
    Thanks, I'll keep that in mind. In fact, I was checking that right now, since I wasn't sure what was the Avisynth's ColorMatrix changing.
    Quote Quote  
  10. Originally Posted by mahonni View Post
    Originally Posted by poisondeathray View Post
    You don't need an external tool, but beware vdub doesn't handle interlaced mpeg2 chroma ideally (unless you use avisynth as input) - interlaced chroma bug. Vdubmod handles interlaced mpeg2 better
    Thanks, I'll keep that in mind. In fact, I was checking that right now, since I wasn't sure what was the Avisynth's ColorMatrix changing.

    You should be fine, since you are using mpeg2source . The comment was directed at the above posters

    It's not a colormatrix issue, it's an interlaced chroma issue . Jagabo has explained / illustrated it in several threads
    https://forum.videohelp.com/threads/316415-Check-Over-My-Options-From-DVD-to-XviD-Conve...65#post1958565

    another non-anime example
    https://forum.videohelp.com/threads/322848-Scripts-and-filters-for-an-Opera-(sample-vid...=1#post2000643
    Quote Quote  
  11. Originally Posted by poisondeathray View Post
    You should be fine, since you are using mpeg2source . The comment was directed at the above posters

    It's not a colormatrix issue, it's an interlaced chroma issue . Jagabo has explained / illustrated it in several threads
    https://forum.videohelp.com/threads/316415-Check-Over-My-Options-From-DVD-to-XviD-Conve...65#post1958565

    another non-anime example
    https://forum.videohelp.com/threads/322848-Scripts-and-filters-for-an-Opera-(sample-vid...=1#post2000643
    Great, thanks for clearing it up
    Quote Quote  
  12. Originally Posted by poisondeathray View Post
    You don't need an external tool, but beware vdub doesn't handle interlaced mpeg2 chroma ideally (unless you use avisynth as input) - interlaced chroma bug. Vdubmod handles interlaced mpeg2 better
    Does the bug still happens with the latest version of VirtualDub?
    Does it happens also when opening the file directly or only by feed interlaced YV12 from AviSynth?
    (I'm talking only about VirtualDub because VirtualDubMod is dead)
    Codec Toolbox RS (A tool to read/change merit of codecs and many other things)
    Quote Quote  
  13. Originally Posted by ale5000 View Post
    Originally Posted by poisondeathray View Post
    You don't need an external tool, but beware vdub doesn't handle interlaced mpeg2 chroma ideally (unless you use avisynth as input) - interlaced chroma bug. Vdubmod handles interlaced mpeg2 better
    Does the bug still happens with the latest version of VirtualDub?
    Does it happens also when opening the file directly or only by feed interlaced YV12 from AviSynth?
    (I'm talking only about VirtualDub because VirtualDubMod is dead)

    yes it still occurs when opening interlaced mpeg2 4:2:0 directly , the author is aware. It's not a "bug" technically - he's doing it correctly according to fourcc YV12 specs and many programs handle interlaced 4:2:0 content like that - by the book. Avidemux does too , as do many retail programs. Because technically, YV12 is a progressive format only.

    no it doesn't occur with interlaced YV12 when feeding though avisynth and dgdecode.dll, because the issue is with the mpeg2 decoder

    EDIT: ^sorry this is not correct , the issue is with vdub's interlaced YV12 => RGB conversion, not the decoder
    Last edited by poisondeathray; 3rd Apr 2011 at 14:04.
    Quote Quote  
  14. Originally Posted by poisondeathray View Post
    no it doesn't occur with interlaced YV12 when feeding though avisynth and dgdecode.dll
    In the first link you posted I see: "But if you feed it interlaced YV12 from AviSynth it will not be handled correctly"

    Originally Posted by poisondeathray View Post
    because the issue is with the mpeg2 decoder
    Do you refer to VirtualDub-MPEG2 or VirtualDub + MPEG2 input plugin?
    It is different.
    Also do this happen with interlaced MPEG1?

    PS: Do you have a small example file with the problem easily visible?

    PS2: The latest test version (1.10.1 test 7) of VirtualDub support a lot more color depths =>
    Last edited by ale5000; 3rd Apr 2011 at 15:39.
    Codec Toolbox RS (A tool to read/change merit of codecs and many other things)
    Quote Quote  
  15. yes, it's been reported many times over the years . Do a search, this topic comes up every month or so. Avery Lee is aware, and technically is correct according to fourcc (even though it looks bad) , so I understand his reasoning , even though many will disagree , but few will argue with observations of the end results.

    in the 2nd link is a mpeg2 file you can download to test for yourself (red guitar on a blue shirt)

    vdub-mpeg2 works fine, as does vdubmod for direct interlaced mpeg2 input. The issue is with vdub + mpeg2 input plugin and interlaced mpeg2 video. I don't know about interlaced mpeg1 , but I suspect it's the same

    "But if you feed it interlaced YV12 from AviSynth it will not be handled correctly"
    In the 1st post this was referring to vdubmod

    I haven't tested with the latest beta/test version with the different chroma positions in your last screenshot, only the stable versions. If there are options for chroma placement in that beta version, that might "fix" it.
    Last edited by poisondeathray; 3rd Apr 2011 at 13:19.
    Quote Quote  
  16. The test version is here: http://forums.virtualdub.org/index.php?act=ST&f=15&t=19755
    There is Video => Color Depth => Other

    If the problem is in the MPEG-2 decoder, then it should be reported to the author of the decoder (fccHandler) and not to the author of VirtualDub (Avery Lee).
    Or I'm missing something?
    Codec Toolbox RS (A tool to read/change merit of codecs and many other things)
    Quote Quote  
  17. They both are aware . They argue it's not a problem. . And "technically" they are correct. This is not a new issue. It comes up every month or so... for at least 2-3 years... do a search


    I took a quick look and the "problem" still exists with 1.10 beta with various color depth selections.

    You can test it for yourself. Open that test video in the 2nd link, side by side with vdub & vdubmod , or with vdub + avisynth
    Last edited by poisondeathray; 3rd Apr 2011 at 13:34.
    Quote Quote  
  18. It would be interesting to see if it happen also with the internal mpeg-1 import filter (instead of a separate input plugin) of VirtualDub but it need someone posting an interlaced mpeg1 video.

    PS: You can use both the internal MPEG-1 import filter and the MPEG-2 input plugin to open MPEG-1 videos.
    Codec Toolbox RS (A tool to read/change merit of codecs and many other things)
    Quote Quote  
  19. Sorry I should clarify i made a mistake: this issue is not the import decoder specifically, but the way vdub handles the interlaced YV12=>RGB conversion , the way it upsamples the chroma . This affects when you look at the display or use filters (because converted to RGB for display or using filters). Vdubmod and vdubmpeg2 handle the upsampling and chroma placement differently

    In avisynth, you can specify the matrix (pc vs. rec, 601 vs.709) and whether or not it' s interlaced or not . The interlaced sampling is what we are talking about here

    e.g.
    MPEG2Source()
    ConvertToRGB(matrix="rec601", interlaced=true)

    I can make an interlaced MPEG1 test video if you want, but I suspect it will be the same . Remember this isn't unique to vdub, it happens with a lot of other programs
    Quote Quote  
  20. I'm mainly interested in VirtualDub, not in other programs.

    Since in the latest test version you can specify rec601 interlaced if the problem still happen then it is a bug.
    Or I'm wrong?
    Codec Toolbox RS (A tool to read/change merit of codecs and many other things)
    Quote Quote  
  21. it is not a "bug", technically

    it's "chroma upsampling error" or CUE - google it, it's discussed frequently

    if you do the RGB conversion in avisynth, specifing it's interlaced, the "error" does not occur. If you let vdub do the RGB conversion, error occurs

    The "error" I'm talking about "CUE" is the ugly notching along color borders

    This is because interlaced YV12 is upsampled to RGB as progressive (instead of interlaced) , because YV12 according to the specs , is progressiveonly. Whenever you do interlaced sampled as progressive, or progressive sampled as interlaced, you get CUE


    Since in the latest test version you can specify rec601 interlaced if the problem still happen then it is a bug.
    Or I'm wrong?
    If the beta vdub had an "interlaced RGB conversion" option, that might provide the same chroma upsampling as avisynth's RGB conversion, but it doesn't in that list

    rec601/709 has nothing to do with the interlaced vs. progressive sampling. This specifies the coefficients for YUV<=>RGB conversions (the math equations)





    To re-iterate, the issue is with vdub's handling of interlaced YV12 (so it can be anything interlaced YV12, not just MPEG2). It upsamples the chroma as progressive, so you get CUE
    Last edited by poisondeathray; 3rd Apr 2011 at 14:35.
    Quote Quote  
  22. Originally Posted by poisondeathray View Post
    If the beta vdub had an "interlaced RGB conversion" option, that might provide the same chroma upsampling as avisynth's RGB conversion, but it doesn't in that list
    There are elements in the list with "chroma postion: interlaced".
    Codec Toolbox RS (A tool to read/change merit of codecs and many other things)
    Quote Quote  
  23. Originally Posted by ale5000 View Post
    Originally Posted by poisondeathray View Post
    If the beta vdub had an "interlaced RGB conversion" option, that might provide the same chroma upsampling as avisynth's RGB conversion, but it doesn't in that list
    There are elements in the list with "chroma postion: interlaced".
    It doesn't have an interlaced RGB option . YCbCr is the same colorspace (Y'CbCr is the digital equivalent of YUV, for all intents and purposes they refer to same thing). CUE only occurs when there is upsampling error (interlaced YV12 4:2:0 upsampled to RGB 4:4:4 as progressive, not interlaced , or vice-versa: progressive YV12 upsampled as interlaced)

    Since FourCC specifies YV12 as progressive only....that's where the problem occurs. Vdub upsamples it as progressive for everything, even interlaced content
    Quote Quote  
  24. Look at the second image, altough it isn't completely equal to VirtualDubMod, the upsampling error doesn't happen.
    VirtualDubMod:

    VirtualDub 1.10.1 - YCbCr (Rec.601) - Range Limited - 4:2:0 - interlaced:

    VirtualDub 1.10.1 - Autoselect:
    Codec Toolbox RS (A tool to read/change merit of codecs and many other things)
    Quote Quote  
  25. im getting completely different results than you ; I cannot replicate your 2nd screenshot with vdub

    I had been using 1.10 , not 1.10.1 as in your download link, but I check that version and it doesn't make a difference, it's still sampled incorrectly


    vdub 1.10.1 YCbCr/limited/601/4:2:0/interlaced



    vdubmod



    EDIT: ok i see, try a different frame, like scrub to 113 or 114 and you'll see the difference. The frame you chose didn't show differences as much
    Last edited by poisondeathray; 3rd Apr 2011 at 15:15.
    Quote Quote  
  26. Try like this:

    Options => Preferences => Display => Disable "Use DirectX overlay surfaces".
    (test-2) Defaults: DirectX hardware video overlays are now disabled by default to avoid color space issues and driver bugs.
    Select Video => Color Depth
    Then Decompression format => Other... => YCbCr (Rec.601) Limited 4:2:0 interlaced
    Then Output format => Same as decompression format

    Now open the video in VirtualDub.
    Codec Toolbox RS (A tool to read/change merit of codecs and many other things)
    Quote Quote  
  27. I usually have DirectX disabled in vdub anyways, and it was disabled already in the beta version

    No difference.

    Check frame 113 or 114, can you see the difference?
    Quote Quote  
  28. I don't know why it isn't working for you but I still get correct results with frame 113 and 114.
    Have you changed the color depth before (and not after) opening the video in VirtualDub?
    Codec Toolbox RS (A tool to read/change merit of codecs and many other things)
    Quote Quote  
  29. It's producing a grey screen now (no picture)

    If I change color depth to autoselect, and reopen file, it works as before (still b0rked chroma)

    Even if i save as default, close & restart application

    I'm using: MPEG2 Plugin Version 4.0 (August 14, 2010), VirtualDub-1.10.1-test7

    Maybe something else setup differently ? I tested on 3 different computers
    Last edited by poisondeathray; 3rd Apr 2011 at 15:46.
    Quote Quote  
  30. "It's producing a grey screen", then press play and stop, now you can move from one frame to another correctly.

    So now the bugs are:
    - Autodetect doesn't work correctly
    - With some color depth it start with grey video until you press play
    - It cannot change color depth when the video is already opened in some cases
    Codec Toolbox RS (A tool to read/change merit of codecs and many other things)
    Quote Quote  



Similar Threads

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