View Full Version : need help on x264 block problem
volence
14th September 2007, 03:23
I got an anime dvd and want to encode it to x264 video, but I got terrible block in dark area. When previewing the avs, there's not any block, but when after encoded, there are blocks. I don't konw what's the problem.
I've tried 2pass, bitrate from 1300 to 2000, but the block is almost the same. Then I added "--aq-strength 0.5 --aq-sensitivity 5", seems a little better, but still blocks.
Since the source is a little noisy, I used deen to denoise, so I wonder whether it's the deen's problem. But I removed the deen operation, the block is even worse.
I wonder if it's the decoder's problem? I use ffdshow to decode, but I haven't found where to set the deblock option.
I enabled the deblocking option and set it to 0:0, b-frames is 3.My x264 command line is
--pass 2 --bitrate 2000 --stats "E:\264.stat" --ref 5 --mixed-refs --no-fast-pskip --bframes 3
--b-pyramid --b-rdo --bime --weightb --direct auto --subme 7 --trellis 1 --analyse all --8x8dct
--vbv-maxrate 25000 --ratetol 4.0 --me umh --merange 20 --threads 2 --thread-input --progress
--no-dct-decimate --no-psnr --no-ssim --output "" "" --aq-strength 0.5 --aq-sensitivity 5
I just follow the meGUI's AE-MaxQuality profile and made a little change. The command line above is copied from meGUI's setting dialogue.
I wonder if I can get some advice here, thanks.
P.S. I want to post some snapshot, but the album I usualy use is down now.Is there any other place to place picture?
Sagekilla
14th September 2007, 03:28
Are you previewing the AVS using Media Player Classic?
You can try adding in the the command for TV --> PC color levels in the Avisynth script, like so: ColorYUV(levels="TV->PC")
For me, this COMPLETELY eliminates all blocking issues and seems to be a "truer" representation of colors.
volence
14th September 2007, 03:32
I preview it using VirtualDubMod.
I used DGIndex to generate .d2v file and load it in avs. I think DGIndex can prevent the color scale problem?
Dark Shikari
14th September 2007, 03:36
Can you post a small clip of the source, and a small clip of your encoded source? Use Mediafire if you don't have a place to host the videos.
Guest
14th September 2007, 03:36
I think DGIndex can prevent the color scale problem? The TV/PC Scale option in DGIndex is effective only when serving through VFAPI. You have to do it in your Avisynth script.
Sagekilla
14th September 2007, 03:37
Not sure, I haven't delved too deeply into DGIndex, but when using that filter I posted above VLC appears to have richer colors since it's using the PC scale for my computer monitor, rather then the (more limited) TV scale.
You can probably tell just by playing a DVD using VLC media player, since during pure black scenes, the "Black" in the movie will appear to be lighter then the black bordering your monitor has.
@neuron2: Usage of the TV --> PC scale is correct when the end media files are intended to be used on PC, right?
Guest
14th September 2007, 03:42
Usage of the TV --> PC scale is correct when the end media files are intended to be used on PC, right? Yes, and if the original 0-255 scale was compressed for TV.
volence
14th September 2007, 03:45
@Sagekilla
I've tried to add ColorYUV(levels="TV->PC") to my avs and the block is much much better, thanks a lot! But my new quetions is in what situation should I add such an opetation?
@neuron2
same quesiont as Sagekilla, the TV/PC scale is when to use?
Alosaurus
14th September 2007, 04:01
@neuron2
same quesiont as Sagekilla, the TV/PC scale is when to use?
As he said, it's only effective when using VFAPI. You aren't using VFAPI.
The TV/PC Scale option in DGIndex is effective only when serving through VFAPI.
Sagekilla
14th September 2007, 04:02
@Sagekilla
I've tried to add ColorYUV(levels="TV->PC") to my avs and the block is much much better, thanks a lot! But my new quetions is in what situation should I add such an opetation?
@neuron2
same quesiont as Sagekilla, the TV/PC scale is when to use?
Uhm, like Neuron just said if it was compressed from PC 0-255 to the TV (I believe it's 12-243 range) scale then you can safely use the ColorYUV operation. I'm willing to bet most (if not all) movies use this TV scale and can be safely converted to PC scale -IF- they are to be viewed on the computer. Otherwise if destined for output to a TV, I think you should avoid using this.
Please correct me (anyone) if I'm wrong!
Edit: To add on to what I said, if you are using a source that is 0-255 scale already such as fraps capture or a rendered movie with the original 24-bit stills (the Elephants Dream stills for example), don't use the Color YUV at all.
volence
14th September 2007, 04:08
Oh, I see. Thanks a lot.
But another quesiont is how to konw whether my source is PC or TV scale? Can any tools help me to view it or any other method?
Dark Shikari
14th September 2007, 04:10
Oh, I see. Thanks a lot.
But another quesiont is how to konw whether my source is in PC sclae or TV sclae? Can any tools help me to view it or any other method?
Play it in full screen mode. Unless it exactly matches your screen aspect rato, there will be black bars on the top and bottom. If that black is the exact same color as the black in the video, its PC scale. If that black is much darker than the darkest parts of the video, its TV scale.
volence
14th September 2007, 04:19
Play it in full screen mode. Unless it exactly matches your screen aspect rato, there will be black bars on the top and bottom. If that black is the exact same color as the black in the video, its PC scale. If that black is much darker than the darkest parts of the video, its TV scale.
Oh, thanks. But use what player to play it? Put the disc in my dvd-rom and open mediaplayer classic to select File->Open DVD will be OK? Or should I play the vob or the avs?
Dark Shikari
14th September 2007, 04:19
Oh, thanks. But use what player to play it? Put the disc in my dvd-rom and open mediaplayer classic to select File->Open DVD will be OK? Or should I play the vob or the avs?Play the AVS.
volence
14th September 2007, 04:25
Play the AVS.
I tried this and found that the black is almost the same.
Is that mean my source is already PC Scale? Then I should not use ColorYUV to change color scale? Then what's the porblem of the block...
I still doubt if it's my decoder's problem, can anyone tell me where to set the ffdshow deblocking option?
Alosaurus
14th September 2007, 04:48
Here's a simple rule: If you are ripping something off of TV or from a commercial home video source (DVD, VHS, etc) it will be using TV scale.
volence
14th September 2007, 05:10
When I tried to get a snapshot I found a strange problem. When I'm watching the video, there's heavily block, but when I get a snapshot use media player classic and look at the bmp, there's no block! Can anyone tell me why?
Dark Shikari
14th September 2007, 05:10
When I tried to get a snapshot I found a strange problem. When I'm watching the video, there's heavily block, but when I get a snapshot use media player classic and look at the bmp, there's no block! Can anyone tell me why?
Can you post a sample of your encoded video?
volence
14th September 2007, 05:18
Can you post a sample of your encoded video?
You mean the video file? I wonder if this can be uploaded as attchment here...let's try.
Dark Shikari
14th September 2007, 05:37
You mean the video file? I wonder if this can be uploaded as attchment here...let's try.
Attachments have to be approved here, try something like Mediafire.
volence
14th September 2007, 06:10
It seems the attachment can be downloaded now?
Dark Shikari
14th September 2007, 06:11
It looks fine to me, I don't see any blocking.
foxyshadis
14th September 2007, 06:15
In my experience:
* If you're going to watch it on a CRT TV, or an LCD via analog input, don't touch it.
* If you're going to watch it on a LCD TV via digital input, consult your TV's documentation or make a test. Some do, some don't, some allow you to set it either way.
* If you're going to watch it on PC with overlay (aka directx) rendering, don't touch it, overlay performs the correction and will double-correct if you do it.
* If you're going to watch it with VMR7/9 or EVR, anything could happen. Since the conversion is in the drivers and driver writers seem to hate us, it changes every few versions. Resign yourself to frustration or force the decoder to do the RGB conversion, most will perform level expansion. (CoreAVC's is one of the few that be configured either way.)
* If you watch it with ogl/ogl2, I have no experience and no idea what happens, especially in linux.
volence
14th September 2007, 06:28
thanks. and I will play the video on my PC, using digtial input LCD. What configuration shall I do?
foxyshadis
14th September 2007, 06:46
If it's a TV, you have to find out how it outputs first. If it's a monitor, it will never perform any correction, either the player or the driver has to.
It's not an easy issue, and no matter what you do initially you'll probably have to put up with reconfiguring your player at some point anyway. Correcting up-front is the path of least resistance if you see yourself mainly watching on directshow players. My preference is to leave it alone and force RGB output instead, but it's a bit slower on playback.
A similar but less visible problem is the color primaries, which give you different colors in different modes. Generally most people who don't even have calibrated screens don't care though.
volence
14th September 2007, 08:31
Thank you very much, I'll check my configuration.
volence
14th September 2007, 12:31
I have a new problem...
I found that if I set the media player classic to play each video in a new window, then I open the same video twice, the first one will be blocking, and the second one will be non-blocking, and the color seems more bright. I wonder if it is the problem of DirectShow overlay? Has anyone met the same problem? And can anyone give me some advice? Thanks again.
SealTooGreat
14th September 2007, 14:41
#volence ... make sure that in h264 decoder deblocking is enabled. The way you have described the issue in your last post make me thinking that you have more than one h264 decoder on your system and one of them has inloop turned off.
volence
14th September 2007, 18:12
@SealTooGreat
I think I only have one h264 decoder, that is ffdshow-libvacodec, and the skip-deblocking option is not checked. I still wonder if it's the problem of dierctshow overlay but I don't konw how to confirm it. Anyhow, I'll try coreAVC tommorrow. Thanks for your advice.
Dark Shikari
14th September 2007, 18:14
@SealTooGreat
I think I only have one h264 decoder, that is ffdshow-libvacodec, and the skip-deblocking option is not checked. I still wonder if it's the problem of dierctshow overlay but I don't konw how to confirm it. Anyhow, I'll try coreAVC tommorrow. Thanks for your advice.Use the CCCP Insurgent ( http://www.cccp-project.net/ ) to run a Test Render on the file to see what H.264 decoder is being used.
volence
14th September 2007, 18:39
Use the CCCP Insurgent ( http://www.cccp-project.net/ ) to run a Test Render on the file to see what H.264 decoder is being used.
I'm sorry but how to run the "Test Render"?
Dark Shikari
14th September 2007, 18:41
I'm sorry but how to run the "Test Render"?
1. Open CCCP Insurgent.
2. Tools/Test Render.
3. Find the file, run the Test Render.
4. Paste the results here.
volence
14th September 2007, 18:53
1. Open CCCP Insurgent.
2. Tools/Test Render.
3. Find the file, run the Test Render.
4. Paste the results here.
Oh, I'm sorry that I downloaded the codec pack by mistake, not the insurgent. And I've installed the codec pack. The peoblem is the same. Now when I run the test render it asks me whether to use ffdshow. And chosen "use(only this time)", the result is
File: E:\RipTemp\DC\output01.mp4
Filter 0: Video Renderer
Filename: C:\WINDOWS\system32\quartz.dll
Filter CRC: 6BDF020C
Date: 2005-08-30 | 11:55:45
Filter 1: ffdshow Video Decoder
Filename: d:\Program Files\Combined Community Codec Pack\Filters\FFDShow\ffdshow.ax
Filter CRC: 180BD07F
Date: 2007-07-15 | 22:14:20
Filter 2: E:\RipTemp\DC\output01.mp4
Filename: d:\Program Files\Combined Community Codec Pack\Filters\Haali\splitter.ax
Filter CRC: F0B7BA09
Date: 2007-06-03 | 00:07:12
Note: For File CRC, use CRC Check from the Tools Menu!
Dark Shikari
14th September 2007, 18:57
Oh, I'm sorry that I downloaded the codec pack by mistake, not the insurgent. And I've installed the codec pack. The peoblem is the same. Now when I run the test render it asks me whether to use ffdshow. And chosen "use(only this time)", the result is
File: E:\RipTemp\DC\output01.mp4
Filter 0: Video Renderer
Filename: C:\WINDOWS\system32\quartz.dll
Filter CRC: 6BDF020C
Date: 2005-08-30 | 11:55:45
Filter 1: ffdshow Video Decoder
Filename: d:\Program Files\Combined Community Codec Pack\Filters\FFDShow\ffdshow.ax
Filter CRC: 180BD07F
Date: 2007-07-15 | 22:14:20
Filter 2: E:\RipTemp\DC\output01.mp4
Filename: d:\Program Files\Combined Community Codec Pack\Filters\Haali\splitter.ax
Filter CRC: F0B7BA09
Date: 2007-06-03 | 00:07:12
Note: For File CRC, use CRC Check from the Tools Menu!
I assume the lack of audio is intentional--if so that looks perfectly fine. Strange...
Sagekilla
14th September 2007, 20:10
To answer an earlier question: Media Player Classic will correctly convert from TV ---> PC levels. VLC and most other software players I've used will not do this.
Edit: This is why the source looks better in MPC than it does in VLC.
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.