sioro-neoku / go-peerflix Goto Github PK
View Code? Open in Web Editor NEWGo Peerflix
License: MIT License
Go Peerflix
License: MIT License
error when building:
src/golang.org/x/net/context/go19.go:15:14: expected type, found '='
src/golang.org/x/net/context/go19.go:20:17: expected type, found '='
exit status 2
go get github.com/Sioro-Neoku/go-peerflix
# github.com/Sioro-Neoku/go-peerflix
go/src/github.com/Sioro-Neoku/go-peerflix/client.go:75:30: undefined: torrent.Config
go/src/github.com/Sioro-Neoku/go-peerflix/client.go:119:26: client.getLargestFile().PrioritizeRegion undefined (type *torrent.File has no field or method PrioritizeRegion)
go/src/github.com/Sioro-Neoku/go-peerflix/client.go:163:10: c.Client.SetIPBlockList undefined (type *torrent.Client has no field or method SetIPBlockList)
go/src/github.com/Sioro-Neoku/go-peerflix/client.go:198:29: t.Stats().DataBytesWritten undefined (type torrent.TorrentStats has no field or method DataBytesWritten)
go/src/github.com/Sioro-Neoku/go-peerflix/client.go:226:11: cannot use file (type *torrent.File) as type torrent.File in assignment
go/src/github.com/Sioro-Neoku/go-peerflix/fileEntry.go:19:2: embedded type cannot be a pointer to interface
go/src/github.com/Sioro-Neoku/go-peerflix/fileEntry.go:24:2: not enough arguments to return
go/src/github.com/Sioro-Neoku/go-peerflix/fileEntry.go:24:17: f.Reader.Seek undefined (type *torrent.Reader is pointer to interface, not interface)
go/src/github.com/Sioro-Neoku/go-peerflix/fileEntry.go:39:9: cannot use reader (type torrent.Reader) as type *torrent.Reader in field value:
*torrent.Reader is pointer to interface, not interface
I would like to be able to set a proxy for go-peerflix to connect with peers through. A commandline flag to specify it would be good, e.g. go-peerflix --proxy=https://[username:password@]127.0.0.1:8080
.
If I try to build or run the program it fails:
go build *.go
./client.go:200: cannot call non-function t.torrent.Peers (type map[torrent.peersKey]torrent.Peer)
I've fixed it just changing from client.go, line 200.
Original code:
fmt.Printf("Connections: \t%d\n", len(t.Peers()))
Fixed code:
fmt.Printf("Connections: \t%d\n", len(t.Conns))
But I don't know if this is the best way to do it.
So i opened this issue in case someone else wonders why TV isn't working when you run go-peerflix.
The issue is too many connections (default 80) are made and modem (provided by the ISP) can't handle that many connections (in my case) and the result is that TV stream stops working.
You might want to provide static builds for multiple platforms as releases on this github.
Also, if you need help with a website, I can design a website and publish it in my repo which you can pull and control yourself, as a github pages project.
Hi!
How I can choose file in multifile torrent by index?
I am unable to build and install go-peerflix on arm v7 hardfloat. I get the following error. I'm using Scaleway if it helps.
go get github.com/Sioro-Neoku/go-peerflix
# github.com/anacrolix/torrent/dht
/root/go/src/github.com/anacrolix/torrent/dht/addr.go:6: import /root/go/pkg/linux_arm/github.com/anacrolix/missinggo.a: object is [linux arm go1.2.1 X:none] expected [linux arm go1.4.2 X:precisestack]
# github.com/anacrolix/utp
/root/go/src/github.com/anacrolix/utp/utp.go:29: import /root/go/pkg/linux_arm/github.com/anacrolix/jitter.a: object is [linux arm go1.2.1 X:none] expected [linux arm go1.4.2 X:precisestack]
Some ideas:
-select-file
to allow overriding.Hi! According to what I could see in the code and experience while using the program, it seems that once the first 5% is downloaded, then the rest of the torrent could be downloaded in any order. This can result in the playback freezing after the first 5% is played.
I propose that, after each 5% is downloaded, the next 5% is prioritized, in order. Also, the number could be made smaller but that's more of an implementation detail. If you agree, I could try to make this work and submit a pull request.
As a side topic, I think it would also be nice if seeding is enabled by default.
Let me know what you think!
Cheers
PS: I'll leave the question of whether to prioritize or only download each 5% for later.
go get github.com/Sioro-Neoku/go-peerflix
# github.com/anacrolix/go-libutp
In file included from ./utp.h:35,
from go/src/github.com/anacrolix/go-libutp/callbacks.go:4:
./utp_types.h:56:11: fatal error: netinet/in.h: No such file or directory
#include <netinet/in.h>
^~~~~~~~~~~~~~
compilation terminated.
# github.com/mattn/go-sqlite3
go/src/github.com/mattn/go-sqlite3/backup.go:14:10: fatal error: stdlib.h: No such file or directory
#include <stdlib.h>
^~~~~~~~~~
compilation terminated.
# github.com/anacrolix/upnp
go/src/github.com/anacrolix/upnp/log.go:10:58: cannot use me.Logger (type "github.com/anacrolix/log".Logger) as type *"github.com/anacrolix/log".Logger in argument to "github.com/anacrolix/log".Fmsg(format, args...).AddValue(level).Skip(2).Log
github.com/Sioro-Neoku/go-peerflix/client.go:200: cannot call non-function t.torrent.Peers (type map[torrent.peersKey]torrent.Peer)
Since go-peerflix through some way has a dependency on go-sqlite3, and go-sqlite3 requires gcc to build, when I do go get, I get this error:
>go get github.com/Sioro-Neoku/go-peerflix
# github.com/mattn/go-sqlite3
exec: "gcc": executable file not found in %PATH%
It might be worth incorporating Go modules into this repo now. In particular, some API changes that caused issues in the past with anacrolix/torrent could be avoided. It's worth noting however, that in the absence of a go.mod in this repo, v1 of anacrolix/torrent will be selected indefinitely into the future, which shouldn't break API (too much).
So i kinda forgot to sync my local repo for a long time now. And now that i did i can't seem to build go-peerflix.
The error is
./fileEntry.go:29: f.Torrent undefined (type *torrent.File has no field or method Torrent)
What did i do wrong?
Before syncing i could easily build.
Currently only VLC is supported. I'd like to replace the -vlc
flag with a -player vlc|mpv|...
flag.
See my PR for a working implementation.
PS: Neat project :)
The CI badge on the README would be nicer if it linked to the CI status/output page, instead of the image.
I'm trying to build/run go-peerflix on alpine linux which is based on musl libc. I am getting the below error.
It seems this error is also reproducible on go torrent.
�[H�[2J
2015/12/22 11:21:44 Downloading blocklist
=============================================================
Connections: 0
panic: sync: unlock of unlocked mutex
goroutine 33 [running]:
sync.(*Mutex).Unlock(0xc8200e2038)
/usr/lib/go/src/sync/mutex.go:108 +0x9f
github.com/anacrolix/torrent/dht.(*Announce).maybeAnnouncePeer(0xc820228000, 0x7fe31087d060, 0xc820172140, 0x0, 0x0, 0xc8200dcf40, 0x14)
/home/clandmeter/go-torrent/go/src/github.com/anacrolix/torrent/dht/announce.go:162 +0x2f1
github.com/anacrolix/torrent/dht.(*Announce).getPeers.func1(0x0, 0x0, 0x0, 0xc8200c7b10, 0x1, 0xc8200c7bb0, 0x1, 0xc8200e41e0, 0x0, 0xc8200c7220, ...)
/home/clandmeter/go-torrent/go/src/github.com/anacrolix/torrent/dht/announce.go:199 +0x47b
github.com/anacrolix/torrent/dht.(*Transaction).tryHandleResponse(0xc82020e240)
/home/clandmeter/go-torrent/go/src/github.com/anacrolix/torrent/dht/transaction.go:40 +0xc9
github.com/anacrolix/torrent/dht.(*Transaction).handleResponse(0xc82020e240, 0x0, 0x0, 0x0, 0xc8200c7b10, 0x1, 0xc8200c7bb0, 0x1, 0xc8200e41e0, 0x0, ...)
/home/clandmeter/go-torrent/go/src/github.com/anacrolix/torrent/dht/transaction.go:147 +0x199
created by github.com/anacrolix/torrent/dht.(*Server).processPacket
/home/clandmeter/go-torrent/go/src/github.com/anacrolix/torrent/dht/server.go:197 +0x3e2
goroutine 1 [sleep]:
time.Sleep(0x3b9aca00)
/usr/lib/go/src/runtime/time.go:59 +0xf9
main.main()
/home/clandmeter/go-torrent/go/src/github.com/Sioro-Neoku/go-peerflix/main.go:80 +0x6cf
goroutine 17 [syscall, locked to thread]:
runtime.goexit()
/usr/lib/go/src/runtime/asm_amd64.s:1721 +0x1
goroutine 5 [syscall]:
os/signal.loop()
/usr/lib/go/src/os/signal/signal_unix.go:22 +0x18
created by os/signal.init.1
/usr/lib/go/src/os/signal/signal_unix.go:28 +0x37
goroutine 18 [IO wait]:
net.runtime_pollWait(0x7fe310955fb0, 0x72, 0xc820010240)
/usr/lib/go/src/runtime/netpoll.go:157 +0x60
net.(*pollDesc).Wait(0xc8200c8060, 0x72, 0x0, 0x0)
/usr/lib/go/src/net/fd_poll_runtime.go:73 +0x3a
net.(*pollDesc).WaitRead(0xc8200c8060, 0x0, 0x0)
/usr/lib/go/src/net/fd_poll_runtime.go:78 +0x36
net.(*netFD).accept(0xc8200c8000, 0x0, 0x7fe3109af9b8, 0xc82000b240)
/usr/lib/go/src/net/fd_unix.go:408 +0x27c
net.(*TCPListener).AcceptTCP(0xc8200cc000, 0x0, 0x0, 0x0)
/usr/lib/go/src/net/tcpsock_posix.go:254 +0x4d
net.(*TCPListener).Accept(0xc8200cc000, 0x0, 0x0, 0x0, 0x0)
/usr/lib/go/src/net/tcpsock_posix.go:264 +0x3d
github.com/anacrolix/torrent.(*Client).acceptConnections(0xc8200b4000, 0x7fe310955030, 0xc8200cc000, 0xc8200c6000)
/home/clandmeter/go-torrent/go/src/github.com/anacrolix/torrent/client.go:625 +0x4d
created by github.com/anacrolix/torrent.NewClient
/home/clandmeter/go-torrent/go/src/github.com/anacrolix/torrent/client.go:511 +0x863
goroutine 19 [IO wait]:
net.runtime_pollWait(0x7fe310955ef0, 0x72, 0xc820010240)
/usr/lib/go/src/runtime/netpoll.go:157 +0x60
net.(*pollDesc).Wait(0xc8200c80d0, 0x72, 0x0, 0x0)
/usr/lib/go/src/net/fd_poll_runtime.go:73 +0x3a
net.(*pollDesc).WaitRead(0xc8200c80d0, 0x0, 0x0)
/usr/lib/go/src/net/fd_poll_runtime.go:78 +0x36
net.(*netFD).readFrom(0xc8200c8070, 0xc8200f6000, 0x2000, 0x2000, 0x0, 0x0, 0x0, 0x7fe3109ab050, 0xc820010240)
/usr/lib/go/src/net/fd_unix.go:259 +0x2a5
net.(*UDPConn).ReadFromUDP(0xc8200cc008, 0xc8200f6000, 0x2000, 0x2000, 0x0, 0x0, 0x0, 0x0)
/usr/lib/go/src/net/udpsock_posix.go:61 +0x117
net.(*UDPConn).ReadFrom(0xc8200cc008, 0xc8200f6000, 0x2000, 0x2000, 0x1e5, 0x0, 0x0, 0x0, 0x0)
/usr/lib/go/src/net/udpsock_posix.go:79 +0x116
github.com/anacrolix/utp.(*Socket).reader(0xc8200d8000)
/home/clandmeter/go-torrent/go/src/github.com/anacrolix/utp/utp.go:458 +0xf1
created by github.com/anacrolix/utp.NewSocketFromPacketConn
/home/clandmeter/go-torrent/go/src/github.com/anacrolix/utp/utp.go:432 +0x24b
goroutine 20 [chan receive]:
github.com/anacrolix/utp.(*Socket).dispatcher(0xc8200d8000)
/home/clandmeter/go-torrent/go/src/github.com/anacrolix/utp/utp.go:509 +0x6e
created by github.com/anacrolix/utp.NewSocketFromPacketConn
/home/clandmeter/go-torrent/go/src/github.com/anacrolix/utp/utp.go:433 +0x270
goroutine 21 [semacquire]:
sync.runtime_Syncsemacquire(0xc8200d8028)
/usr/lib/go/src/runtime/sema.go:237 +0x201
sync.(*Cond).Wait(0xc8200d8018)
/usr/lib/go/src/sync/cond.go:62 +0x9b
github.com/anacrolix/utp.(*Socket).nextSyn(0xc8200d8000, 0x0, 0x0, 0x0, 0xc820031e00)
/home/clandmeter/go-torrent/go/src/github.com/anacrolix/utp/utp.go:1258 +0x1f2
github.com/anacrolix/utp.(*Socket).Accept(0xc8200d8000, 0x0, 0x0, 0x0, 0x0)
/home/clandmeter/go-torrent/go/src/github.com/anacrolix/utp/utp.go:1265 +0x58
github.com/anacrolix/torrent.(*Client).acceptConnections(0xc8200b4000, 0x7fe310956170, 0xc8200d8000, 0xc8200dc001)
/home/clandmeter/go-torrent/go/src/github.com/anacrolix/torrent/client.go:625 +0x4d
created by github.com/anacrolix/torrent.NewClient
/home/clandmeter/go-torrent/go/src/github.com/anacrolix/torrent/client.go:525 +0xa37
goroutine 22 [semacquire]:
sync.runtime_Semacquire(0xc8200e203c)
/usr/lib/go/src/runtime/sema.go:43 +0x26
sync.(*Mutex).Lock(0xc8200e2038)
/usr/lib/go/src/sync/mutex.go:82 +0x1c4
github.com/anacrolix/torrent/dht.(*Server).serve(0xc8200e2000, 0x0, 0x0)
/home/clandmeter/go-torrent/go/src/github.com/anacrolix/torrent/dht/server.go:213 +0x1a7
github.com/anacrolix/torrent/dht.NewServer.func1(0xc8200cc018)
/home/clandmeter/go-torrent/go/src/github.com/anacrolix/torrent/dht/server.go:102 +0x28
created by github.com/anacrolix/torrent/dht.NewServer
/home/clandmeter/go-torrent/go/src/github.com/anacrolix/torrent/dht/server.go:111 +0x3aa
goroutine 23 [select]:
github.com/anacrolix/torrent/dht.(*Server).bootstrap(0xc8200e2000, 0x0, 0x0)
/home/clandmeter/go-torrent/go/src/github.com/anacrolix/torrent/dht/server.go:586 +0x5a5
github.com/anacrolix/torrent/dht.NewServer.func2(0xc8200cc018)
/home/clandmeter/go-torrent/go/src/github.com/anacrolix/torrent/dht/server.go:113 +0x28
created by github.com/anacrolix/torrent/dht.NewServer
/home/clandmeter/go-torrent/go/src/github.com/anacrolix/torrent/dht/server.go:121 +0x3cc
goroutine 24 [chan receive]:
github.com/anacrolix/torrent.(*Client).announceTorrentTrackersFastStart(0xc8200b4000, 0xc820126000, 0xc8200dc220, 0x1, 0x1, 0xc8200f2420, 0x0)
/home/clandmeter/go-torrent/go/src/github.com/anacrolix/torrent/client.go:2396 +0x20f
github.com/anacrolix/torrent.(*Client).announceTorrentTrackers(0xc8200b4000, 0xc8200f2420)
/home/clandmeter/go-torrent/go/src/github.com/anacrolix/torrent/client.go:2421 +0x20c
created by github.com/anacrolix/torrent.(*Client).AddTorrentSpec
/home/clandmeter/go-torrent/go/src/github.com/anacrolix/torrent/client.go:2217 +0x7f7
goroutine 25 [select]:
github.com/anacrolix/torrent.(*Client).announceTorrentDHT(0xc8200b4000, 0xc8200f2420, 0x1)
/home/clandmeter/go-torrent/go/src/github.com/anacrolix/torrent/client.go:2293 +0x811
created by github.com/anacrolix/torrent.(*Client).AddTorrentSpec
/home/clandmeter/go-torrent/go/src/github.com/anacrolix/torrent/client.go:2220 +0x839
goroutine 26 [chan receive]:
main.NewClient.func1(0xc8200b4000, 0xc8200f2420)
/home/clandmeter/go-torrent/go/src/github.com/Sioro-Neoku/go-peerflix/client.go:95 +0x59
created by main.NewClient
/home/clandmeter/go-torrent/go/src/github.com/Sioro-Neoku/go-peerflix/client.go:102 +0x427
goroutine 27 [select]:
net/http.(*Transport).getConn(0xc820092090, 0xc820186000, 0x0, 0x9177e0, 0x4, 0xc82000b340, 0x14, 0x0, 0x0, 0x0)
/usr/lib/go/src/net/http/transport.go:554 +0x663
net/http.(*Transport).RoundTrip(0xc820092090, 0xc820186000, 0xc800000000, 0x0, 0x0)
/usr/lib/go/src/net/http/transport.go:228 +0x4ac
net/http.send(0xc820186000, 0x7fe3109af4d8, 0xc820092090, 0xc82000fad0, 0x0, 0x0)
/usr/lib/go/src/net/http/client.go:220 +0x52c
net/http.(*Client).send(0xab6400, 0xc820186000, 0x2e, 0x0, 0x0)
/usr/lib/go/src/net/http/client.go:143 +0x15a
net/http.(*Client).doFollowingRedirects(0xab6400, 0xc820186000, 0x94fc60, 0x0, 0x0, 0x0)
/usr/lib/go/src/net/http/client.go:380 +0xbc0
net/http.(*Client).Get(0xab6400, 0x9177e0, 0x2e, 0x403682, 0x0, 0x0)
/usr/lib/go/src/net/http/client.go:306 +0xaa
net/http.Get(0x9177e0, 0x2e, 0xc820038058, 0x0, 0x0)
/usr/lib/go/src/net/http/client.go:281 +0x45
main.downloadFile(0x9177e0, 0x2e, 0x0, 0x0, 0x0, 0x0)
/home/clandmeter/go-torrent/go/src/github.com/Sioro-Neoku/go-peerflix/client.go:281 +0x129
main.(*Client).addBlocklist(0xc82000f7a0)
/home/clandmeter/go-torrent/go/src/github.com/Sioro-Neoku/go-peerflix/client.go:121 +0x147
created by main.NewClient
/home/clandmeter/go-torrent/go/src/github.com/Sioro-Neoku/go-peerflix/client.go:104 +0x449
goroutine 28 [IO wait]:
net.runtime_pollWait(0x7fe310955e30, 0x72, 0xc820010240)
/usr/lib/go/src/runtime/netpoll.go:157 +0x60
net.(*pollDesc).Wait(0xc8201760d0, 0x72, 0x0, 0x0)
/usr/lib/go/src/net/fd_poll_runtime.go:73 +0x3a
net.(*pollDesc).WaitRead(0xc8201760d0, 0x0, 0x0)
/usr/lib/go/src/net/fd_poll_runtime.go:78 +0x36
net.(*netFD).accept(0xc820176070, 0x0, 0x7fe3109af9b8, 0xc82017a020)
/usr/lib/go/src/net/fd_unix.go:408 +0x27c
net.(*TCPListener).AcceptTCP(0xc820182000, 0xc82013ad38, 0x0, 0x0)
/usr/lib/go/src/net/tcpsock_posix.go:254 +0x4d
net/http.tcpKeepAliveListener.Accept(0xc820182000, 0x0, 0x0, 0x0, 0x0)
/usr/lib/go/src/net/http/server.go:2135 +0x41
net/http.(*Server).Serve(0xc82017e000, 0x7fe31087d028, 0xc820182000, 0x0, 0x0)
/usr/lib/go/src/net/http/server.go:1887 +0xb3
net/http.(*Server).ListenAndServe(0xc82017e000, 0x0, 0x0)
/usr/lib/go/src/net/http/server.go:1877 +0x136
net/http.ListenAndServe(0xc820178020, 0x5, 0x0, 0x0, 0x0, 0x0)
/usr/lib/go/src/net/http/server.go:1967 +0x8f
main.main.func1(0xc82000f770, 0xc8200111b0)
/home/clandmeter/go-torrent/go/src/github.com/Sioro-Neoku/go-peerflix/main.go:48 +0x149
created by main.main
/home/clandmeter/go-torrent/go/src/github.com/Sioro-Neoku/go-peerflix/main.go:49 +0x383
goroutine 29 [select, locked to thread]:
runtime.gopark(0x950078, 0xc820107f28, 0x8931a8, 0x6, 0x433218, 0x2)
/usr/lib/go/src/runtime/proc.go:185 +0x163
runtime.selectgoImpl(0xc820107f28, 0x0, 0x18)
/usr/lib/go/src/runtime/select.go:392 +0xa64
runtime.selectgo(0xc820107f28)
/usr/lib/go/src/runtime/select.go:212 +0x12
runtime.ensureSigM.func1()
/usr/lib/go/src/runtime/signal1_unix.go:227 +0x353
runtime.goexit()
/usr/lib/go/src/runtime/asm_amd64.s:1721 +0x1
goroutine 34 [select]:
net/http.(*Transport).getConn(0xc820092090, 0xc8202020e0, 0x0, 0xc820206000, 0x4, 0xc820206007, 0x15, 0x0, 0x0, 0x0)
/usr/lib/go/src/net/http/transport.go:554 +0x663
net/http.(*Transport).RoundTrip(0xc820092090, 0xc8202020e0, 0x152, 0x0, 0x0)
/usr/lib/go/src/net/http/transport.go:228 +0x4ac
net/http.send(0xc8202020e0, 0x7fe3109af4d8, 0xc820092090, 0xc820206100, 0x0, 0x0)
/usr/lib/go/src/net/http/client.go:220 +0x52c
net/http.(*Client).send(0xab6400, 0xc8202020e0, 0xf8, 0x0, 0x0)
/usr/lib/go/src/net/http/client.go:143 +0x15a
net/http.(*Client).doFollowingRedirects(0xab6400, 0xc8202020e0, 0x94fc60, 0x0, 0x0, 0x0)
/usr/lib/go/src/net/http/client.go:380 +0xbc0
net/http.(*Client).Get(0xab6400, 0xc820206000, 0xf8, 0xc820204000, 0x0, 0x0)
/usr/lib/go/src/net/http/client.go:306 +0xaa
net/http.Get(0xc820206000, 0xf8, 0xf8, 0x0, 0x0)
/usr/lib/go/src/net/http/client.go:281 +0x45
github.com/anacrolix/torrent/tracker.(*client).Announce(0xc8200da180, 0xc820126000, 0x0, 0xc800000000, 0x0, 0x0, 0x0, 0x0, 0x0)
/home/clandmeter/go-torrent/go/src/github.com/anacrolix/torrent/tracker/http.go:74 +0xd43
github.com/anacrolix/torrent.(*Client).announceTorrentSingleTracker(0xc8200b4000, 0x7fe3109562c8, 0xc8200da180, 0xc820126000, 0xc8200f2420, 0x0, 0x0)
/home/clandmeter/go-torrent/go/src/github.com/anacrolix/torrent/client.go:2362 +0x3ed
github.com/anacrolix/torrent.(*Client).announceTorrentTrackersFastStart.func1(0xc8200b4000, 0xc820126000, 0xc8200f2420, 0xc820126060, 0x7fe3109562c8, 0xc8200da180)
/home/clandmeter/go-torrent/go/src/github.com/anacrolix/torrent/client.go:2390 +0x50
created by github.com/anacrolix/torrent.(*Client).announceTorrentTrackersFastStart
/home/clandmeter/go-torrent/go/src/github.com/anacrolix/torrent/client.go:2392 +0x195
goroutine 30 [chan receive]:
main.main.func3(0xc82000f770, 0xc8200d4360)
/home/clandmeter/go-torrent/go/src/github.com/Sioro-Neoku/go-peerflix/main.go:70 +0x68
created by main.main
/home/clandmeter/go-torrent/go/src/github.com/Sioro-Neoku/go-peerflix/main.go:75 +0x6b1
goroutine 68 [semacquire]:
sync.runtime_Semacquire(0xc82017891c)
/usr/lib/go/src/runtime/sema.go:43 +0x26
sync.(*WaitGroup).Wait(0xc820178910)
/usr/lib/go/src/sync/waitgroup.go:126 +0xb4
github.com/anacrolix/torrent/dht.(*Server).bootstrap.func2(0xc820178910, 0xc82017e5a0)
/home/clandmeter/go-torrent/go/src/github.com/anacrolix/torrent/dht/server.go:582 +0x21
created by github.com/anacrolix/torrent/dht.(*Server).bootstrap
/home/clandmeter/go-torrent/go/src/github.com/anacrolix/torrent/dht/server.go:584 +0x3f6
goroutine 82 [IO wait]:
net.runtime_pollWait(0x7fe310955bf0, 0x77, 0x456960)
/usr/lib/go/src/runtime/netpoll.go:157 +0x60
net.(*pollDesc).Wait(0xc820067790, 0x77, 0x0, 0x0)
/usr/lib/go/src/net/fd_poll_runtime.go:73 +0x3a
net.(*pollDesc).WaitWrite(0xc820067790, 0x0, 0x0)
/usr/lib/go/src/net/fd_poll_runtime.go:82 +0x36
net.(*netFD).connect(0xc820067730, 0x0, 0x0, 0x7fe3108bd0b0, 0xc82000b780, 0xece0b1b56, 0x104ca1d8, 0xab6520, 0x0, 0x0)
/usr/lib/go/src/net/fd_unix.go:114 +0x1f6
net.(*netFD).dial(0xc820067730, 0x7fe310955068, 0x0, 0x7fe310955068, 0xc82022c150, 0xece0b1b56, 0x104ca1d8, 0xab6520, 0x0, 0x0)
/usr/lib/go/src/net/sock_posix.go:137 +0x351
net.socket(0x893680, 0x3, 0x2, 0x1, 0x0, 0xc82022c100, 0x7fe310955068, 0x0, 0x7fe310955068, 0xc82022c150, ...)
/usr/lib/go/src/net/sock_posix.go:89 +0x411
net.internetSocket(0x893680, 0x3, 0x7fe310955068, 0x0, 0x7fe310955068, 0xc82022c150, 0xece0b1b56, 0xc8104ca1d8, 0xab6520, 0x1, ...)
/usr/lib/go/src/net/ipsock_posix.go:160 +0x141
net.dialTCP(0x893680, 0x3, 0x0, 0xc82022c150, 0xece0b1b56, 0xc8104ca1d8, 0xab6520, 0x1, 0x0, 0x0)
/usr/lib/go/src/net/tcpsock_posix.go:171 +0x11e
net.dialSingle(0xc82009e600, 0x7fe310955000, 0xc82022c150, 0xece0b1b56, 0x7fff104ca1d8, 0xab6520, 0x0, 0x0, 0x0, 0x0)
/usr/lib/go/src/net/dial.go:364 +0x3f5
net.dialSerial.func1(0xece0b1b56, 0x104ca1d8, 0xab6520, 0x0, 0x0, 0x0, 0x0)
/usr/lib/go/src/net/dial.go:336 +0x75
net.dial(0x893680, 0x3, 0x7fe310955000, 0xc82022c150, 0xc8201c36e8, 0xece0b1b56, 0x104ca1d8, 0xab6520, 0x0, 0x0, ...)
/usr/lib/go/src/net/fd_unix.go:40 +0x60
net.dialSerial(0xc82009e600, 0xc820011900, 0x1, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0)
/usr/lib/go/src/net/dial.go:338 +0x760
net.(*Dialer).Dial(0xc820012410, 0x893680, 0x3, 0xc820206007, 0x15, 0x0, 0x0, 0x0, 0x0)
/usr/lib/go/src/net/dial.go:232 +0x50f
net.(*Dialer).Dial-fm(0x893680, 0x3, 0xc820206007, 0x15, 0x0, 0x0, 0x0, 0x0)
/usr/lib/go/src/net/http/transport.go:38 +0x6e
net/http.(*Transport).dial(0xc820092090, 0x893680, 0x3, 0xc820206007, 0x15, 0x0, 0x0, 0x0, 0x0)
/usr/lib/go/src/net/http/transport.go:499 +0x79
net/http.(*Transport).dialConn(0xc820092090, 0x0, 0xc820206000, 0x4, 0xc820206007, 0x15, 0x0, 0x0, 0x0)
/usr/lib/go/src/net/http/transport.go:596 +0x19a9
net/http.(*Transport).getConn.func4(0xc820092090, 0x0, 0xc820206000, 0x4, 0xc820206007, 0x15, 0xc820208000)
/usr/lib/go/src/net/http/transport.go:549 +0x66
created by net/http.(*Transport).getConn
/usr/lib/go/src/net/http/transport.go:551 +0x265
goroutine 6 [IO wait]:
net.runtime_pollWait(0x7fe310955b30, 0x77, 0x456960)
/usr/lib/go/src/runtime/netpoll.go:157 +0x60
net.(*pollDesc).Wait(0xc8200c8290, 0x77, 0x0, 0x0)
/usr/lib/go/src/net/fd_poll_runtime.go:73 +0x3a
net.(*pollDesc).WaitWrite(0xc8200c8290, 0x0, 0x0)
/usr/lib/go/src/net/fd_poll_runtime.go:82 +0x36
net.(*netFD).connect(0xc8200c8230, 0x0, 0x0, 0x7fe3108bd0b0, 0xc8200dc4e0, 0xece0b1b56, 0x104360f2, 0xab6520, 0x0, 0x0)
/usr/lib/go/src/net/fd_unix.go:114 +0x1f6
net.(*netFD).dial(0xc8200c8230, 0x7fe310955068, 0x0, 0x7fe310955068, 0xc8200c47b0, 0xece0b1b56, 0x104360f2, 0xab6520, 0x0, 0x0)
/usr/lib/go/src/net/sock_posix.go:137 +0x351
net.socket(0x893680, 0x3, 0x2, 0x1, 0x0, 0xc8200c4700, 0x7fe310955068, 0x0, 0x7fe310955068, 0xc8200c47b0, ...)
/usr/lib/go/src/net/sock_posix.go:89 +0x411
net.internetSocket(0x893680, 0x3, 0x7fe310955068, 0x0, 0x7fe310955068, 0xc8200c47b0, 0xece0b1b56, 0x5b104360f2, 0xab6520, 0x1, ...)
/usr/lib/go/src/net/ipsock_posix.go:160 +0x141
net.dialTCP(0x893680, 0x3, 0x0, 0xc8200c47b0, 0xece0b1b56, 0xc8104360f2, 0xab6520, 0x1, 0x0, 0x0)
/usr/lib/go/src/net/tcpsock_posix.go:171 +0x11e
net.dialSingle(0xc8200da500, 0x7fe310955000, 0xc8200c47b0, 0xece0b1b56, 0x7fff104360f2, 0xab6520, 0x0, 0x0, 0x0, 0x0)
/usr/lib/go/src/net/dial.go:364 +0x3f5
net.dialSerial.func1(0xece0b1b56, 0x104360f2, 0xab6520, 0x0, 0x0, 0x0, 0x0)
/usr/lib/go/src/net/dial.go:336 +0x75
net.dial(0x893680, 0x3, 0x7fe310955000, 0xc8200c47b0, 0xc8201996e8, 0xece0b1b56, 0x104360f2, 0xab6520, 0x0, 0x0, ...)
/usr/lib/go/src/net/fd_unix.go:40 +0x60
net.dialSerial(0xc8200da500, 0xc8200c65e0, 0x1, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0)
/usr/lib/go/src/net/dial.go:338 +0x760
net.(*Dialer).Dial(0xc820012410, 0x893680, 0x3, 0xc82000b340, 0x14, 0x0, 0x0, 0x0, 0x0)
/usr/lib/go/src/net/dial.go:232 +0x50f
net.(*Dialer).Dial-fm(0x893680, 0x3, 0xc82000b340, 0x14, 0x0, 0x0, 0x0, 0x0)
/usr/lib/go/src/net/http/transport.go:38 +0x6e
net/http.(*Transport).dial(0xc820092090, 0x893680, 0x3, 0xc82000b340, 0x14, 0x0, 0x0, 0x0, 0x0)
/usr/lib/go/src/net/http/transport.go:499 +0x79
net/http.(*Transport).dialConn(0xc820092090, 0x0, 0x9177e0, 0x4, 0xc82000b340, 0x14, 0x0, 0x0, 0x0)
/usr/lib/go/src/net/http/transport.go:596 +0x19a9
net/http.(*Transport).getConn.func4(0xc820092090, 0x0, 0x9177e0, 0x4, 0xc82000b340, 0x14, 0xc820016480)
/usr/lib/go/src/net/http/transport.go:549 +0x66
created by net/http.(*Transport).getConn
/usr/lib/go/src/net/http/transport.go:551 +0x265
goroutine 32 [running]:
goroutine running on other thread; stack unavailable
created by github.com/anacrolix/torrent/dht.(*Server).processPacket
/home/clandmeter/go-torrent/go/src/github.com/anacrolix/torrent/dht/server.go:197 +0x3e2
goroutine 69 [select]:
github.com/anacrolix/torrent/dht.(*Server).Announce.func2(0xc820228000)
/home/clandmeter/go-torrent/go/src/github.com/anacrolix/torrent/dht/announce.go:76 +0x244
created by github.com/anacrolix/torrent/dht.(*Server).Announce
/home/clandmeter/go-torrent/go/src/github.com/anacrolix/torrent/dht/announce.go:87 +0x474
panic: sync: inconsistent mutex state
goroutine 32 [running]:
sync.(*Mutex).Lock(0xc8200e2038)
/usr/lib/go/src/sync/mutex.go:74 +0x16d
github.com/anacrolix/torrent/dht.(*Transaction).handleResponse(0xc82020e120, 0x0, 0x0, 0x0, 0xc8200c7030, 0x1, 0xc8200c70d0, 0x1, 0xc8200e40f0, 0x0, ...)
/home/clandmeter/go-torrent/go/src/github.com/anacrolix/torrent/dht/transaction.go:136 +0xd8
created by github.com/anacrolix/torrent/dht.(*Server).processPacket
/home/clandmeter/go-torrent/go/src/github.com/anacrolix/torrent/dht/server.go:197 +0x3e2
When saving temp video files, it would be great if go-peerflix
would create specific subfolder in the temp location. Like, /tmp/go-peerflix
or something like this.
Okay i want o know before trying it out
So first of all i like the idea - kudos on that.
Second of all i hope you manage that todo for OS detection it would make things a lot easier (even tho on Ubuntu you just need to remove "open","-a" and it works).
But what i really don't like (don' take this personally) is that when i close VLC that the download keeps going. Is that on your check/todo list? :)
Thanks and keep up the great work.
go-peerflix will expose http://localhost:8080/
so vlc can play it
question is
how to How to play stream video in H5 ?
stream is RTSP or RT ?
like this ?
<video id="video" src="http://localhost:8080/" autoplay="autoplay" />
video is just black
anything else to add in ?
how can I do this ? blob?
<video autoplay="" controls="" src="blob:https://webtorrent.io/f98970c4-4442-43f7-bcd1-97ec056b9d1a" preload="auto"></video>
In addition to the largest file, subtitle files should also be downloaded and served via HTTP.
I'm not sure how video players handle this, but I remember PT having subtitle support so it must be possible.
What do you think?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.