VideoHelp Forum
+ Reply to Thread
Results 1 to 28 of 28
Thread
  1. Member
    Join Date
    Mar 2011
    Location
    Brisbane Australia
    Search PM
    Hey I did a forum search but could not find a resolution to my problem, I hope this is the right place to post and that some one can help.

    I have just recently converted to Megui form handbrake is to simplistic although i do not understand most of the options in Megui.

    I am trying to rip some dvds for my mother of an old English comedy dads army, but cannot seem to get the output to resemble the input when using anamorphic encoding in MeGui

    The source is detected as 4:3(ITU 4:3 PAL (1.367521) which is correct the source is 4:3, i then precede to do an auto crop which is as follows (12, 2, -12, -2), the next step its to turn on anamorphic mod 16 which drops the width to 704. This i do not understand as 720 - 24 is not 704. I am also not able to up the resolution past 704 either.

    I encode the video and the resolution comes out as 704 x 576 which bigger and i have mange to get it small then the source material albeit marginal but i want it as true as possible. I have used anamorphic on MeGUI with no problems on 4:3 material.

    I ran the same file though handbrake with the same cropping and it set to strict anamorphic, it reports the DAR to be 747 x 574 and when previewed it looks perfect.

    I really am not sure what i am doing wrong Handbrake seems to have more control on anamorphic at least that does not require a scrip which i am not 100% sure how to do.

    i have included a sample of what i am working on if some one could take a look. http://www.mediafire.com/?945p0saja7lxc7v
    Quote Quote  
  2. If handbrake fills your needs, why not stick to handbrake ? Megui is probably the most difficult GUI


    For megui, you can edit the script in the script editor, the last tab. You can scale past 704 or whatever you want

    If you still want to pursue megui, post your log file and a sample of the source
    Quote Quote  
  3. Ok , I just downloaded the file. If that was the handbrake encode (that's what it says in the metadata) , it's not cropped. 704x576 with 8+8px L+R borders (this is common standard format, same as PAL DVD source)



    What you would do for megui is no resizing or cropping from the dvd source.

    You would set the SAR flag in the extra command line box --sar 12:11

    Alternatively, you can just encode it (same, without cropping or resizing, and with out --sar x:y) and set the DAR flag in mkvtoolnix
    Quote Quote  
  4. Member
    Join Date
    Mar 2011
    Location
    Brisbane Australia
    Search PM
    Hey thanks for the reply, yes the sample you downloaded is the non anamorphic non resized version of the source material made in handbrake. So i am not to crop, resize or turn on anamorphic for this encode ? also i hate to ask where abouts is the extra command line box i did a quick search and some one said it was the zones section in megui.

    Also i could you explain why we would be using 12:11 ? and i assume i am unable to get rid of the black bars ? When i encoded anamorphicly in hand brake i ended up with a resolution of 697 x 572 but DAR of 1.298.
    Quote Quote  
  5. Originally Posted by leftspeaker2000 View Post
    Hey thanks for the reply, yes the sample you downloaded is the non anamorphic non resized version of the source material made in handbrake. So i am not to crop, resize or turn on anamorphic for this encode ? also i hate to ask where abouts is the extra command line box i did a quick search and some one said it was the zones section in megui.

    Also i could you explain why we would be using 12:11 ? and i assume i am unable to get rid of the black bars ? When i encoded anamorphicly in hand brake i ended up with a resolution of 697 x 572 but DAR of 1.298.
    There is a command line box (I think it' s on the last tab, I'm going by memory here) when you modify the the encoding configuration. You might have to checkmark the advanced settings box . If you cant' find it, I'll have a look



    *sometimes the acronyms are different, have different names, but the math is the same

    DAR = FAR x SAR

    Display Aspect Ratio = Frame Aspect Ratio x Sample Aspect Ratio

    Sometimes SAR is called PAR (or pixel aspect ratio) , but with MPEG4 it's supposed to be called "SAR"

    AR = (width:height of frame dimensions) x (width:height of pixels)
    4:3 = (704:576) x (12:11)


    *704x576 is used instead of 720x576, because that is the active image area. Recall there is pillarboxing

    If you wanted to base your calculation on full frame , you would use --sar 16:15

    This assumes that the original source was done correctly (sometimes it isn't). What you should do is find an known object like a circle, a tire, a round clock, and examine/measure it . But most people don't care about 1% AR error

    Cropping the pillarbox borders wouldn't affect this calculation in this specific case, but 704x576 isn't SD blu-ray compatible (eg. if you wanted to go to BD some time in the future) , also black borders don't "cost" much in terms of bitrate, as long as they are clean.
    Last edited by poisondeathray; 11th Jan 2012 at 20:32.
    Quote Quote  
  6. Member
    Join Date
    Mar 2011
    Location
    Brisbane Australia
    Search PM
    Apprenlty you are unable to set the SAR in Megui according to this http://en.wikibooks.org/wiki/MeGUI/Aspect_Ratio_Signalling_in_AviSynth_Scripts but then i have seen other people talking about it. I tried adding it to the scrip section but it did not work.
    Quote Quote  
  7. Click image for larger version

Name:	1.jpg
Views:	1658
Size:	56.1 KB
ID:	10488

    Add it in the encoder settings, not the script . Hold on, I'll have a look and post a screenshot
    Quote Quote  
  8. Member
    Join Date
    Mar 2011
    Location
    Brisbane Australia
    Search PM
    I owe you a beer, you were 100% right. I ran an encode with out anamorphic encoding, resizing or cropping and it came out perfectly. I am rather confused now about everything as it was hard enough to originally get my head around anamorphic encoding. If i was to remove the 8+8 black bars with cropping would that mean i would need to use a different SAR and Anamorphic encoding ?. Can you suggest any recommend reading on this subject but its rather interesting but daunting at first. If there was a thank you button on here you would be getting many thankyous. !
    Quote Quote  
  9. Originally Posted by leftspeaker2000 View Post
    I owe you a beer, you were 100% right. I ran an encode with out anamorphic encoding, resizing or cropping and it came out perfectly. I am rather confused now about everything as it was hard enough to originally get my head around anamorphic encoding. If i was to remove the 8+8 black bars with cropping would that mean i would need to use a different SAR and Anamorphic encoding ?. Can you suggest any recommend reading on this subject but its rather interesting but daunting at first. If there was a thank you button on here you would be getting many thankyous. !

    No, if you look at the math equations above (I know, math...ewwww) , it won't affect you in this specific case, because you are basing the calculation on the 704 px width

    So you can crop if you want, everything else is the same
    crop(8,0,-8,0)
    Quote Quote  
  10. Member
    Join Date
    Mar 2011
    Location
    Brisbane Australia
    Search PM
    Thanks for being patient and spending the time to reply to my questions i will have to do some more reading on the matter and hopefully i will get the hang of it soon .
    Quote Quote  
  11. I don't know of any good guides that cover it all, but there are some basic guides at doom9 (some of them might be outdated).

    http://www.doom9.org/index.html
    http://forum.doom9.org/

    This one is heavy
    http://lipas.uwasa.fi/~f76998/video/conversion/

    But beware is a lot of controversy and different ways of doing aspect ratio calculations - there is not necessarily 1 "correct" way to do it. Different sanctioning bodies have different interpretations. There are ITU, non-ITU interpretations , some organizations have specific requirements e.g. BBC does it a very specific way and has guidelines
    Quote Quote  
  12. Member
    Join Date
    Mar 2011
    Location
    Brisbane Australia
    Search PM
    Yeah it would appear everyone has something else to say, talking about doom9 i posted on there but most of the time they wont give you the time of day.
    Quote Quote  
  13. Also beware, that different players, hardware can display differently as well. Some follow ITU, some non-ITU

    My opinion is this : I don't care (and most people don't) if there is 1% AR error. But some people are very perceptive to small changes. So those people should actually discard all guidelines and measure the actual source on their display hardware of choice as mentioned above
    Quote Quote  
  14. Originally Posted by leftspeaker2000 View Post
    If i was to remove the 8+8 black bars with cropping would that mean i would need to use a different SAR and Anamorphic encoding ?
    It's very simple: SAR (in h.264) is the shape of individual pixels. The fact that you are cropping part of the frame doesn't change the shape of individual pixels, just the shape of the entire frame.
    Quote Quote  
  15. Member
    Join Date
    Mar 2011
    Location
    Brisbane Australia
    Search PM
    Is this have something to do with TVs using rectangular pixels as compared to computer monitors using square ?
    Quote Quote  
  16. Analog TV signals have no pixels. On the vertical axis there are 480 separate scan lines (at least, that's what's typically captured) so it makes sense to have 480 pixels in the vertical dimension. But the horizontal axis is a continuous wave form. It can be captured with as much or as little detail as you want. The front surface of the TV does have a shape, a 4:3 aspect ratio. So whatever frame size you capture needs to be adjusted to that aspect ratio for display. Some common frame sizes for NTSC video capture:

    704x480 (BT.601 "D1" studio standard)
    640x480 (square pixel 4:3)
    544x480 (common for cable/sat broadcast)
    480x480 (SVCD)
    352x480 (Half D1)

    In order for 704x480 and 352x480 both to contain a 4:3 image the pixels in the latter must be twice as wide as the pixels in the former. The general equation (using h.264 terminology) is:

    Code:
    DAR = FAR * SAR
    
    DAR = display aspect ratio, the final shape of the picture you see
    FAR = frame aspect ratio, the frame dimensions
    SAR = sample aspect ratio, the shape of individual pixels
    For example:

    Code:
    DAR = FAR * SAR
    4:3 = 704:480 * SAR
    4/3 = 704/480 * SAR
    4/3 * 480/704 = SAR
    1920 / 2112 = SAR
    10 / 11 = SAR
    10:11 = SAR
    Quote Quote  
  17. Member
    Join Date
    Mar 2011
    Location
    Brisbane Australia
    Search PM
    hey thanks very much for that jagabo it was very informative i now know where the 10:11 comes from
    Quote Quote  
  18. But you're in PAL land, 10:11 usually won't apply to you

    NTSC 4:3 => sar 10:11 (or 8:9)
    NTSC 16:9 => sar 40:33 (or 32:27)
    PAL 4:3 => sar 12:11 (or 16:15)
    PAL 16:9 => sar 16:11 (or 64:45)


    The 1st set of values refer are based on 704px width, the 2nd are based 720px width . You can plug them into the equation and see that they solve the equation
    Quote Quote  
  19. Member
    Join Date
    Mar 2011
    Location
    Brisbane Australia
    Search PM
    Hey guys i am a little bit confused again if i have a dvd that is NTSC 720*480 1.85 and requires 40 cropping from the width so 680 do i have to calculate a new SAR ?
    Quote Quote  
  20. Member
    Join Date
    Mar 2011
    Location
    Brisbane Australia
    Search PM
    okay i think i know what is throwing me now when i encode using no anamorphic and an sar of 32:27 the picture is the right size and the resultion is 678 which makes sense with the cropping but with an anamorphic encode with sar 32:27 and the same cropping the resolution goes to 688. I assume this is why the anamorpic Sar encode is slightly bigger ?
    Quote Quote  
  21. Originally Posted by leftspeaker2000 View Post
    Hey guys i am a little bit confused again if i have a dvd that is NTSC 720*480 1.85 and requires 40 cropping from the width so 680 do i have to calculate a new SAR ?
    Take a piece of graph paper. Color each box (pixel) to make a picture. Now cut off the edges of the paper (crop the frame). What has happened to the shape of the pixels (SAR) that are left? Nothing. The SAR is the same.
    Quote Quote  
  22. Member
    Join Date
    Mar 2011
    Location
    Brisbane Australia
    Search PM
    Hey thanks for the clarification again, i kinda understand what i am doing although every time i try to copy a tv show or movie the aspect just comes out weird and i am not sure what i am doing. For instance i am copying an episode of Entourage which is 16:9 and a f2.35 full frame. MeGui detects it as ITU 1.823 and it crops 8 and 6 so i assume it is 704 so i set to 16:11 but the height is off and it automatic changes the size to 706 although i did not tick anamorphic or resize.

    This is the video i did in handbreak with no resize cropping or anamorphic. http://www.mediafire.com/?ndf4fv8d69p7hht
    Quote Quote  
  23. Mmg will let you set the display aspect ratio at the container level.

    Also, that video is a progressive NTSC source converted to PAL with field blending. If you leave it that way you should encode interlaced. If you want to go all out you can convert back to progressive NTSC frames and remove most of the field blending with AviSynth. Then encode progressive.

    Code:
    ffMpegSource2("original.mkv") 
    Yadif(mode=1, order=1)
    SRestore()
    Sample attached.

    I just noticed that the frame rate of your sample was VBR and it came out of ffmpeg2source as ~23.5 fps. Going back to the original source would work a little better.
    Image Attached Files
    Last edited by jagabo; 27th Jan 2012 at 08:25.
    Quote Quote  
  24. Member
    Join Date
    Mar 2011
    Location
    Brisbane Australia
    Search PM
    Hey thanks for your reply you have been a big help.

    I took your advice and simply did cropping with MeGui and then set the aspect ratio in MKVmerge although it stretched it to the full 16:9 with out the 8+8 but im pretty sure with a simple DAR calculation i could fix that but i don't see any need. The dvds are pal and MeGui detects it the same, the source is heavily interlaced with it being detected as top feild first and to deinterlace with yadif like you suggested. When i play the ending encode the frame rate seems a little bit jittery is this just a result of deinterlacing, SRestore will this help and how do i implement it ?



    Yadif(order=1)
    crop( 6, 2, -6, -4)
    SRestore()
    #resize
    #denoise

    ?
    Quote Quote  
  25. You should use Yadif(order=1, mode=1) to get double frame rate output. Then SRestore() will have more to work with. Make sure the output of Yadif() is 50 fps, and output of SRestore() is 23.976 fps.
    Quote Quote  
  26. Member
    Join Date
    Mar 2011
    Location
    Brisbane Australia
    Search PM
    Thanks for the reply,it would appear that megui does not have Srestore function as when i add it to the script it gives me an error. I thought if i downloaded the Srestore.avsi and placed it in the same folder as the video i was working with it would work but i still get the same error. Any suggestions ?
    Quote Quote  
  27. Member
    Join Date
    Mar 2011
    Location
    Brisbane Australia
    Search PM
    okay so i added it to the plugins section of avisynth then i get another error saying "sript error there is no function named "mt_makedif" i asusme this is another script but where do i get it from ? http://avisynth.org/mediawiki/Srestore says your require 4 things but when i download what it says they are not .avsi and im not to sure where to put them
    Quote Quote  
  28. You put all the dll files in AviSynth's plugins folder. I usually put the docs there too for easy access.
    Quote Quote  



Similar Threads

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