{"action":"created","issue":{"url":"https://api.github.com/repos/google/ExoPlayer/issues/1399","repository_url":"https://api.github.com/repos/google/ExoPlayer","labels_url":"https://api.github.com/repos/google/ExoPlayer/issues/1399/labels{/name}","comments_url":"https://api.github.com/repos/google/ExoPlayer/issues/1399/comments","events_url":"https://api.github.com/repos/google/ExoPlayer/issues/1399/events","html_url":"https://github.com/google/ExoPlayer/issues/1399","id":143921761,"number":1399,"title":"Exoplayer slow seekTo() update","user":{"login":"vxhviet","id":17634476,"avatar_url":"https://avatars.githubusercontent.com/u/17634476?v=3","gravatar_id":"","url":"https://api.github.com/users/vxhviet","html_url":"https://github.com/vxhviet","followers_url":"https://api.github.com/users/vxhviet/followers","following_url":"https://api.github.com/users/vxhviet/following{/other_user}","gists_url":"https://api.github.com/users/vxhviet/gists{/gist_id}","starred_url":"https://api.github.com/users/vxhviet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vxhviet/subscriptions","organizations_url":"https://api.github.com/users/vxhviet/orgs","repos_url":"https://api.github.com/users/vxhviet/repos","events_url":"https://api.github.com/users/vxhviet/events{/privacy}","received_events_url":"https://api.github.com/users/vxhviet/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/google/ExoPlayer/labels/question","name":"question","color":"cc317c"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2016-03-28T08:00:59Z","updated_at":"2016-03-29T01:31:35Z","closed_at":null,"body":"Dear ExoPlayer Devs,\r\nI would like to use ExoPlayer to seek through a local video via the seekTo(long position) method. The video is not actually played, but instead being scrubbed through [like this](https://youtu.be/083iy30lbio?t=1m21s). \r\n\r\nWhat I've done so far has basically achieved this function, however the performance is not very great. The returned frames are quite slow to update and basically get stuck after a while. I suspect this is because the touch event `ACTION_MOVE` has to wait for the video to buffer, so I try to disable it via \r\n`mExoPlayer = ExoPlayer.Factory.newInstance(RENDERER_COUNT, 0, 0);`\r\n\r\nHowever I can not figure out what to do with `BUFFER_SEGMENT_SIZE` and `BUFFER_SEGMENT_COUNT` as from my research and experiment, setting these too low and the video can't be played at all, setting these too high and it just make my problem worse.\r\n\r\nI would like to ask is there a way to completely remove the buffer so that exoPlayer can just instantly return the frame at `seekTo(long position)` and if not, is there any way to improve the performance?\r\n\r\nI would like to add these severe stuttering or stuck only happen with videos captured by the Samsung Galaxy s6 running Android 5.1.1. With videos captured by Nexus 5 running 6.0.1 or low resolution videos, the problem is not as severe. (I'm sorry since currently I only has those two devices to test. In case I can get a hold of more devices, I'll update the results.)\r\n\r\nBelow is my code snippet using ExoPlayer version 1.5.6:\r\n\r\n```java\r\n    private static final int RENDERER_COUNT = 1;\r\n    private static final int BUFFER_SEGMENT_SIZE = 64 * 1024;\r\n    private static final int BUFFER_SEGMENT_COUNT = 64; // default 256\r\n.....\r\n\r\n        // 1. Instantiate the player. RENDERER_COUNT is the number of renderers to be used.\r\n        // In this case it’s 1 since we will only use a video renderer. If you need audio and video renderers it should be 2.\r\n        mExoPlayer = ExoPlayer.Factory.newInstance(RENDERER_COUNT, 0, 0); //disable the buffer and rebuffer for better performance\r\n\r\n        // 2. Construct renderer.\r\n        Uri uri = Uri.parse(mVideoPath);\r\n        Allocator allocator = new DefaultAllocator(BUFFER_SEGMENT_SIZE);\r\n        String userAgent = Util.getUserAgent(this, \"Android Demo\");\r\n        DataSource dataSource = new DefaultUriDataSource(this, null, userAgent);\r\n        ExtractorSampleSource sampleSource = new ExtractorSampleSource(uri, dataSource, allocator, BUFFER_SEGMENT_COUNT * BUFFER_SEGMENT_SIZE);\r\n        MediaCodecVideoTrackRenderer videoRenderer = new MediaCodecVideoTrackRenderer(\r\n                this, sampleSource, MediaCodecSelector.DEFAULT, MediaCodec.VIDEO_SCALING_MODE_SCALE_TO_FIT);\r\n\r\n        // 3. Inject the renderer through prepare.\r\n        mExoPlayer.prepare(videoRenderer);\r\n\r\n        // 4. Pass the surface to the video renderer.\r\n        mExoPlayer.sendMessage(videoRenderer, MediaCodecVideoTrackRenderer.MSG_SET_SURFACE, holder.getSurface());\r\n\r\n        // 5. Start playback.\r\n        mExoPlayer.seekTo(currentVideoPosition);\r\n\r\n```\r\n\r\nThanks you very much for your time,\r\n"},"comment":{"url":"https://api.github.com/repos/google/ExoPlayer/issues/comments/202656504","html_url":"https://github.com/google/ExoPlayer/issues/1399#issuecomment-202656504","issue_url":"https://api.github.com/repos/google/ExoPlayer/issues/1399","id":202656504,"user":{"login":"vxhviet","id":17634476,"avatar_url":"https://avatars.githubusercontent.com/u/17634476?v=3","gravatar_id":"","url":"https://api.github.com/users/vxhviet","html_url":"https://github.com/vxhviet","followers_url":"https://api.github.com/users/vxhviet/followers","following_url":"https://api.github.com/users/vxhviet/following{/other_user}","gists_url":"https://api.github.com/users/vxhviet/gists{/gist_id}","starred_url":"https://api.github.com/users/vxhviet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vxhviet/subscriptions","organizations_url":"https://api.github.com/users/vxhviet/orgs","repos_url":"https://api.github.com/users/vxhviet/repos","events_url":"https://api.github.com/users/vxhviet/events{/privacy}","received_events_url":"https://api.github.com/users/vxhviet/received_events","type":"User","site_admin":false},"created_at":"2016-03-29T01:31:35Z","updated_at":"2016-03-29T01:31:35Z","body":"Thanks you so much for your prompt reply @andrewlewis and @ojw28 , \r\nI will test your hypothesis and reply as soon as I can. \r\nIn case `seekTo()` doesn't work, is there any other method that I can use to achieve this scrubbing function?\r\n\r\nThanks you so much for your time,"}}