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

Improve Time to First Frame #270

Open
3 of 6 tasks
feross opened this issue Dec 17, 2015 · 7 comments
Open
3 of 6 tasks

Improve Time to First Frame #270

feross opened this issue Dec 17, 2015 · 7 comments

Comments

@feross
Copy link
Member

feross commented Dec 17, 2015

On https://webtorrent.io, we're showing Sintel, which is well-seeded and has a web seed (i.e. it's also available over http). On medium-speed public wifi here in New Zealand (where I'm visiting), the Time to First Frame is a few seconds. I think there's more we can do to make this faster.

Possible ideas:

  • Add the web seed "peers" as soon as possible
  • videostream should get better! cc @jhiesey
  • Add the video tag to the page as soon as possible to save DOM rendering and reflow time.
  • Use a smaller video file, so less data is needed to start playing the video.
  • Use a video that doesn't start with 3 seconds of black screen (this is just a perception thing)
  • Web seeding should fetch larger chunks than 16KB (block size) (Implement Web (HTTP) Seeding (BEP17+BEP19) webtorrent#67)
@DiegoRBaquero
Copy link
Member

Just pointing out that webseeding it broken at the moment because the handshake is being done with itself.

The webseed peers are the first thing added iirc.

We could use another video with greater compression too.

@feross
Copy link
Member Author

feross commented Dec 17, 2015

webseeding is broken at the moment

Just fixed that with a new bittorrent-swarm version.

@DiegoRBaquero
Copy link
Member

There's a 3 initial seconds cut version here: sintel-webtorrent.mp4

We could generate a new torrent file with 2 webseeds if @feross decides to use this version and also host it in webtorrent's website.

The original file is greatly encoded and compressed so there was no point on lowering the resolution or making it stereo only.

@feross
Copy link
Member Author

feross commented Feb 8, 2016

@DiegoRBaquero Nice, that's an improvement! If we're going to have to update all the examples and everything, I feel like we should probably switch to a cooler sample video. There was some brainstorming about that here: #27

@mafintosh had the idea to make a combined video with lots of different public domain / creative commons clips, kind of like a trailer video!

@zh99998
Copy link

zh99998 commented Jul 31, 2016

i found a problem

if I have many webseed for a file, but in different speed. for example:

https://0.example.com/sintel-webtorrent.mp4 will download as 100MB/s.
https://1.example.com/sintel-webtorrent.mp4 will download as 1MB/s.
http://2.example.com/sintel-webtorrent.mp4 will download as 1kB/s.
http://3.example.com/sintel-webtorrent.mp4 will take too lang for connection establish and cause a ERR_TIME_OUT after 30s.
http://4.example.com/sintel-webtorrent.mp4 will get a CONNECTION_RESET immediately

then seems it will wait for slow connection, after first several frames, it stopped, and start play again after a slow connection is downloaded (or failed).
on first several seconds it will wait for slow connections, even there is some better source.
if first piece is slow, it will be more awful.

I don't know what mechanism could resolv it. just finger out a problem I have met.

why do I put lot of junk sources in webseeds? for users in different location they will bahave different. I live in China and here network is very weird.

@DiegoRBaquero
Copy link
Member

@zh99998 You can always use a CDN. If you decide not to, you should limit the max web conns to 1.

@zh99998
Copy link

zh99998 commented Jul 31, 2016

why do I put lot of junk sources in webseeds? for users in different location they will bahave different. I live in China and here network is very weird.

1 CDN is now satisfy different location users. for example:

a user in U.S connection good with CDN1 or CDN2, while user in China is good with CDN3

if I limit conns to 1, and when a user in China connected to CDN1, it will be extremely slow.

@ThaUnknown ThaUnknown transferred this issue from webtorrent/webtorrent Jan 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants