File mismatch between x264 passes !

Bug report and feature request
Post Reply
Reynard
Beginner
Beginner
Posts: 2
Joined: Thu Apr 09, 2009 6:08 pm

File mismatch between x264 passes !

Post by Reynard » Thu Apr 09, 2009 7:05 pm

Hi there :)
I run into nasty program bug .... here is the situation :
I'm doing a transcode of a MPEG4/AVC file with .MKV conatiner to a lower bitrate (from 6100 kbps to about 3800 kbps) .... choosed x264 coder in 3-pass mode .... when the 2-nd pass begins, the x264 coder throws this error :

Code: Select all

MediaCoder Version 0.6.2 build 4275 (built on Feb 18 2009, 02:17:29)

MediaCoder is a free software distributed under MPL license.
(C)2005-08 Stanley Huang <stanleyhuangyc@gmail.com>. All Rights Reserved.

 (829Mhz)
Cores: 1  L1: 16KB  L2: 256KB  SIMD: MMX SSE
# ".\codecs\x264.exe" - 1280x544 --fps 25 --no-psnr --no-ssim --keyint 250 --min
-keyint 25 --level 40 --me esa --merange 19   --non-deterministic --subme 1 --re
f 1 --partitions all --8x8dct --bframes 4 --direct auto --trellis 1 --weightb --
bitrate 4096 --qcomp 0.6 --sar 1:1 --threads auto  --stats "K:\DOCUME~1\ADMINI~1
\LOCALS~1\Temp\mcpass700.log" --pass 1 -o NUL

x264 [info]: 1280x544 @ 25.00 fps
x264 [info]: using SAR=1/1
x264 [info]: using cpu capabilities: MMX2 Cache32
x264 [info]: profile High, level 4.0

# ".\codecs\x264.exe" - 1280x544 --fps 25 --no-psnr --no-ssim --keyint 250 --min
-keyint 25 --level 40 --me esa --merange 19   --non-deterministic --subme 1 --re
f 1 --partitions all --8x8dct --bframes 4 --direct auto --trellis 1 --weightb --
bitrate 4096 --qcomp 0.6 --sar 1:1 --threads auto  --stats "K:\DOCUME~1\ADMINI~1
\LOCALS~1\Temp\mcpass700.log" --pass 3 -o NUL

x264 [info]: 1280x544 @ 25.00 fps
x264 [info]: using SAR=1/1
x264 [info]: using cpu capabilities: MMX2 Cache32
x264 [error]: ratecontrol_init: can't open stats file
x264 [error]: x264_encoder_open failed
I've fond that there is a file named "mcpass700.log.temp" in the working folder of MediaCoder .... acording to what's in the console window, 2-nd pass looks for that file named "mcpass700.log" - i.e. without ".temp" suffix and naturally cannot find it ! During the 1-st pass, the statistics file created is named with ".temp" suffix .... perhaps some rename operation failed. I opened that statistics file and it looks qualified (to me :) ).
I've tried the operation several times with intermediate system restarts .... tried different working folders (not so deep in folder tree) .... but always got this error message.
I've guessed that statistics file name template is "mcpass<PID>.log" .... and will try to "workaround" the situation this way - while the 1-st pass is working (some three hours :lol: ) I'll paste in working folder adequately named file from previous attempt.
My system is Windows 2000 SP4 + Rollup, codecs - only CCCP-2008-09-21, Netscape 7.2.
I hope, this will be a "mutual" help .... :)

Kind regards,
Reynard

Reynard
Beginner
Beginner
Posts: 2
Joined: Thu Apr 09, 2009 6:08 pm

Re: File mismatch between x264 passes !

Post by Reynard » Wed Apr 15, 2009 1:37 am

.... the situation clarified itself .... Confusion was caused by having Source of type "File Stream" associated with .MKV input file . :shock: .... this led to premature (and/or abnormal) termination of first pass of x264 encoder .... leaving statistics file in working folder with .temp suffix (and much shorter than it should be) .... I guess, it's x264's responsibility to rename statistics file adequately .... Everything is working fine, now. :D

Hint : The workaround mentioned above, worked for me and helped me comprehend that something's wrong with statistics file .... :idea:

tormit
Beginner
Beginner
Posts: 1
Joined: Thu Jul 16, 2009 4:18 am

Re: File mismatch between x264 passes !

Post by tormit » Thu Jul 16, 2009 4:36 am

This bug still exists. Could you fix this?

This is not x264 bug, because MediaCoder sets the stats file name. I tried adding custom stats file name in x264 options, but it does not override the option set by MediaCoder.

Using MediaCoder 0.7.1.4475.

stanley
Site Admin
Site Admin
Posts: 4135
Joined: Mon May 15, 2006 7:43 pm
Location: Sydney

Re: File mismatch between x264 passes !

Post by stanley » Tue Jul 21, 2009 1:16 am

The .temp postfix is added by x264 and it will rename the file to eliminate .temp after the pass done. So you will see stat file without .temp postfix in 2nd pass.
When things work together, things work.

MMoudry
Beginner
Beginner
Posts: 2
Joined: Wed Apr 15, 2015 8:59 pm

Re: File mismatch between x264 passes !

Post by MMoudry » Mon Apr 20, 2015 2:06 am

Hello,
I have the same error in the latest version of MediaCoder with x265 :

Code: Select all

x265 [info]: Thread pool created using 12 threads
x265 [info]: frame threads / pool features       : 3 / wpp(17 rows)+pmode+pme
x265 [error]: unable to open file D:\MediaCoderWorkFolder\mctemp1430a57d3a7014f9.log
x265 [error]: failed to open encoder
The files is not renamed.... what did zou mean exactly by 'Filestream associated with mkv files'?

MM

Post Reply