VideoHelp Forum




+ Reply to Thread
Results 1 to 9 of 9
  1. I'm trying to re-encode some anime into smaller file sizes using megui (takes about 150mb off them) and i'm happy with the result aside from one thing

    The color seems to be changed slightly.

    I've tried using the same settings to encode as the original (with a little higher crf for the smaller file size) only difference is i can't seem to figure out how to get me=hex on megui

    original
    Code:
    Encoding settings           : cabac=1 / ref=3 / deblock=1:0:0 / analyse=0x3:0x113 / me=hex / subme=7 / psy=1 / psy_rd=1.00:0.00 / mixed_ref=1 / me_range=16 / chroma_me=1 / trellis=1 / 8x8dct=1 / cqm=0 / deadzone=21,11 / fast_pskip=1 / chroma_qp_offset=-2 / threads=3 / lookahead_threads=1 / sliced_threads=0 / nr=0 / decimate=1 / interlaced=0 / bluray_compat=0 / constrained_intra=0 / bframes=3 / b_pyramid=2 / b_adapt=1 / b_bias=0 / direct=1 / weightb=1 / open_gop=0 / weightp=2 / keyint=240 / keyint_min=23 / scenecut=40 / intra_refresh=0 / rc_lookahead=40 / rc=crf / mbtree=1 / crf=16.0 / qcomp=0.60 / qpmin=0 / qpmax=81 / qpstep=4 / ip_ratio=1.40 / aq=1:1.00
    re-encode
    Code:
    Encoding settings           : cabac=1 / ref=3 / deblock=1:0:0 / analyse=0x3:0x113 / me=umh / subme=7 / psy=1 / psy_rd=1.00:0.00 / mixed_ref=1 / me_range=16 / chroma_me=1 / trellis=1 / 8x8dct=1 / cqm=0 / deadzone=21,11 / fast_pskip=1 / chroma_qp_offset=-2 / threads=6 / lookahead_threads=1 / sliced_threads=0 / nr=0 / decimate=1 / interlaced=0 / bluray_compat=0 / constrained_intra=0 / bframes=3 / b_pyramid=2 / b_adapt=1 / b_bias=0 / direct=1 / weightb=1 / open_gop=0 / weightp=2 / keyint=240 / keyint_min=23 / scenecut=40 / intra_refresh=0 / rc_lookahead=40 / rc=crf / mbtree=1 / crf=19.0 / qcomp=0.60 / qpmin=0 / qpmax=81 / qpstep=4 / ip_ratio=1.40 / aq=1:1.00
    Heres screenshot of the before and after.

    original
    http://s3.postimg.org/pjypplw9d/original.png

    re-encode
    http://s3.postimg.org/70fty7n9t/encode.png

    Is there some type of filter i need to use to keep the same color?
    Quote Quote  
  2. It might be the decoding rather than the encoding causing a colour difference. How are you decoding (post your script) and have you tried a different method?

    I don't quite understand the "using the same settings" idea. Why not use settings that might also compress more efficiently, given the object of the excercise is to reduce the file size? I'd try the default x264 settings and the animation tuning. Either medium or slow speed preset. The animation tuning increases the number of B and Ref frames, and uses deblock=1:1:1 and --aq-strength 0.6. I think that's it. I assume the idea is to spend less bits on fine detail given animation has large blocks of flat colour. You might want to run an encode using the animation tuning at the same CRF value to compare the result. I don't encode much animation, so maybe someone else will have a better idea.

    You can find the M.E. Algorithm under the Analysis tab in the x264 encoder configuration. Hexagon is the default. The original encoder settings look much like the x264 defaults.
    Quote Quote  
  3. Well i'm using the one click encoder and i don't see a way to change how that decodes (except for audio)

    I was using different settings at the beginning (the defaults of one of the presets), i was just trying to see if those were causing it to change the color.
    Quote Quote  
  4. My only other guess would be maybe the source is 10 bit and it's being decoded as 8 bit (which would be normal). Even if you're using the 10 bit x264 encoder, the Avisynth output would still be 8 bit. I haven't worked with much 10 bit video myself so I don't know if that's likely to change the colours or luminance levels at all.

    I don't use the OneClick encoder myself but all the required info should be in MeGUI's log file including the script it creates for encoding. The details of the source file should be there too, otherwise you could get them with MediaInfo and post them.

    I very much doubt it's encoder settings as such, but without more detail, or a sample of the source video might be even better, it's hard know.
    Quote Quote  
  5. Thinking about it, "qpmax=81" sounds like the default for the 10 bit encoder (for the 8 bit encoder it's "qpmax=69"), so maybe I'm on the right track and it's the 10 bit to 8 bit conversion when decoding that's causing the slight colour difference.

    I don't think there's any way to keep the whole process 10 bit when using MeGUI. There's a couple of versions of ffms2 that'll decode 10 bit video as 10 bit (I'd guess MeGUI is using ffms2 to index the video and FFVideoSource in the script to decode it), but Avisynth is natively 8 bit and the version of ffms2 MeGUI uses would output 8 bit, so in order to decode as 10 bit, output 10 bit and re-encode as 10 bit you'd need to create script and send it to the encoder via the commanline "manually". Assuming that's the problem.....

    Unless there's an encoder GUI I'm not aware of that's capable re-encoding 10 bit video without any 8 bit conversion in between.
    Quote Quote  
  6. Unless there's an encoder GUI I'm not aware of that's capable re-encoding 10 bit video without any 8 bit conversion in between.
    If you don't use Avisynth, Hybrid should be able to stay in 10bit, assuming it's properly configured.
    Both ffmpeg should be able to stay inside 10bit and not do any 8bit conversion.
    Example command lines used:
    Code:
    ffmpeg -y -loglevel fatal -threads 8 -r 25000/1000 -i "F:\TestClips&Co\MPEG-4 H.264\x264_10bit_sample.mkv" -map 0:0 -an -sn -vsync 0 -r 25000/1000 -pix_fmt yuv420p10le -f rawvideo - | x265-16bit --pmode --pme --input - --input-depth 10 --input-res 1280x672 --fps 25 --profile main10 --no-high-tier --no-open-gop --cu-lossless --colormatrix bt709 --output "H:\Temp\Intro Clip_x264_10bit rate control fail_10_01_49_4110_01.265"
    afaik. this should stay at 4:2:0 10bit little endian the whole time.
    But be warned: 'HEVC Range Extension specifications are not finalized'
    So using HEVC with anything other than 4:2:0 atm. might produce non standard compliant files.

    -----

    Do both files have the same VUI flags?
    Last edited by Selur; 7th Jan 2015 at 05:10. Reason: added "HEVC Range Extension specifications are not finalized"-note
    users currently on my ignore list: deadrats, Stears555, marcorocchini
    Quote Quote  
  7. well i tried encoding the file into 10bit with xvid4psp and there was no color difference.

    So has to be some setting in megui somewhere i think.
    Quote Quote  
  8. So has to be some setting in megui somewhere i think.
    Probably.

    Since you didn't post much infos:
    1. How about a detailed MediaInfo analysis of:
      1. the orginal
      2. the MeGui reencode
      3. the Xvid4PSP reencode
      ?
    2. Are the VUI infos identical?
    3. Are the color matrices used identical?
    4. What avisynth scripts have been used?
    5. How about small samples of the original, the megui reencode, the Xvid4PSP reencode?
    + Not to forget: How are you comparing the images? (May be two media players open at the same time and using different video renderers?)

    Cu Selur
    users currently on my ignore list: deadrats, Stears555, marcorocchini
    Quote Quote  
  9. Originally Posted by Tylerr View Post
    well i tried encoding the file into 10bit with xvid4psp and there was no color difference.

    So has to be some setting in megui somewhere i think.
    Well, given all the info you've provided and the effort you've put into helping others help you, I'd go with that...... and just use xvid4psp.
    Last edited by hello_hello; 7th Jan 2015 at 07:37.
    Quote Quote  
Visit our sponsor! Try DVDFab and backup Blu-rays!