Log in

View Full Version : [bug?] x264 --seek xx --frames yy


PopovN
16th September 2010, 10:25
x264 core:104 r1713 c276662
ffms input
===

x264.exe --preset slow --crf 18 --seek 200 --frames 300 --output film.h264 film.mpg

result film does not start from 200th frame, as in:

x264.exe --preset slow --crf 18 --output film.h264 film.avs

AVS:
LoadPlugin("ffms2.dll")
FFVideoSource("film.mpg")
Trim(200,499)

its start from ~216 frame... why? its a bug or any coeffecient exist which i must to apply to command line, if dont use avisynth?

Also, i think "--frames" dont work fine - but its may be because "--seek" dont work as i want

Audionut
16th September 2010, 10:27
Try adding --demuxer lavf to the first command line.

PopovN
16th September 2010, 10:51
lavf - frame-accurate, but with it i cant use "--vf crop:0,66,0,66" it say "crop [error]: top crop value `66' is not a multiple of 4"....

with mode4 crop it works, bat also it say:

[mp2float @ 0152ac30] incorrect frame size
[mpeg @ 01438070] max_analyze_duration reached

i cant understand - what it want?


Video
ID : 224 (0xE0)
Format : MPEG Video
Format version : Version 2
Format profile : Main@Main
Format settings, BVOP : Yes
Format settings, Matrix : Default
Format settings, GOP : M=1, N=25
Bit rate mode : Variable
Bit rate : 4 829 Kbps
Width : 704 pixels
Height : 576 pixels
Display aspect ratio : 4:3
Pixel aspect ratio : 1.091
Frame rate : 25.000 fps
Standard : PAL
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 8 bits
Scan type : Interlaced
Scan order : Top Field First
Bits/(Pixel*Frame) : 0.476

Audionut
16th September 2010, 10:57
Add or subtract an extra 2 lines to the crop, 64 or 68. You might have a problem with this, but honestly, it's only 2 lines.

Not sure on the max_analyze_duration. It might go away if you use --no-interlaced.

The source is obviously flagged as interlaced, which is screwing this around.

Try adding --no-interlaced with the first command line you posted above and see if that works. If not, also add the --demuxer lavf again and see if that works.
Personally, I wouldn't worry about errors such as max_analyze_duration, unless you see problems with the output of x264.

PopovN
16th September 2010, 11:18
Not sure on the max_analyze_duration. It might go away if you use --no-interlaced.

i used --no-interlaced but max_analyze_duration exist

but i worry about "[mp2float @ 014d4010] incorrect frame size"
it red-colored and it exist with or without "--vf crop"

in result file visually cant see any artifacts

Audionut
16th September 2010, 11:35
mp2 is audio.

If you can't see any artifacts and the --seek and --frames parameters work as expected, then problem solved imo.

Although, it can't hurt to post the file you're having problems with, or a short sample that still produces the problems you're experiencing so that someone can have a look at it properly and maybe resolve the issue x264 is having with this file.

It sounds like there is something wrong with the way that file was created.

PopovN
16th September 2010, 11:45
mp2 is audio.

O.. thank you )) ... i sow "mp2" as "mpeg-2" .. as video..

problem is solved as problem with seek

but not as problem with ffms i think..

Thank you for your ansvers ... but... i come back to avisynth - i need crop ..

kemuri-_9
16th September 2010, 13:02
Thank you for your ansvers ... but... i come back to avisynth - i need crop ..

you can crop in x264 but the crop filter prevents cropping by values that would corrupt the picture.
in this case lavf seems to be returning that the video is interlaced so combined with the fact the video is YV12, you need to crop height in increments of 4.

PopovN
16th September 2010, 14:06
you can crop in x264 ... you need to crop height in increments of 4.
i understand, thank you )
but i want to frame-accurate seek and non-mode4 crop - so i need to come back to more-"slow" avisynth-way :)?

In ffms-input mode2 crop is very well ... but without frame-accurate ((

kemuri-_9
17th September 2010, 01:25
i understand, thank you )
but i want to frame-accurate seek and non-mode4 crop - so i need to come back to more-"slow" avisynth-way :)?

In ffms-input mode2 crop is very well ... but without frame-accurate ((

you are not clearly indicating whether or not your source is actually interlaced or if lavf is just wrongly detecting it as interlaced.

if your source is not interlaced then add the --no-interlaced option and this should allow you to crop by mod2 values in x264's crop filter.

if your source is interlaced, then cropping by mod2 values will distort the picture.

Audionut
17th September 2010, 16:59
you are not clearly indicating whether or not your source is actually interlaced or if lavf is just wrongly detecting it as interlaced.

In the op's second post before edit, he stated that it is progressive.

In ffms-input mode2 crop is very well ... but without frame-accurate ((

Is that with the --no-interlaced option, or as per your initial post?