AuXBoX Wrote:cool that worked
Just a question, why does mythbox need a buffer, when i use mythtv it doesn't have any.
hmm..its kinda complicated. There are basically two ways to watch programs/livetv
1) stream directly from the backend using mythtv's protocol
pros
-----
- no need to mount remote filesystems
cons
-----
- when the backend is under load (>3 loadavg on a single core cpu), transfers can slow down, lots of excessive buffering, mythbackend becomes unresponsive
- each client has to talk mythtv's protocol
2) read directly from the filesystem (local or mounted)
pros
-----
- remote mounts are extremely resilient to high backend server load (in my experience w/ NFS). no buffering pauses, lag, jitter, etc.
cons
-----
- it is a hassle to have remote recording directories mounted locally
- depending on the type of remote filesystem protocol used (NFS, samba, afs, sshfs, etc), a variety of issues can arise.
So, MythBox uses method 2 because my backend is not just a mythbackend. In addition to doing a host of other things, anytime the loadavg goes above 3, it shouldn't affect my ability to watch TV.
Going back to the original question of why MythBox needs a buffer...when using method 2 and watching live tv, the livetv file is growing dynamically over time. When XBMC plays the livetv file and comes to what it thinks is the end of the stream (even though it is still growing), it doesn't block as you would expect. By no fault of its own, it just thinks it has reached the end of the stream and stops. The buffer essentially guarantees that XBMC will not catchup to the end of the livetv file as it is being recorded.
So thats how things work currently with svn 1260. However, I'm changing things up a bit because livetv seems problematic at times over a mounted remote filesystem.
If you're using svn 1510, this is how things work:
- livetv with an 0.21 backend uses method 1 (stable)
- livetv with an 0.22 backend uses method 2 (unstable)
- watching recordings regardless of 0.21/0.22 uses method 2 (stable)
I want to get to the point where livetv with a 0.22 backend uses method 1 also but you need the latest XBMC svn for that with some code changes. Its coming along...