Log in

View Full Version : x264 encoding parameters causes long video playback startup delay?


vi
21st March 2009, 01:50
Hi,

I've just recently started encoding a few DVDs using x264 and Megui. I went through all the settings and set things up according to the tooltips. Here's what MeGui came up with according to my (probably bogus) settings :
program --pass 2
--bitrate 2500
--stats ".stats"
--ref 8
--mixed-refs
--no-fast-pskip
--bframes 3
--b-adapt 2
--b-pyramid
--weightb
--direct auto
--subme 8
--trellis 2
--partitions all
--8x8dct
--vbv-bufsize 20000
--vbv-maxrate 20000
--ratetol 2.5
--me umh
--merange 32
--threads auto
--thread-input
--progress
--no-dct-decimate
--no-psnr
--no-ssim
--output "output"
"input"


Encoding using x264 v1114 went just fine (I did not encode the audio, keeping the original DVD streams). However when playing the files (using Media Player Classic) there is a very long startup delay of around 30s. During this time not much goes on, almost no CPU is used and about 16MB are read from the disk. After this, everything works correctly, I can seek etc. without delay.

Using the same player other files start instantly, even though they've got a much higher bitrate. My CPU is a Core2Duo @ 3GHz with 4Gb RAM so it shouldn't be an issue either.

I assume there is something in the x264 parameters which causes the long startup delay. Also, if there is something else obviously wrong about these parameters (and there is most probably), please tell me :-)

dat720
21st March 2009, 07:11
What about other players, like mplayer, vlc etc.... maybe the problem is actually with Media Player Classic and not the encode.

Altaria
21st March 2009, 09:26
Try KMPlayer, I also have delay at startup when using videolan.
Maybe there is an option in the player, which scans the whole movie before playin, so it takes time to start the file

Kurtnoise
21st March 2009, 10:07
I assume there is something in the x264 parameters which causes the long startup delay. Also, if there is something else obviously wrong about these parameters (and there is most probably), please tell me :-)
did you use mkv container as ouput format ?

dat720
21st March 2009, 12:02
I was thinking that maybe media player classic is doing a index rebuild before starting playback, maybe the index of the video is corrupt....

vi
21st March 2009, 14:45
dat720 : Hmm you're right, I tried to play the video using VLC and there is no delay. Then why is there a delay with MPC only with videos I encoded myself ? How would I know if the index is corrupt in my files ? MPC doesn't tell anything about this when playing.

Kurtnoise : Yes, I used the MKV container. Then I used AVI-Mux GUI to mux the x264 encode, the audio from the DVDs and text subtitles I made using SubRip.

I might as well start using VLC but I use text subtitles a lot and VLC's rendering is really inferior to MPC's.

Kurtnoise
21st March 2009, 17:26
Yes, I used the MKV container. Then I used AVI-Mux GUI to mux the x264 encode, the audio from the DVDs and text subtitles I made using SubRip.

it's well known that the mkv output support from x264 causes some lags during loading with dshow filters...

vi
21st March 2009, 17:53
it's well known that the mkv output support from x264 causes some lags during loading with dshow filters...

Well, I did not know. I'll retry using a different container.

LoRd_MuldeR
21st March 2009, 20:47
Well, I did not know. I'll retry using a different container.

A quick re-mux with MKVToolnix (http://www.bunkus.org/videotools/mkvtoolnix/win32/) should solve the problem though. You'll have to remux anyway, if you add an audio track...

dat720
22nd March 2009, 04:42
That was my thought aswell, why use AVI-Mux for adding extra tracks to a mkv? use MKVmerge which comes in the mkvtoolnix package as LoRd_MuldeR suggested.

vi
28th March 2009, 17:30
That was my thought aswell, why use AVI-Mux for adding extra tracks to a mkv? use MKVmerge which comes in the mkvtoolnix package as LoRd_MuldeR suggested.

I don't know, I thought that whas the way to go. I guess that's why I'm posting in the "newbies" forum :-)

Anyways, passing the file through mkvmerge solved the issue ! :thanks: