Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > Video Encoding > MPEG-4 AVC / H.264
Register FAQ Calendar Today's Posts Search

Reply
 
Thread Tools Search this Thread Display Modes
Old 16th September 2010, 10:25   #1  |  Link
PopovN
Registered User
 
Join Date: May 2006
Posts: 24
[bug?] x264 --seek xx --frames yy

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

Last edited by PopovN; 16th September 2010 at 10:38.
PopovN is offline   Reply With Quote
Old 16th September 2010, 10:27   #2  |  Link
Audionut
Registered User
 
Join Date: Nov 2003
Posts: 1,281
Try adding --demuxer lavf to the first command line.
__________________
http://www.7-zip.org/
Audionut is offline   Reply With Quote
Old 16th September 2010, 10:51   #3  |  Link
PopovN
Registered User
 
Join Date: May 2006
Posts: 24
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:
Quote:
[mp2float @ 0152ac30] incorrect frame size
[mpeg @ 01438070] max_analyze_duration reached
i cant understand - what it want?

Code:
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

Last edited by PopovN; 16th September 2010 at 11:03.
PopovN is offline   Reply With Quote
Old 16th September 2010, 10:57   #4  |  Link
Audionut
Registered User
 
Join Date: Nov 2003
Posts: 1,281
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.
__________________
http://www.7-zip.org/
Audionut is offline   Reply With Quote
Old 16th September 2010, 11:18   #5  |  Link
PopovN
Registered User
 
Join Date: May 2006
Posts: 24
Quote:
Originally Posted by Audionut View Post
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
PopovN is offline   Reply With Quote
Old 16th September 2010, 11:35   #6  |  Link
Audionut
Registered User
 
Join Date: Nov 2003
Posts: 1,281
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.
__________________
http://www.7-zip.org/
Audionut is offline   Reply With Quote
Old 16th September 2010, 11:45   #7  |  Link
PopovN
Registered User
 
Join Date: May 2006
Posts: 24
Quote:
Originally Posted by Audionut View Post
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 ..

Last edited by PopovN; 16th September 2010 at 11:55.
PopovN is offline   Reply With Quote
Old 16th September 2010, 13:02   #8  |  Link
kemuri-_9
Compiling Encoder
 
kemuri-_9's Avatar
 
Join Date: Jan 2007
Posts: 1,348
Quote:
Originally Posted by PopovN View Post
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.
__________________
custom x264 builds & patches | F@H | My Specs
kemuri-_9 is offline   Reply With Quote
Old 16th September 2010, 14:06   #9  |  Link
PopovN
Registered User
 
Join Date: May 2006
Posts: 24
Quote:
Originally Posted by kemuri-_9 View Post
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 ((

Last edited by PopovN; 16th September 2010 at 14:09.
PopovN is offline   Reply With Quote
Old 17th September 2010, 01:25   #10  |  Link
kemuri-_9
Compiling Encoder
 
kemuri-_9's Avatar
 
Join Date: Jan 2007
Posts: 1,348
Quote:
Originally Posted by PopovN View Post
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.
__________________
custom x264 builds & patches | F@H | My Specs
kemuri-_9 is offline   Reply With Quote
Old 17th September 2010, 16:59   #11  |  Link
Audionut
Registered User
 
Join Date: Nov 2003
Posts: 1,281
Quote:
Originally Posted by kemuri-_9 View Post
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.

Quote:
Originally Posted by PopovN View Post
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?
__________________
http://www.7-zip.org/
Audionut is offline   Reply With Quote
Reply

Tags
bug, ffms, seek, x264


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 23:16.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.