File size is not updated while playing file
#1
I am using XBMC in conjunction with MythTV, and I am also sometimes using my household server to transcode files for playback on my XBMC system.

The problem shows up when XBMC is playing a file that the server is still actively writing to. MythTV works fine when I'm using the PVR plugin, but if I start watching a file while it is being recorded or transcoded XBMC doesn't update the file size as it plays even though the file is growing on the server.

This causes two problems:

First of all, XBMC will stop playback when it thinks it has reached the end of the file even though there is more to the file.
Secondly, XBMC will update the file in the database as "Played" which resets the playback pointer to 0.

My workaround has been to stop playback 2 minutes before the reported end time, and then resume playback which forces XBMC to refresh the file size.

Is there a better solution? Is there some way I can force XBMC to refresh the file's size as it plays?

Is it because I am serving the files through a SMB share mounted by the OS and not using the built-in XBMC samba client?
Reply
#2
ffmpeg evaluates files size and a couple of other parameters when playback is started. Playback of recordings in progress is not supported via normal playback in XBMC. This capability has to be provided by the addon i.e. I have implemented this for vnsi.
Reply
#3
So then, is there something I can do to provide this for myself? If it is not possible natively with normal playback, then I would want to write an addon to supply this functionality. Where should I go to learn how to implement this?
Reply
#4
Check out ffmpeg demuxer: https://github.com/xbmc/xbmc/blob/master...g.cpp#L745
It allows for packets being past initial duration and adjusts duration of the context. As long as the input stream does not return EOF, playback continues. Addons can provide their own read function like VNSI does:
https://github.com/opdenkamp/xbmc-pvr-ad...ng.cpp#L88
https://github.com/opdenkamp/xbmc-pvr-ad...t.cpp#L743
Reply
#5
Thanks for the reply. Your links really sound helpful, but I thought addons were to be written in python.

Please forgive me for being an XBMC development noob, but can this solution be implemented in python? If not, I'll probably give up on it because I don't have the time to really decipher the source code you sent even though I can tell it could solve the problem.
Reply
#6
No, it can't be done in python. Playback of recordings in progress is standard PVR functionality and should be provided by every addon. You should poke the myth addon devs.
Reply

Logout Mark Read Team Forum Stats Members Help
File size is not updated while playing file0