Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Streaming freezes even when file data is downloaded #154

Closed
genseric opened this issue Oct 19, 2014 · 9 comments
Closed

Streaming freezes even when file data is downloaded #154

genseric opened this issue Oct 19, 2014 · 9 comments
Labels
Milestone

Comments

@genseric
Copy link

@genseric genseric commented Oct 19, 2014

hello again,
When i run by index it starts to download other files inside the torrent. after some time it starts to download the file that it should start but the other files that i m not interested are created inside the folder with whole sizes. and the file i want to stream sometimes stops downloading and i see other files being downloaded.
an example is like this, some animation files inside a torrent, i choose to stream one of the smallest files. The run by index starts creating the files i do not want watch. after a few minutes my file gets some bytes and starts to stream to vlc, but streaming is not healty even if i have a good speed. after 5mins i checked and i saw 200 mbs of downloaded data but my 30mb movie file is not complete.

maybe it s an expected behavior, i don't know.
i run the latest(.9) under osx.

thanks,

@feross

This comment has been minimized.

Copy link
Member

@feross feross commented Oct 19, 2014

Right. The --index option is just sets the referenced file to be highest priority (and opens it in VLC/chromecast/etc. if that option is passed). It doesn't prevent the other files in the torrent from being downloaded.

Downloading bits of unrelated files is unavoidable. When requesting the pieces for a certain file, bits of the preceding and succeeding files will be downloaded too, because they're included in the pieces we need. Files cross piece boundaries and parts of multiple files can be included in the same piece.

But, I've noticed the streaming stuttering issue as well. It seems like even when a file is fully downloaded, sometimes the data isn't emitted to the stream for a really long time. There's a bug here somewhere.

@feross feross changed the title index running behavior on streaming Streaming freezes even when file data is downloaded Oct 19, 2014
@genseric

This comment has been minimized.

Copy link
Author

@genseric genseric commented Oct 19, 2014

then there's only the streaming issue. the other part is just the expected behavior.

@feross

This comment has been minimized.

Copy link
Member

@feross feross commented Dec 17, 2014

I'm planning to take a very close look at this issue soon (end of the month, or early January) to get to the bottom of the bug where the stream freezes for no reason. Thanks for your patience.

@astro

This comment has been minimized.

Copy link
Contributor

@astro astro commented Dec 17, 2014

Anecdotal observation: it seems that complete pieces are not always verified.

@feross

This comment has been minimized.

Copy link
Member

@feross feross commented Feb 19, 2015

The fix here #272 (webtorrent@0.27.2) should resolve this issue.

@feross feross closed this Feb 19, 2015
@westmark

This comment has been minimized.

Copy link

@westmark westmark commented Mar 25, 2015

@feross I am still experiencing intermittent freezes while downloading torrents (v 0.30.0). Only using magnet links, so unsure if that has any bearing on the problem. So far all torrents have stalled around 60-80% downloaded. I'm trying to investigate as best I can - is there anything special I can do to produce more info?

I'm running WebTorrent in a NW app. When the freeze occurs I have tried to hit pause in the dev console, but that will invariably crash the entire app. Also the crashDumpDir has been disabled in the current version of NW so no luck there either.

@westmark

This comment has been minimized.

Copy link

@westmark westmark commented Mar 26, 2015

Update: While the freezes still do occur, given enough time (1-2 minutes) they will eventually resolve themselves. I've been doing some profiling, but nothing conclusive yet.

@feross

This comment has been minimized.

Copy link
Member

@feross feross commented Apr 9, 2015

Darn. I'll re-open this issue.

@feross feross reopened this Apr 9, 2015
@feross feross added this to the Alpha milestone Apr 25, 2015
@feross

This comment has been minimized.

Copy link
Member

@feross feross commented Jul 27, 2015

I haven't seen this issue in a while. Closing.

@feross feross closed this Jul 27, 2015
@lock lock bot locked as resolved and limited conversation to collaborators May 6, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
4 participants
You can’t perform that action at this time.