Page 1 of 1

Increasing file buffer also increases pause-to-play delay

Posted: 22 Aug 2004 18:46
by zaph
When you increase the size of the file buffer to 1000-2000 ms to prevent skipping, it also affects the time it takes to resume playing a file when paused. So if I were to set the buffer to as high as 3000 ms, it would take 3 seconds after pressing play that the movie would actually start playing again. I guess it shouldn't be this way and I'm thinking that it's probably a bug. I'm using OS X and this happens in version 0.72 and the latest nightly builds too.

Posted: 22 Aug 2004 21:17
by markfm
Why would you think it's a bug? The purpose of the buffer is to build up data so that it can handle minor outages/skips. Any time you start the video (and restarting after a pause is a start), the app is queuing up to the buffer size before outputting. It's doing precisely what it's supposed to, IMO.

(Not a bad question, just that it sounds like it's doing what it should)

That's one of the nice things about VLC, that it allows many different caches, depending on the type of data. That lets you set a really small cache for local File play, longer ones for. say, DVD, and still longer for received IP content (e.g., http).

Posted: 22 Aug 2004 22:23
by zaph
Because I've never seen similar behavior in any other media player I have used. Anyway, shouldn't it be already buffering the contents while it's paused, not only after you press play. Currently you sort of have to decide which is more important to you, to prevent skipping that may occur occasionally by increasing the buffer and tolerate annoying delays or to keep the buffer small so there's no delay when resuming play. Just my opinion but it makes even fast computers seem slow and laggy when the player doesn't respond quite instantly.

Posted: 22 Aug 2004 23:15
by markfm
Ahh, I see what you mean. If you're viewing something static, it should pre-fetch enough.

Posted: 23 Aug 2004 01:17
by zaph
So what value should I set the file buffer to? If I leave it to its default value (300 ms) there may be some skipping if there's a lot of disk activity happening at the same time. On the other hand setting the value at 1000 ms or higher seems to help but then you face the pause-to-play delay issue. What should I do?

I am kind of interesting of this topic

Posted: 24 Aug 2004 22:11
by monsterrast
How to increase the file buffer value? I also experienced the skipping problem when use vlc to play mpeg video. I have done the test of playing same mpeg file with WMP and VLC Player. WMP does not have skipping problem, but VLC player play the file a little jerk.

Posted: 25 Aug 2004 02:30
by markfm
To set the file cache:

Settings -- Preferences. Select the "Advanced options" checkbox.

Open Modules -- access2 (possibly access -- I have a newer build) --access_file.

The parameter is caching value in ms -- try nudging it up by about 100 ms increments until you get good results.

If you are running from the command line, the option to include is:
--file-caching value_in_ms

for example
--file-caching 500

At least in Windows, it is really good to run defragmentation once in a while. The newer versions of Win include a free version of Diskeeper.

Posted: 26 Aug 2004 00:25
by monsterrast
thans markfm,

I will definitely try that.
BTW, thank you for helping me to compile VLC.