Log in

View Full Version : having problem, maybe avisynth related


FoxRacR17
25th August 2008, 04:57
I have some hd h264 mkv files that I am trying to convert for use on my xbox360. I have done the process tons of times on xp, and now I am on vista x64 and running into a problem. Some mkv files will convert just fine using WMCmd.vbs and an .avs file. However other mkvs will cause WMCmd.vbs to just hang, and at first I thought it was WMCmd.vbs, but I noticed that when I launched the encoding script that the haali icon would appear next to the clock for a second, and then just disappear like something closed it, so I am assuming this caused WMCmd to hang. I used mediainfo to see what the difference is between the files that do encode fine and the ones which do not and the only different thing I am noticing is that the MKVs that have a ReFrames setting of 4 will work fine, but any other ReFrame number causes things to stop working.

here is the nonworking one
General
Complete name : D:\video.mkv
Format : Matroska
File size : 10.1 GiB
Duration : 2h 1mn
Overall bit rate : 12.0 Mbps
Encoded date : UTC 2008-08-25 02:59:18
Writing application : mkvmerge v2.2.0 ('Turn It On Again') built on Mar 4 2008 12:58:26
Writing library : libebml v0.7.7 + libmatroska v0.8.1

Video
Format : AVC
Format/Info : Advanced Video Codec
Format profile : High@L4.1
Format settings, CABAC : Yes
Format settings, ReFrames : 8 frames
Codec ID : V_MPEG4/ISO/AVC
Duration : 2h 1mn
Bit rate : 9 950 Kbps
Nominal bit rate : 10.5 Mbps
Width : 1 920 pixels
Height : 1 040 pixels
Display aspect ratio : 16/9
Frame rate : 23.976 fps
Resolution : 24 bits
Colorimetry : 4:2:0
Scan type : Progressive
Bits/(Pixel*Frame) : 0.218
Writing library : x264 core 56 svn-680
Encoding settings : cabac=1 / ref=5 / deblock=1:0:0 / analyse=0x3:0x133 / me=umh / subme=5 / brdo=0 / mixed_ref=1 / me_range=16 / chroma_me=1 / trellis=1 / 8x8dct=1 / cqm=2 / deadzone=4,6 / chroma_qp_offset=0 / threads=3 / nr=0 / decimate=1 / mbaff=0 / bframes=3 / b_pyramid=1 / b_adapt=1 / b_bias=0 / direct=3 / wpredb=1 / bime=1 / keyint=250 / keyint_min=25 / scenecut=40(pre) / rc=2pass / bitrate=10457 / ratetol=1.0 / rceq='blurCplx^(1-qComp)' / qcomp=0.60 / qpmin=10 / qpmax=51 / qpstep=4 / cplxblur=20.0 / qblur=0.5 / ip_ratio=1.40 / pb_ratio=1.30 / zones=166636,174356,b=0.15 / aq=1:0.3:15.0

Audio
Format : DTS
Format/Info : Digital Theater Systems
Codec ID : A_DTS
Duration : 2h 1mn
Bit rate mode : Constant
Bit rate : 1 536 Kbps
Channel(s) : 6 channels
Channel positions : Front: L C R, Surround: L R, LFE
Sampling rate : 48.0 KHz
Resolution : 24 bits


and a working MKV
General
Complete name : D:\Working.mkv
Format : Matroska
File size : 11.2 GiB
Duration : 1h 50mn
Overall bit rate : 14.6 Mbps
Encoded date : UTC 2008-08-18 18:29:13
Writing application : mkvmerge v2.2.0 ('Turn It On Again') built on Mar 4 2008 12:58:26
Writing library : libebml v0.7.7 + libmatroska v0.8.1

Video
Format : AVC
Format/Info : Advanced Video Codec
Format profile : High@L4.1
Format settings, CABAC : Yes
Format settings, ReFrames : 4 frames
Codec ID : V_MPEG4/ISO/AVC
Duration : 1h 50mn
Bit rate : 12.5 Mbps
Width : 1 920 pixels
Height : 800 pixels
Display aspect ratio : 2.400
Frame rate : 23.976 fps
Resolution : 24 bits
Colorimetry : 4:2:0
Scan type : Progressive
Title : x264 - crf encode
Writing library : x264 core 61 r937M d994e0b
Encoding settings : cabac=1 / ref=4 / deblock=1:-3:-3 / analyse=0x3:0x113 / me=umh / subme=7 / psy_rd=1.0:0.0 / brdo=1 / mixed_ref=1 / me_range=16 / chroma_me=1 / trellis=0 / 8x8dct=1 / cqm=0 / deadzone=6,4 / chroma_qp_offset=-2 / threads=3 / nr=0 / decimate=0 / mbaff=0 / bframes=3 / b_pyramid=1 / b_adapt=1 / b_bias=0 / direct=1 / wpredb=1 / bime=1 / keyint=250 / keyint_min=25 / scenecut=40(pre) / rc=crf / crf=21.0 / rceq='blurCplx^(1-qComp)' / qcomp=1.00 / qpmin=10 / qpmax=51 / qpstep=4 / vbv_maxrate=38000 / vbv_bufsize=30000 / ip_ratio=1.40 / pb_ratio=1.30 / aq=2:1.00
Language : English

Audio
Format : DTS
Format/Info : Digital Theater Systems
Codec ID : A_DTS
Duration : 1h 50mn
Bit rate mode : Constant
Bit rate : 1 536 Kbps
Channel(s) : 6 channels
Channel positions : Front: L C R, Surround: L R, LFE
Sampling rate : 48.0 KHz
Resolution : 24 bits
Title : DTS - 1536 kbit/sec
Language : English

Text
Format : UTF-8
Codec ID : S_TEXT/UTF8
Codec ID/Info : UTF-8 Plain Text
Language : English




Now the weird thing is that if I just bypass the .avs script all together, and just tell WMCmd.vbs to directly open the .mkv file it will work no matter what. I would just do this to encode but there are certain filters that I need to run on the video through avisynth. Anyone have a solution?

Guest
25th August 2008, 05:15
the only different thing I am noticing is that the MKVs that have a ReFrames setting of 4 will work fine, but any other ReFrame number causes things to stop working So use a setting of 4 when you make your MKVs. What is the problem?

FoxRacR17
25th August 2008, 05:30
I was wondering why that setting of 4 is causing this behavior.

EDIT: I also figure that this could possible be a bug since if I directly load the troublesome .mkv into WMCmd.vbs haali opens up and the encode goes fine. Some I am lead to believe it is something to do with Avisynth.

IanB
25th August 2008, 07:38
... vista x64 ...You are probably exhausting the 2Gb address space for a 32Bit process. We have increased the default cache size to 50% of available free ram. On X64 platforms this can easily be largish. The next release candidate will return to the old default of 25% and also be capped at 512Mb.

Add SetMemoryMax(256) to the top of your .AVS scripts.

Zep
25th August 2008, 09:14
You are probably exhausting the 2Gb address space for a 32Bit process. We have increased the default cache size to 50% of available free ram. On X64 platforms this can easily be largish. The next release candidate will return to the old default of 25% and also be capped at 512Mb.

Add SetMemoryMax(256) to the top of your .AVS scripts.

what does 2.5.7 default to? 25% or 50%


What is that a % of

1) total physical ram installed? (which is 4 gigs on my box)
2) amount of the physical ram XP 32 truly uses and has access too. (which is 3.2 gigs on my box)
3) or of the 2Gb address space for a 32Bit process

heck even 25% of #3 seems a bit much. :)

Why is SetMemoryMax static? I would think it would grow or shrink based on available free ram at script run time.

[P]ako
25th August 2008, 16:48
Out of curiosity, Why did you encode the newest mkv with an older version than the one you used to encode the older mkv?

General
Complete name : D:\video.mkv
Format : Matroska
File size : 10.1 GiB
Duration : 2h 1mn
Overall bit rate : 12.0 Mbps
Encoded date : UTC 2008-08-25 02:59:18
Writing library : x264 core 56 svn-680

==================================

General
Complete name : D:\Working.mkv
Format : Matroska
File size : 11.2 GiB
Duration : 1h 50mn
Overall bit rate : 14.6 Mbps
Encoded date : UTC 2008-08-18 18:29:13
Title : x264 - crf encode
Writing library : x264 core 61 r937M d994e0b

I don't think the version of the codec matters. But if I were you, I would re-encode the non-working files with the same version of the codec and the same settings as the working file.

FoxRacR17
25th August 2008, 18:40
Thanks for trying to help guys. I tried adding the memorymax thing at the beginning of the script but the haali icon still disappears when i load the avs in WMCmd. But this time it appeared one more time, then disappeared again. And about that version thing [P]ako, the non working one is actually older, but it was a L5.1 and the working one was L4.1 so I thought that might be whats going on, and I demuxed the .h264 and .dts tracks, then used binreplace to change the heading to L4.1 and then I remuxed them back together but It still doesnt work.

Also I am running the latest beta of 2.5.8, and have CoreAVC 1.7.0.0 set as the system default decoder.

FoxRacR17
25th August 2008, 19:11
Wow, just found a way to make it work with these troublesome MKVs. I simply added "start /low" at the begging of my WMCmd.vbs script so the base priority of the encoding script would not be set to "normal". At first I thought it didnt work because the haali icon disappeared, but then it came back and stayed and the encoding started. I guess this is how I will have to encode these files.

EDIT: Just out of curiosity I tried putting "start /normal" and it even works fine then, but if i take out that command at the begging of the encoding script everything hangs, this is weird, but I least I figured out how to get it to work. So maybe it wasnt avisynth related, but perhaps WMCmd.vbs related, who knows. But thanks for trying to help guys.