View Full Version : Strange x264 bug
Kostarum Rex Persia
6th March 2006, 20:22
Hi guys, I want to ask devs about strange error in my x264 MP4 video, which is encoded in MeGUI, latest build.
Source is uncompressed AVI file( resolution 384x288, 75 MB, duration is 15 seconds), but I can't, of course,provide link to original source material.
Anyway, if you watch the file, you will notice huge error( white screen on 14 second position).
I used bitrate 200 kbps, ALL settings are used, slowest possible encoding. I tried to use faster settings, and result not change, same white screen is appearing.
With x264 VFW, this problem isn't there, everything is OK.
Link to file: http://rapidshare.de/files/14856980/video_1.mp4.html
Inventive Software
6th March 2006, 22:03
Make sure the CLI settings are the same as that of the VFW settings. It may show something up.
I take it the white screen is not there in the source material?
Sharktooth
6th March 2006, 23:36
Both VFW and CLI share the same "core"... so it's higly unlikely the problem is in CLI...
Caroliano
7th March 2006, 00:11
But the CLI use gpac to mux to Mp4, and IIRC it is not something very stable... try matroska output and see if it solve the problem.
Kostarum Rex Persia
7th March 2006, 00:38
@ Inventive Software
You are right, white screen isn't there in the source material. And AVS script look:
DirectShowSource("F:\Video.avi",fps=25,audio=false)
#deinterlace
#crop
BicubicResize(384,288,0,0.5)
ConvertToYV12()
In the meantime, I just finished encoding with SAME settings as before, and white ugly screen still appear. Have a look encoded MKV file at http://rapidshare.de/files/14876347/video.mkv.html
It's the apsolutely same file, with same settings as video_1.mp4, just without sound.
foxyshadis
7th March 2006, 00:48
Can you compress the source to huffyuv (ffdshow's is smallest) or lagarith, strip audio, and upload? And post your complete command line?
Kostarum Rex Persia
7th March 2006, 01:43
I will try today, when I get some free time. But, still, I don't think that huffyuv output be smaller then 45 MB. I have a dial-up conection, peoples, and that's main reason why I can't upload such a HUGE file on Rapidshare.
Probably my AVS script is bad, and if answer is yes, which settings I can change in AVS script.
Zero1
7th March 2006, 01:56
Clear out your AVIsynth plugins/filters directory. I've seen similar errors before like the CLI not giving progress info (a post by Quarkboy, I just can't get to it right now, typing on a mobile phone). Also saw another when his video would just skip and repeat (no, it wasn't a directshowsoure problem afaik)
foxyshadis
7th March 2006, 02:06
Easy way to find out if your avisynth is bad: Compress it to huffyuv, reopen it, and watch for crazy frame. If it's not in there it's x264's fault. However, if you fed the script to both vfw and cli, both should show, so it must be something going on in the cli. Your avs is so simple anyway that nothing should be wrong with it.
Again: Complete command line. Knowing which options were used helps narrow a problem down a lot. If you can remove options one at a time until it stops happening, and tell us which does it, that would be awesome too.
Kostarum Rex Persia
7th March 2006, 02:30
Like I said, I will try it later today, when I get some free time. You will be informed, don't worry.
Sharktooth
7th March 2006, 11:56
also what build and revision are you using?
Kostarum Rex Persia
7th March 2006, 16:46
I use MeGUI build 0.2.3.2106, x264 revision 457.
In te meantime, I encoded uncompressed AVI source in huffyuv 2.2.0, and file size is 28,6 MB. When I make new AVS script based on that file, and encoded in x264 MP4 format, I was suprised, because uglz white screen doesnćt exist any more.
AVS script look:
DirectShowSource("F:\video 1.avi",fps=25,audio=false)
#Not doing anything because the source is progressive
#crop
LanczosResize(384,288) # Lanczos (Sharp)
mergechroma(blur(1.3)) # Little Noise
I just added Little Noise, but result is the same even without Little Noise filter. No white screen any more.
So, my opinion is that MeGUI(or x264 CLI) can't handle very well uncompressed AVI source, and from some reason, MeGUI using ConvertToYV12() function when I try to make AVS scrips based on uncompressed AVI source.
Well, guys, can anyone tell me how to avoid that ugly white screen, if source is uncompressed AVI? Colorspace bug, or it's something else?
Link to MP4 file, encoded from huffyuv 2.2.0:
Complete command line: http://rapidshare.de/files/14921858/video1.mp4.html
E:\PROGRAMI\Divx kompresori\MeGUI\x264.exe --pass 2 --bitrate 2700 --stats ".stats" --ref 12 --mixed-refs --no-fast-pskip --bframes 3 --b-pyramid --b-rdo --bime --weightb --filter 3,3 --subme 6 --trellis 2 --analyse p8x8,b8x8,i4x4,p4x4 --direct auto --me umh --progress --no-psnr --output "E:\video1.mp4" "E:\video1.avs"
Sharktooth
7th March 2006, 16:54
Your opinion is wrong (regarding MeGUI). MeGUI doesnt process video. It only creates the avisynth script to pass to the encoder (x264 or other).
Also MeGUI adds ConvertToYV12() coz it's necessary.
Kostarum Rex Persia
7th March 2006, 16:59
Ok, but can you commit the patch which can handle much more inputs, as RGB and YUV2?
Sharktooth
7th March 2006, 17:02
it should be added to x264 but there's no point in adding that.
almost all codecs works with YV12.
avisynth already handles color space conversions. so add a ConvertToYV12() in the avisynth script if the source color space is different.
Kostarum Rex Persia
7th March 2006, 17:56
I already doing that conversion, Sharktooth. Have you downloaded the third file, video1.mp4.
What can you tell me, white screen isn't there, anymore.
Kostarum Rex Persia
7th March 2006, 17:56
Double post, Doom9, please delete this post
ChronoCross
7th March 2006, 19:37
how big(size) is your original .avi file? and the length of the video?
Kostarum Rex Persia
7th March 2006, 20:06
72 MB, and lenght or the video is 15 seconds.
sasam
7th March 2006, 20:32
Maybe you should try using avisource("F:\Video.avi") instead of DirectShowSource?
Does the white frame appear when you open your original avs script with uncompressed AVI in VirtualDub or mediaplayer?
ChronoCross
7th March 2006, 20:37
Maybe you should try using avisource("F:\Video.avi") instead of DirectShowSource?
oh god damnit I should have payed more attention. that is a great solution. for avi you should always use avisource. using the directshowsource to convert the fps is probably not a good idea.
see if using avisource fixes the issue.
sasam
7th March 2006, 20:54
I have some similar problems with opening .mp4 with directshowsource and using VDub...
There is something strange going on...Is it because x264 64b timestamps since rev389, avisynth directshowsource function or ffdshow decoder?
Who knows...:(
here (http://forum.doom9.org/showthread.php?t=107845)
Kostarum Rex Persia
8th March 2006, 01:53
Well, sasam, I try to use avisource, instead of DirectShowSource, but the result is even worser. You can see it yourself, if you download file from http://rapidshare.de/files/14960860/video_3.mp4.html
I used uncompressed AVI source, not Huffyuv source.
ChronoCross
8th March 2006, 02:16
Well, sasam, I try to use avisource, instead of DirectShowSource, but the result is even worser. You can see it yourself, if you download file from http://rapidshare.de/files/14960860/video_3.mp4.html
I used uncompressed AVI source, not Huffyuv source.
Thus far this problem doesn't make sense. the only way there could be an issue here is if the codec it's originally coded in is causing issues. Try encoding it without cropping and resizing.
Kostarum Rex Persia
8th March 2006, 02:44
It's not resize, resolution is original. And, not single frame is cropped, everything is same. It's the original resolution of uncompressed AVI source, because I manually set it in the recording program. My analogue TV card is Terratec Cynergy 600 TV.
ChronoCross
8th March 2006, 03:19
then why are you using
BicubicResize(384,288,0,0.5)
That is resizing. Try removing that line from the avs.
falcon2000eg
8th March 2006, 04:19
just use the very basic avisynth script
avisource("F:\Video.avi")
reinstall yuv codec
Kostarum Rex Persia
8th March 2006, 17:13
Line BicubicResize(384,288,0,0.5) was automatically created in AVS Script Creator from MeGUI. Original resolution of the uncompressed AVI source is 384x288, so I don't know why Script Creator made that line.
I removed resize line from AVS script, but result is same, nothing change at all.
ChronoCross
8th March 2006, 18:11
do you want me to be honest here? I think it's something your doing with the source that;s the problem. I have encoded 8 clips with no problems. I've even tried uncompressed RGB made in vdub.
your going to have to post the clip if you want any help. If it's illegal to post it then you should probably not be asking for help here. Cause at this point there is nothing else anyone can think of to help you.
sasam
8th March 2006, 18:38
You didn't answer my question:
Does the white frame appear when you open your original avs script with uncompressed AVI in VirtualDub or mediaplayer?
If the answer is yes than its got nothing to do with x264...and the problem is in decoder...
shon3i
8th March 2006, 18:58
You didn't answer my question:
Does the white frame appear when you open your original avs script with uncompressed AVI in VirtualDub or mediaplayer?
If the answer is yes than its got nothing to do with x264...and the problem is in decoder...
Yes i agree with you, can be problem in decoder beacouse he is says that encode video via wfw and VirtualDub/Xmpeg use RGB decoder, but avisynth use external YV12 and can be some other whrose decoder. Who knows what is decoding YV12 on his system. I reccomend only XviD as YV12 decompressor.
Kostarum Rex Persia
8th March 2006, 20:05
FFDSHOW 2005-12-21 is the only decoder on my system.
@ Chronocross
Please clarify your thoughts? I already said that I can't upload uncompressed AVI source, because I have a very slow dial-ip conection? In my town, ADSL doesn't exist at all, only in Serbian capital Belgrade.
I don't do anything with the uncompressed AVI source, I recorded AVI stream from my TV recording program, in resolution 384x288. TV recording program is WinVDR Pro 3.60 from site www.artech365.com
sasam
8th March 2006, 20:38
You said that it works for you when you encode to huffyuv...So use huffyuv in TV recording program or use mjpeg...both are very fast and lossless and you can record more with it...
ChronoReverse
9th March 2006, 00:26
So... when you open the AVS in vdub, does that white frame show up?
Kostarum Rex Persia
9th March 2006, 01:19
No, only when I compressed AVI source in x264 with MP4 container(and MKV also have that grey screen).
ChronoReverse
9th March 2006, 02:17
So have you tried other x264 builds and what about other clips with the same settings?
Kostarum Rex Persia
9th March 2006, 03:03
I use build 459, compiled by Chronocross. I tried builds from 451 to 459, but nothing change at all.
And I also tried official x264 build from pengvado, but result is same.
I don't try, yet, to encode other clips, but that's no problem. I will try tommorow to encode other AVI uncompressed clips.
Romario
9th March 2006, 03:35
That's really strange. When you finished new testings, Kostarum, post the results, please.
Kostarum Rex Persia
9th March 2006, 20:13
Here it is, I had tested encoding in x264 build 459, from totaly new AVI uncompressed sourse, and it seems that, now, everything is allright. Strange, perhaps previous sample isn't recorded well, who knows.
Link: http://rapidshare.de/files/15097699/kosta_2.mp4.html
P.S. Settings are same, as earlier.
bond
10th March 2006, 19:21
In te meantime, I encoded uncompressed AVI source in huffyuv 2.2.0, and file size is 28,6 MB. When I make new AVS script based on that file, and encoded in x264 MP4 format, I was suprised, because uglz white screen doesnćt exist any more.smells like an avisynth error
try uninstalling avisynth and reinstalling it :D
is the white frame also there when encoding to a raw avc stream (.264)?
Kostarum Rex Persia
10th March 2006, 19:48
I don't know, I must try that.
vBulletin® v3.8.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.