View Full Version : Seeking issue with x264 encode


Elegant
26th May 2015, 04:21
Hi, I'm currently trying to make use of some x264 videos (stored in mkvs) but I've noticed in my usage (as well as the original's) that seeking does not function correctly. There seems to be some range of time that it defaults back to. This happens at random points in all videos and generally multiple times within a video.

To better explain, say you skip to the 5:45 mark, the video jumps to 5:23. If you choose 5:46-5:50 it also jumps to 5:23. I'm wondering if there is any way to correct this issue without re-encoding.

I'm sorry if this is the wrong section but I felt this was the most appropriate place at the time of posting.

Details from MediaInfo (if it helps):
Video
ID : 1
Format : AVC
Format/Info : Advanced Video Codec
Format profile : High 10@L5.0
Format settings, CABAC : Yes
Format settings, ReFrames : 8 frames
Codec ID : V_MPEG4/ISO/AVC
Duration : 1h 14mn
Width : 1 920 pixels
Height : 1 080 pixels
Display aspect ratio : 16:9
Frame rate mode : Constant
Frame rate : 23.976 fps
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 10 bits
Scan type : Progressive
Writing library : x264 core 129 r2245+704+35 dbbd7a1 tMod [10-bit@4:2:0 X86_64]
Encoding settings : cabac=1 / ref=8 / deblock=1:0:0 / analyse=0x3:0x133 / me=umh / subme=10 / psy=1 / fade_compensate=0.00 / psy_rd=0.60:0.16 / mixed_ref=1 / me_range=32 / chroma_me=1 / trellis=2 / 8x8dct=1 / cqm=0 / deadzone=21,11 / fast_pskip=0 / chroma_qp_offset=-3 / threads=24 / lookahead_threads=4 / sliced_threads=0 / nr=0 / decimate=0 / interlaced=0 / bluray_compat=0 / constrained_intra=0 / fgo=3 / bframes=12 / b_pyramid=2 / b_adapt=2 / b_bias=0 / direct=3 / weightb=1 / open_gop=0 / weightp=2 / keyint=infinite / keyint_min=1 / scenecut=40 / intra_refresh=0 / rc_lookahead=72 / rc=crf / mbtree=1 / crf=19.0000 / qcomp=0.80 / qpmin=0 / qpmax=81 / qpstep=4 / ip_ratio=1.40 / aq=3:0.70
Language : English
Default : Yes
Forced : No

foxyshadis
26th May 2015, 07:36
That's a player fault, so what are you playing it with? Some players will only seek to I or IDR frames.

hello_hello
26th May 2015, 08:03
It's probably a keyframe thing. By default, keyframes can up up to ten seconds apart (x264 encoder) and that's probably where you're landing after navigating. Keyframes are standalone frames that don't require info from other frames in order to be decoded properly, so they can be displayed quickly.

Some software players have an option to enable keyframe navigation, or not. For MPC-HC is under Miscellaneous in Options and it's called "fast seek". You could also try opening a video in question and navigating by using Shift and the left right arrows on your keyboard. That'll take you from one keyframe to the next and maybe reveal if that's the reason for "inaccurate" navigating.

keyint=infinite & keyint_min=1 from your x264 settings might be to blame for some of it. The defaults are keyint=250 & keyint_min=25 (250 at 25fps = 10 seconds).

hello_hello
26th May 2015, 13:05
In my previous post I mentioned using the left/right arrows with the Ctrl key to jump between keyframes using MPC-HC. I should have said the Shift key and left/right arrows. I've corrected my previous post.

Elegant
28th May 2015, 00:20
I'm using PotPlayer; I believe @hello_hello is correct with keyint=infinite being the main issue here. Definitely having a lot of issues getting to play at seek points, works fine for general viewing (start to finish) but this does irk me.

hello_hello
28th May 2015, 12:19
Potplayer's preferences seem to be all over the place and it's not always obvious (at least to me) what they might do, but under "Preferences/Playback/Time Jump" there's an option labelled "Jump to keyframe" that also seems to effect using the navigation bar. Try unchecking it. You'll probably find navigation will slow down a bit though. Maybe a lot.

Elegant
28th May 2015, 19:54
If I ever thought my second gen i5 was starting to look slow this sealed it, man does seeking ever slow down my system with that unchecked. I think I'll try to find a new source for the material, as much as I like the quality of the encode this does not sit well with me. I appreciate the help though!