odyseeteam / player-server Goto Github PK
View Code? Open in Web Editor NEWMedia server for Odysee
Media server for Odysee
Right now, the app triggers a file view event on internal APIs.
On top of this, we also want to track any playback events from RSS feeds or any other sources who access content directly.
We still want to track authenticated calls through the apps, so we'll need to pass a param with these player requests/download links so you know not to call it again.
Would be nice if the get call returned a special message when the video is not fully available or there's network issues. If get isn't the right place, then can we have a separate api?
A prometheus metric for resolve
call failures and durations needs to be added.
Existing metrics reside in the internal/metrics
package.
The next hub will replace # with :, we should treat that as similar separators and support both.
according to caddyserver/caddy#1460 and https://caddyserver.com/docs/caddyfile/directives/reverse_proxy
we should try to use flush_interval=-1 on our servers to see if that improves playback.
Debug, understand and fix the performance degradation of the player if left running for a certain amount of time
See slack convo /
2. HTTP Headers
The M3U8 playlists and the TS segments must have proper CORS headers. These are known-good headers for the M3U8 file (with the Content-Length and associated headers of course being altered as needed):
Access-Control-Allow-Methods: GET, OPTIONS
Access-Control-Allow-Origin: *
Connection: close
Content-Length: 844
Content-Range: bytes bytes 0-843/844
Content-Type: application/vnd.apple.mpegurl
These are known-good headers for the TS files:
Access-Control-Allow-Methods: GET, OPTIONS
Access-Control-Allow-Origin: *
Connection: close
Content-Length: 3286804
Content-Range: bytes 0-3286803/3286804
Content-Type: video/mp2t
2.1. Configuring .htaccess
If you are using Apache to serve the files, add this to the .htaccess file:
<FilesMatch "\.(m3u8|ts)$">
Header set Access-Control-Allow-Origin "*"
Header set Access-Control-Allow-Methods "GET, OPTIONS"
</FilesMatch>
For first-level chunk caching, i.e. saving blobs locally for immediately serving them to the client in subsequent requests, we need to implement a simple FIFO cache to complement our more sophisticated second-level longer term cache.
To support OdyseeTeam/transcoder#19
If a new claim version is uploaded before query cache invalidation timeout, it's possible for the old claim version to be retrieved and subsequently cached in downstream CDN.
Keeps rising after a while. Profiling shows a lot of GC calls caused by using WithFields
logging function.
@nikooo777 could you please add instructions regarding the config file?
Perhaps we should also consider moving more flags into the config.
Originally posted by @andybeletsky in #86 (comment)
Things to watch:
A good place to start is to look at existing metrics, which are declared in internal/metrics
.
It would be useful to collect metrics which would allow us to assess our clients network capacity, such as:
We can remove the need to have a running lbrynet instance nearby by using grpc interface for LBRY hub instead.
After this is done, we can drop lbrynetClient setup code and update Ansible to remove lbrynet dependency (cc @nikooo777)
Right now it works by calling metrics.StreamsRunning
at the start of binary stream request, which is not suitable for HLS as each HLS stream is guaranteed to incur a multitude of requests.
One way to do it could be maintaining a list of clients that request HLS fragments, based on stream URL, and drop them off after a certain timeout.
Player not invalidating streams when transcoded fragments go missing (i.e. after stream storage eviction). Entrire streams should be invalidated if requesting any of the fragments returns a 404.
One possible scenario is master playlist being requested on one player and other parts of the stream from another.
We narrowed down and tracked an issue where certain players/reflectors would end up with a broken blob, causing streams to die. Deleting the blobs on the player and source reflector fixed the issue.
How do we identify and delete automatically? Or prevent from happening as it's writing them.
The license file is missing
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.