Giter Site home page Giter Site logo

Comments (4)

abbasshah17 avatar abbasshah17 commented on August 11, 2024 1

Thanks a lot.

from torrentstream-android.

se-bastiaan avatar se-bastiaan commented on August 11, 2024

which hints at video metadata sometimes being present at the end of the file.

That's exactly the reason.

from torrentstream-android.

abbasshah17 avatar abbasshah17 commented on August 11, 2024

Then how do you make sure that the required information is completely downloaded, I'm talking in terms of size, how do you make sure you've downloaded the all the required pieces, containing metadata info.

In case we are downloading them blindly, is there a way to know firsthand which pieces should be downloaded? So that we only download the required pieces.

Also I realize it is out of the scope for this question, but can you also provide a reference where I can further look into different video types which describes the end-of-file-meta-data behavior.

from torrentstream-android.

se-bastiaan avatar se-bastiaan commented on August 11, 2024

It's a bit of a guess. Most of the metadata (container information, like MP4 of MKV) should fit in the first and last few pieces because the majority of the file is just video. I built this mostly based on trial-and-error and looking at the video player implementations iirc. If you open a mp4 video in a webbrowser for example you'll see in the network inspector that it specifically requests the last part of the file as well. It probably depends on the video player that is used, which for me was mostly a LibVLC based client and actually just Chrome via some HTTP server (and eventually TorrentStreamServer) to make sure that the videos could be played on Chromecast-like devices.

I don't remember looking up the specifications of video formats, but you should be able to find them to see how the container formats actually work. Matroska (mkv) is here for example: https://matroska.org/technical/order/index.html

from torrentstream-android.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.