IENT / YUView

The Free and Open Source Cross Platform YUV Viewer with an advanced analytics toolset
http://ient.github.io/YUView
Other
1.87k stars 367 forks source link

Streamming files from URL #93

Open adminy opened 7 years ago

adminy commented 7 years ago

I have a lot of hvec x265 video chunks sitting on web links. I download each for preview but it would be an awesome feature if instead of open downloaded file you could just insert url.

I'm guessing there will have to be a few changes in the code like not able to parse the entire file although I am thinking of a workaround that. Append GOP's to existing item in playlist should work. So can you please implement this? I'm not that good with c++

ChristianFeldmann commented 7 years ago

In principle, this is possible. Currently, YUView does the following when opening a raw hevc annex B file:

This is certainly not optimal for WAN connections but for small files and a fast enough internet connection, this approach could also work.

adminy commented 7 years ago

What is the point in having a caching decoder? It makes 83GB per minute of HD video in raw RGB 1080p (YUView stores alpha channel too?!). Even small resolution files still should fill up the ram quickly.

ChristianFeldmann commented 7 years ago

Ok. First on the general concept of caching: We cache what we will display on screen: The raw RGB QImage. Not the YUV values. The internal format of this QImage is platform independent. On most platforms, this includes 4 bytes per pixel (RGBA). The caching is only needed for smooth playback. In the settings you can select how much RAM you want to use for caching (or you can disable caching alltogether).

We instanciate two decoders in order to satisfy the need for caching in the background and the need for interactive decoding in the foreground. With this solution, both is possible at the same time without seeking the decoder every time the user wants to see a non-cached image or the user wants to inspect the raw YUV values (which are not cached so they need to be decoded again if the displayed image came from the cache).

The memory overhead for the two decoders is rather small compared to the cached raw RGB images. For a 1080p sequence, this is roughly 8.3 MB per frame.