VideoHelp Forum




+ Reply to Thread
Results 1 to 15 of 15
  1. Member
    Join Date
    Jan 2006
    Location
    Australia
    Search Comp PM
    Hello everyone,
    I have searched the net and this forum for clear information on these settings, then I tested a few settings
    but keep ending up with the same result,
    The footage appears to be great until there is allot of motion or substantial scene change.

    I'm trying to re-encode some family guy episodes into mpeg4
    the original files are xvid L1 BVOP, 976kbps 576x432.
    The target is a mpeg4 512x384 video file.

    I'd like to start with some education.
    I know what GOP is about but I dont know the following.

    1)Motion search Range
    2)Motion estimation subpel mod
    3)Quantization I and P picture

    Here is a sample frame of what I'm talking about.


    and here are my settings






    any help understanding what is going on here would be appreciated, thanks
    Quote Quote  
  2. you can't recover the bits that are already gone. get the dvds and start from there.
    Quote Quote  
  3. Member
    Join Date
    Jan 2006
    Location
    Australia
    Search Comp PM
    Hi minidv2dvd, the xvid rips are perfect quality, the lost is within these settings somewhere.
    Like usual, I've lent my dvd's to my brother inlaw and have not seen them since!

    any help with these setting would be appreciated, in the mean time.. I'm still trying
    Quote Quote  
  4. minidv2dvd is correct, get a better source. But you can improve some settings

    Do you have any restrictions for playback (i.e. device)? or is this for PC play only

    set profile to high, increase the average bitrate (500 is quite low if you're using a crappy xvid source), increase reference frame count to 4 or 5, entropy cabac, and if anything your bitrate is wasted on 160kbps audio, you could get away with lowering it to below 100, and pump up the video bitrate by that much you save on audio.

    You might try denoising the clip beforehand, this can reduce the crappy xvid artifacts significantly and lower your bitrate requirements

    Cheers
    Quote Quote  
  5. the bits lost in the first conversion to xvid is mostly in the motion of objects, each subsequent encode will further degrade any motion.

    what's the object of encoding xvid mp4 to another mp4?
    Quote Quote  
  6. Member
    Join Date
    Jan 2006
    Location
    Australia
    Search Comp PM
    Ok, I can see we must first establish motive..
    The reason for re-encoding is that the files are to be transfered to a Mac which will then put them on my iphone.

    Poisondeathray, could you explain what "reference frame count is/does aswell as entropy? understanding is better then just doing imo. cheers in advance!

    So my xvid copy's of my dvd's, which I've been so proud of for years because they playback perfectly are not as good as i thought?
    How can an xvid file playback the image with clarity in motion but still have "bits lost" which only reveal themselves on subsequent cross encodings?
    keep in mind if I burn these files back to dvd which I do occasionally they show no signs of this loss of quality?

    Sorry for all the questions people, just trying to gain an understanding.
    Quote Quote  
  7. How does the source frame compare to the frame you posted earlier? Assuming the source looked better, if the problem is only in the high motion and quick scene change areas increase the "max bitrate" setting.

    That GOP length (33 frames) is very short for h.264 encoding. Most encoders default to much higher values.
    Quote Quote  
  8. Poisondeathray, could you explain what "reference frame count is/does aswell as entropy? understanding is better then just doing imo. cheers in advance!
    In general, video compression works by referencing a keyframe (reference frame), and the differences between subsequent frames and that keyframe determine how "compressible" the video is. If you have a longer sequence (instead of 1) you should be able to get better compression, at the expense of higher cpu usage, encoding time etc.. and there are diminishing returns. CABAC and CAVLC are stream compression methods, you get better compression ~10-20% with CABAC, but higher cpu usage, and some lower quality devices cannot use it (e.g. ipod)


    So my xvid copy's of my dvd's, which I've been so proud of for years because they playback perfectly are not as good as i thought?
    How can an xvid file playback the image with clarity in motion but still have "bits lost" which only reveal themselves on subsequent cross encodings?
    keep in mind if I burn these files back to dvd which I do occasionally they show no signs of this loss of quality?
    wrong, they are far from perfect. Everytime you re-encode using a lossy codec makes the result worse and worse. Your goal to re-encode to transfer to a mac then re-encode is not very good. You should start with the highest quality source (e.g. blu-ray or at least DVD) then directly to your end format goal (e.g. ipod) . Every lossy step in between compounds and makes the image quality worse. In order to compensate, to keep almost the same "quality" (but still lower) you usually need to increase the bitrate, not decrease it, and here you have set the bitrate to 1/2 of the original...not a good idea...

    Xvid is notoriously bad for artifacting, especially on cartoons. The edges become noisy and you actually need much more bitrate, because the noise "eats up" bitrate, and there is little left over for the rest of the picture. Hence the suggestion to denoise or filter.
    Quote Quote  
  9. Member
    Join Date
    Jan 2006
    Location
    Australia
    Search Comp PM
    OK, I understand now.
    because of the lossy compression to xvid, the file has only retained the absolute least amount of information to retain a decent playback.

    In trying to encode with another lossy codec it is discarding detail again which is producing "more" noise which uses up the the bite rate.

    Also
    Reference frame count sounds like GOP, but i get I think I get it.

    What software do you guys use that allows you to denoise?

    I use to use Virtualdubmod but it couldn't load a friend's mkv file he made.
    it was avc made with mkvmerge?? so I moved on.

    Thanks everyone, I'm a little wiser now.

    So here is the plan,
    1) now knowing that there is noise which will take up biterate
    I'm going to increase the bit rate to = or < then the source file.

    2) In an effort to retain a small file size I'm going to choose a slightly smaller dimension, maybe 448x336.

    3) Again to keep file size under control I'm adjusting the reference frame up as well as my GOP setting.

    Here is a picture of the source frame.
    Quote Quote  
  10. What software do you guys use that allows you to denoise?
    I use avisynth filters, but TMPGenc should have some I would think. Even a light denoise will do wonders for bitrate requirements - although your xvid image "looks" fairly clean, if you zoom in you will see the edges are quite ragged if you compared this to the original source image. The encoder sees this as noise, and it gets worse and worse each generation

    When you activate "main" or "high" for the profile instead of "baseline", the b-frame option should now be "ungreyed" , I would set that to 2 or 3. b-frames are lower quality than I or P frames, but they tremendously improve compression

    I don't think you need to reduce the resolution, you can probably keep it the same. Most of the poor image quality from the 1st screenshot was from the relatively low bitrate and using "baseline" profile which doesn't allow for b-frames

    I advise against using this as an intermediate format for transfer to the mac, because you will suffer yet another generation loss when you re-encode later
    Quote Quote  
  11. I thought you said your source as 576x432? The source image you posted was ~512x384. In any case, give the before and after images you are losing much more quality than you should. Indeed recompressing with a lossy codec will only decrease the quality but you should be able to do much better than you are.

    The "max bitrate" setting controls how much bitrate the codec is allowed to use when changes between frames gets very large -- exactly where your problems are. Bumping the max up will allow those shots to get the bitrate they need -- at the expense of lower quality in the rest of the video. Exactly how much lower depends on the proportion of the video that is simple shots (low detail, low motion, low noise) verses complex (high detail, high motion, high noise) shots.

    Note the idea behind using lower quality in B frames is that they are only used in short bursts, 2 or 3 at a time. Then another P or I frame comes along and cleans the picture back up. You aren't supposed to notice that the picture was degraded for those short periods. I also don't like the idea of using higher quality for I frames than for P frames. This often leads to noticeable pulses where you get a nice sharp I frame image followed by several seconds of increasingly lower quality B and P frames, then a sudden shock back to a nice clean I frame again.

    I doubt the noise filters in TMPGEnc will do much for the DCT ringing artifacts unless you really crank them up. That may have a detrimental effect on the rest of the picture. Although cartoons generally don't have the small details that get washed away in real video. AviSynth's UnDot() filter might help.

    By the way, I recommend you use VirtualDubMod's Video -> Snapshot Input Frame and save as PNG (lossless) when posting samples. If you save as JPEG it's impossible to tell which artifacts were created by the JPEG compression and which were already in the video.
    Quote Quote  
  12. you lost me here -
    copy's of my dvd's
    if you have the dvds why not start over with the original source material?
    Quote Quote  
  13. Member
    Join Date
    Jan 2006
    Location
    Australia
    Search Comp PM
    Just to update this thread,
    I've already explained my dvd's were not easily available but I cracked the shits and drove the 50 min drive to pick up my dvds and then drove back home for 50 mins and ripped the orignal C**ts.

    I'm not one to be defeated though, so I pushed on.
    I converted the the xvid files to mpeg1 VBR 4k-8k and ended up with a perfect reproduction at 350mb.
    I think, as was said before a higher bite rate was needed to control the noise the compression was causing.

    I'm going to try and encode the mpeg1's to the .mp4 format to see what I can acheive.

    This is now for interest sake and learning, I'll let you know how I go
    Quote Quote  
  14. Member
    Join Date
    Jan 2006
    Location
    Australia
    Search Comp PM
    I'm using just a short segment (the part that involves the screen cap) atm
    So I can work with high bite rates.
    I've gone back to virtualdub as advised.
    The H264 codec has alot more optional selections then what tmpgenc was giving.

    How come codec's are the only software that when you hover a mouse of their options they have nothing to suggest? your just expected to know..

    anyone care to explain this mess or link me to some educational material?
    Quote Quote  
  15. Actually I wouldn't use vdub and x264, it uses the vfw version. If you have to use it, at least use the version that is recent, not 2 years old like the one in your screenshot

    http://sourceforge.net/projects/x264vfw/

    If you want a front end for the CLI version of x264 (officially supported, not limited to avi container problems), you can use xvid4psp, ripbot264, megui, handbrake etc....Besides if you were to transfer this to a MAC as you intended to do, h.264 in avi will cause great difficulties. Most of the programs have adjustable presets to make life easier. MeGUI has some anime presets which are better for cartoons (lower psy-rd and AQ settings, higher b-frames)
    Quote Quote  



Similar Threads

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