Log in

View Full Version : problem (bug?) using x264.exe 0.93.1538 bd72d46


bololo
16th April 2010, 07:08
Hello,

i would like to ask if this is a bug in x264 or a mistake i made (wich i dont think):
I converted several files from DivX6 to AVC using the same commandline. (Intension was reducing filesize and keeping quality)

Some files were converted strange they became really hughe.

Original filesize 1 GB, finished Filesize 3,6 GB (reduced Bitrate by 20%!!)

Original File:
General
Complete name : E:\Jotei ep04 (1280x720 DivX661).avi
Format : AVI
Format/Info : Audio Video Interleave
File size : 1.03 GiB
Duration : 46mn 24s
Overall bit rate : 3 177 Kbps
Writing library : This file was made by AviUtl 0.99.

Video
ID : 0
Format : MPEG-4 Visual
Format settings, BVOP : No
Format settings, QPel : No
Format settings, GMC : No warppoints
Format settings, Matrix : Default (H.263)
Codec ID : DX50
Codec ID/Hint : DivX 5
Duration : 46mn 24s
Bit rate : 3 038 Kbps
Width : 1 280 pixels
Height : 720 pixels
Display aspect ratio : 16:9
Frame rate : 29.970 fps
Resolution : 8 bits
Colorimetry : 4:2:0
Scan type : Progressive
Bits/(Pixel*Frame) : 0.110
Stream size : 1 008 MiB (96%)
Writing library : DivX 6.6.1.4

Audio
ID : 1
Format : MPEG Audio
Format version : Version 1
Format profile : Layer 3
Mode : Joint stereo
Format_Settings_ModeExtension : MS Stereo
Codec ID : 55
Codec ID/Hint : MP3
Duration : 46mn 24s
Bit rate mode : Constant
Bit rate : 128 Kbps
Channel(s) : 2 channels
Sampling rate : 48.0 KHz
Stream size : 42.5 MiB (4%)
Alignment : Split accross interleaves
Interleave, duration : 33 ms (1.00 video frame)
Interleave, preload duration : 15 ms

made Avisynthscript:
DirectShowSource("E:\Jotei ep04 (1280x720 DivX661).avi")
converted using following command
x264.exe --bitrate 2430 --profile high --level 4.1 --preset veryslow --tune film --threads auto --thread-input --videoformat ntsc --keyint 300 --min-keyint 30 --b-pyramid normal --output "E:\Jotei ep04 (1280x720 DivX661)_vid.mp4" "E:\Jotei ep04 (1280x720 DivX661).avs"

The resulting file is
General
Complete name : E:\Jotei ep04 (1280x720 DivX661).mkv
Format : Matroska
File size : 3.47 GiB
Duration : 46mn 24s
Overall bit rate : 10.7 Mbps
Encoded date : UTC 2010-04-15 18:44:29
Writing application : mkvmerge v3.2.0 ('Beginnings') gebaut am Mar 3 2010 00:43:45
Writing library : libebml v0.7.9 + libmatroska v0.8.1

Video
ID : 1
Format : AVC
Format/Info : Advanced Video Codec
Format profile : High@L4.1
Format settings, CABAC : Yes
Format settings, ReFrames : 9 frames
Muxing mode : Container profile=Unknown@4.1
Codec ID : V_MPEG4/ISO/AVC
Duration : 46mn 21s
Nominal bit rate : 2 430 Kbps
Width : 1 280 pixels
Height : 720 pixels
Display aspect ratio : 16:9
Frame rate : 29.970 fps
Standard : NTSC
Resolution : 8 bits
Colorimetry : 4:2:0
Scan type : Progressive
Bits/(Pixel*Frame) : 0.088
Writing library : x264 core 93 r1538 bd72d46
Encoding settings : cabac=1 / ref=9 / deblock=1:-1:-1 / analyse=0x3:0x133 / me=umh / subme=10 / psy=1 / psy_rd=1.00:0.15 / mixed_ref=1 / me_range=24 / chroma_me=1 / trellis=2 / 8x8dct=1 / cqm=0 / deadzone=21,11 / fast_pskip=1 / chroma_qp_offset=-3 / threads=6 / sliced_threads=0 / nr=0 / decimate=1 / interlaced=0 / constrained_intra=0 / bframes=8 / b_pyramid=2 / b_adapt=2 / b_bias=0 / direct=3 / wpredb=1 / wpredp=2 / keyint=300 / keyint_min=30 / scenecut=40 / intra_refresh=0 / rc_lookahead=60 / rc=abr / mbtree=1 / bitrate=2430 / ratetol=1.0 / qcomp=0.60 / qpmin=10 / qpmax=51 / qpstep=4 / ip_ratio=1.40 / aq=1:1.00

Audio
ID : 2
Format : AAC
Format/Info : Advanced Audio Codec
Format version : Version 4
Format profile : LC
Format settings, SBR : No
Codec ID : A_AAC
Duration : 46mn 24s
Channel(s) : 2 channels
Channel positions : Front: L R
Sampling rate : 48.0 KHz

Menu
00:00:00.054 : en:00:00:00.054



Why is there a overall Bitrate of 10.7 Mbps although i stated clearly "--bitrate 2430" ?
That happened to 4 of 30 converted files. I also tried 2pass conversion, but this does not help. the resulting file is still that big. The Audiostream is about 30MB (correct) Only Videostream shows that behaviour.

Any Ideas?

best greetings
bololo

Dark Shikari
16th April 2010, 07:11
Where's the output of x264?

bololo
16th April 2010, 09:27
The output of x264 was merged into the mkv showed above. As it was an intermediate file it has beed deleted automatically after successful mkvmerge. I thought the information above would help.
I just restarted the conversation with same settings and will provide further information of the x264-output when calculating is finished (approx, today 19:00).

Best regards and thank you for this great piece of software!
bololo

Dark Shikari
16th April 2010, 09:47
The output of x264 was merged into the mkv showed above. As it was an intermediate file it has beed deleted automatically after successful mkvmerge. I thought the information above would help.I mean the printed output of x264.

bololo
16th April 2010, 10:11
If you mean the command line output like:
avs [info]: 1280x720p 0:0 @ 1630000000/54387667 fps (cfr)
x264 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 Cache64
x264 [info]: profile High, level 4.1
[0.1%] 80/83456 frames, 2.20 fps, 15248.71 kb/s, eta 10:31:54
then i will provide this output this evening too.

It seems to finish later as i thought initially.

As its maybe of interest:
OS: Windows Server 2008 R2 x64
CPU: Core2Quad kentsfield 4*3Ghz
Avisynth 2.5.8

Audionut
16th April 2010, 10:17
If you open the avs file in virtualdub, is the video fine?

edit: i'd say maybe not judging by that funky fps x264 got.

bololo
16th April 2010, 10:28
I am using currently remote desktop, so i can only watch single frames in vdub and not the smoothness of videoplaying. The frames look normal, not noisy or strange.
I got this problem since i updated x264.exe (x264.nl) from january version to current version.

Audionut
16th April 2010, 10:31
When you've posted the command line results, can you post a video sample?

Audionut
16th April 2010, 10:32
Actually, can you try just encoding the file directly with x264 too. No avs file. And see what the result is for the first 1000 or so frames.

bololo
16th April 2010, 17:49
Hello everybody.

here is the x264 output and mediainfo of outputfile and a sample of the originalfile.

x264 output
avs [warning]: converting input clip to YV12
avs [info]: 1280x720p 0:0 @ 1630000000/54387667 fps (cfr)
x264 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 Cache64
x264 [info]: profile High, level 4.1
x264 [info]: frame I:574 Avg QP:12.62 size: 89224
x264 [info]: frame P:56748 Avg QP:12.37 size: 42592
x264 [info]: frame B:26134 Avg QP:13.21 size: 46799
x264 [info]: consecutive B-frames: 55.4% 3.8% 18.8% 12.2% 5.7% 3.8% 0.1% 0.
1% 0.0%
x264 [info]: mb I I16..4: 21.4% 73.1% 5.5%
x264 [info]: mb P I16..4: 0.9% 5.1% 2.5% P16..4: 28.8% 13.3% 8.2% 0.7% 2
.3% skip:38.2%
x264 [info]: mb B I16..4: 0.2% 2.5% 1.2% B16..8: 31.1% 13.1% 10.7% direct:
12.2% skip:29.0% L0:37.9% L1:32.4% BI:29.8%
x264 [info]: final ratefactor: -1.#J
x264 [info]: 8x8 transform intra:61.6% inter:49.3%
x264 [info]: direct mvs spatial:100.0% temporal:0.0%
x264 [info]: coded y,uvDC,uvAC intra: 80.2% 79.9% 62.7% inter: 29.5% 27.4% 18.8%

x264 [info]: i16 v,h,dc,p: 44% 21% 22% 13%
x264 [info]: i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 31% 20% 36% 2% 2% 2% 2% 3% 3%
x264 [info]: i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 32% 16% 11% 6% 7% 8% 6% 7% 7%
x264 [info]: Weighted P-Frames: Y:0.4%
x264 [info]: ref P L0: 77.2% 7.5% 9.4% 2.0% 1.2% 0.8% 0.7% 0.4% 0.4% 0.
3% 0.0%
x264 [info]: ref B L0: 87.2% 7.2% 2.2% 1.2% 0.9% 0.7% 0.5% 0.2%
x264 [info]: ref B L1: 96.0% 4.0%
x264 [info]: kb/s:10604.64

encoded 83456 frames, 3.65 fps, 10604.64 kb/s


mediainfo of outputfile
General
Complete name : E:\Jotei ep04 (1280x720 DivX661)_vid.mp4
Format : MPEG-4
Format profile : JVT
Codec ID : avc1
File size : 3.44 GiB
Duration : 46mn 24s
Overall bit rate : 10.6 Mbps
Encoded date : UTC 2010-04-15 09:07:07
Tagged date : UTC 2010-04-15 09:07:07

Video
ID : 1
Format : AVC
Format/Info : Advanced Video Codec
Format profile : High@L4.1
Format settings, CABAC : Yes
Format settings, ReFrames : 9 frames
Codec ID : avc1
Codec ID/Info : Advanced Video Coding
Duration : 46mn 24s
Bit rate mode : Variable
Bit rate : 10.6 Mbps
Nominal bit rate : 2 430 Kbps
Maximum bit rate : 20.1 Mbps
Width : 1 280 pixels
Height : 720 pixels
Display aspect ratio : 16:9
Frame rate mode : Constant
Frame rate : 29.970 fps
Standard : NTSC
Resolution : 8 bits
Colorimetry : 4:2:0
Scan type : Progressive
Bits/(Pixel*Frame) : 0.384
Stream size : 3.44 GiB (100%)
Writing library : x264 core 93 r1538 bd72d46
Encoding settings : cabac=1 / ref=9 / deblock=1:-1:-1 / analyse=0x3:0x133 / me=umh / subme=10 / psy=1 / psy_rd=1.00:0.15 / mixed_ref=1 / me_range=24 / chroma_me=1 / trellis=2 / 8x8dct=1 / cqm=0 / deadzone=21,11 / fast_pskip=1 / chroma_qp_offset=-3 / threads=6 / sliced_threads=0 / nr=0 / decimate=1 / interlaced=0 / constrained_intra=0 / bframes=8 / b_pyramid=2 / b_adapt=2 / b_bias=0 / direct=3 / wpredb=1 / wpredp=2 / keyint=300 / keyint_min=30 / scenecut=40 / intra_refresh=0 / rc_lookahead=60 / rc=abr / mbtree=1 / bitrate=2430 / ratetol=1.0 / qcomp=0.60 / qpmin=10 / qpmax=51 / qpstep=4 / ip_ratio=1.40 / aq=1:1.00
Encoded date : UTC 2010-04-15 09:07:07
Tagged date : UTC 2010-04-15 15:28:27


Sample (dont know if this error occurs here too, not testet yet)
http://rapidshare.com/files/376617485/Jotei_ep04_sample.avi

When i load the outputfile (mp4) into vlc player there is no video viewable. Vlcplayer looks like its playing an audiofile: the progressindicator moves to the right, but nothing to see.

I will post the testresults of encoding the avi directly tomorrow.
If you want, i could add "--verbose"
here is the first few lines of converting directly the avi w/o avisynth:
ffms [info]: 1280x720p 1:1 @ 30000/1001 fps (vfr)
x264 [debug]: using mv_range_thread = 56
x264 [info]: using SAR=1/1
x264 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 Cache64
x264 [info]: profile High, level 4.1
x264 [debug]: frame= 0 QP=19.00 NAL=3 Slice:I Poc:0 I:3600 P:0 SKIP:0
size=416 bytes
x264 [debug]: frame= 1 QP=31.00 NAL=2 Slice:P Poc:2 I:0 P:0 SKIP:3600
size=39 bytes
x264 [debug]: frame= 2 QP=31.00 NAL=2 Slice:P Poc:4 I:0 P:0 SKIP:3600


What i dont understand is the difference between (mediainfo) "Bitrate:10.6 Mbps" and "Nominal bit rate:2430 Kbps"

best regards,
bololo

Dark Shikari
16th April 2010, 18:58
The problem is the timebase of your input file is broken/insane and causing an integer overflow in x264. A fix is forthcoming in the next release.

bololo
16th April 2010, 19:07
Thank you for having had a look into this and the upcoming timebaseoverflow fix.

Just for your info: After converting directly from the avi it seems that the problem does not appear.
Atm the conversion is 33% finished and the current filesize of the output promises to produce a correct filesize.
Strange that bypassing avisynth delivers a correct timebase.

Anyway, i have to apologize to all x264 developer for blaming x264.

Dark Shikari
16th April 2010, 19:12
Thank you for having had a look into this and the upcoming timebaseoverflow fix.

Just for your info: After converting directly from the avi it seems that the problem does not appear.
Atm the conversion is 33% finished and the current filesize of the output promises to produce a correct filesize.
Strange that bypassing avisynth delivers a correct timebase.

Anyway, i have to apologize to all x264 developer for blaming x264.It is in part x264's fault ;) The timebase shouldn't actually overflow until it reaches about 2 billion. Yours is just 1.6 billion.

bololo
16th April 2010, 19:48
It is in part x264's fault ;) The timebase shouldn't actually overflow until it reaches about 2 billion. Yours is just 1.6 billion.

:devil: Yea just 1.6 billion :thanks:

Blue_MiSfit
16th April 2010, 21:58
I usually add some sanity checks into avisynth at the end of the script to avoid having any of this stuff happen... i.e.

AssumeFPS("NTSC_FILM")
AssumeFrameBased()

etc...