Comments (5)
Does it actually leak the memory? What if you close the LAV instance, does it get free'ed? 100mb of memory isn't something to worry about if its not actually leaked, and maybe just in-use.
Its not a leak if the memory is free'ed, since its not lost. Its just in use.
from lavfilters.
Perhaps I used an incorrect term (memory leak). Indeed, consumed memory is freed when I close LAV video instance. However, another problem still exists.
The problem is that memory consumption always grows while decoding h264, especially in case of "bad" stream, and it seems that it is never released. As a result, the application that uses LAV instance for h264 decoding will be anyway terminated by the system with "out of memory" exception.
Maybe such behaviour is ok if LAV is used for movie watching - in this case LAV is used only while the movie is being played and there will be not enough time for memory to finish. But my purpose is to use LAV for 24/7 video decoding from network - that's why I am worried about it.
You said that 100 mb of memory is ok, but that value was just for a couple of minutes of errorneous video decoding.
From my point of view, I just do not understand such behaviour of h.264 decoder - the memory consumption and allocations only increase with time and released only when instance of decoder is closed. Why those huge amounts of already allocated memory cannot be reused somehow?
Have you performed some long-lasting tests of LAV video decoder with h264 videos?
from lavfilters.
The H264 decoder is the most common decoder to be used, on a daily basis by millions, not only in LAV but also through the FFmpeg project in many other applications - so if it had any big fundamental flaws, it would be known, trust me. :)
Without knowing where exactly the memory goes to, I cannot judge why it does that. But considering its not actually leaked, it seems to be functioning fine. Allocating memory it doesn't really need without leaking is rather unusual.
from lavfilters.
One simple idea, LAV has internal queues that it tries to fill as best as it can to ensure smooth playback. Obviously with real-time streaming, it won't be able to really fill the queues, because data arrives in realtime and is played in realtime.
However, if such a short stream "hiccup" occurs, it could feed a bit more data into the queues as audio and video have to sync again. If your stream is sufficiently high bitrate, this could accumulate over time.
Note that these queues have an upper limit and won't grow indefinitely.
LAV offers a maintenance interface to inspect the size of the queues through IBufferInfo (definition in developer_info), which lets you query the number of packets and the overall memory size of the queues. You could check that.
There is also options in LAV Splitter to tune the maximum size of the queues, both in number of packets and memory size.
from lavfilters.
Closing due to lack of clear information. Its definitely not a leak, as the memory is free'ed when the LAV instance is closed.
from lavfilters.
Related Issues (20)
- Chipmunk voices or no sowftare volume control when using player built-in audio transform filter HOT 1
- Crash in LAV Splitter tray menu
- Feature Request: Pitch Correction Support During Playback Speed Adjustments HOT 2
- RTX HDR not working for alot of X265 videos HOT 4
- Deprecated
- LAV Splitter Subtitles Selection HOT 4
- Feature reqest: Add ffmpeg.exe and ffprobe.exe to the package HOT 3
- Blacklist more mov/mp4 handler names HOT 1
- VVC support broken? HOT 1
- I don't know how to set up a decoder to play WMV files.
- OSD expansion with audio and subtitles HOT 2
- Artifacts in Some YouTube HDR Videos When Trying to Playback Using Hardware Decoding HOT 14
- Improve downtime in audio when seeking with bitstreaming enabled HOT 6
- VP9 and HEVC hardware accelleration support wrongly detected HOT 5
- LAV Audio Mixing. Wrong channel mixing when use 5.1 to 2.0 (Stereo) downmix HOT 2
- Streamlink not working after 79.2?
- Get stereo frame buffer when decoding H.264 MVC HOT 4
- Generic D3D11 copyback choice HOT 1
- I updated potplayer to version 240618 (1.7.22260) and then I encountered some errors
- [Suggestion] LAV Splitter Source: allow selecting smaller video resolution in multi-resolution HLS livestream HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lavfilters.