Play MPEG-TS streams while they are being recorded from TV with a PVR application?
#1
I like XBMC very much but i can't play my files during a tv-recording.

My Sever uses DVBViewer recordings service to record a tv show.
I usually start watching this show in "timeshift" - so the movie starts at 8:15pm and i start to watch at 8:45pm.

XBMC can't play those files becouse the filesize grows.
Only VLC player can play those files but i want all movies to play without external players.

Is it possible to play those streams inside xbmc dharma v4 itnernal player ?

Thx, Ta
Reply
#2
I considered an alternative:

i use the playfactory and start a VBScript which reads the filesize. If the filesize grows, i play the video with vlc. if bot - i will use the xbmc dsplayer. but how to call the dsplayer by script to play in xbmc?

my vbs can do this for example:
et objFSO = createobject("Scripting.FileSystemObject")
set objFile = objFSO.GetFile(file)
size1=objFile.Size
'Pause
wscript.sleep 500
size2=objFile.Size
if (size2 <> size1) Then
.... call vlc
End If
else
... go back to xbmc and play with internal player (but HOW TO DO THISHuh?)
Reply
#3
nobody knows how to solve the propblem?
Eek
Reply
#4
tatoosh Wrote:nobody knows how to solve the propblem?
Eek

I had a look at this, and it's because XBMC will not open a file if any other process is writing to that file. It's relatively easy to change this behaviour (see below) but I don't know if this will cause other issues. Anyhow this is the change you need:

In FileHD.cpp find:

Code:
bool CFileHD::Open(const CURL& url)
{
  CStdString strFile = GetLocal(url);

#ifdef _WIN32
  CStdStringW strWFile;
  g_charsetConverter.utf8ToW(strFile, strWFile, false);
  m_hFile.attach(CreateFileW(strWFile.c_str(), GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, 0, NULL));

and change the CreateFileW line to be:

Code:
m_hFile.attach(CreateFileW(strWFile.c_str(), GENERIC_READ, FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE, NULL, OPEN_EXISTING, 0, NULL));

You should now find that XBMC will open your streams while they are downloading.

JR
Reply
#5
Thanks jhsrennie for your help, but i need a little more one.
I use Windows 7 and browsed my system for the file FileHD.cpp - but nothing there. Do i have to download the source, change the code and compile it ?

if so - can you please help me a little bit to do so?
I have only knowledge on windows programming like c#.

Thanks a lot jhsrennie ! Nod
Reply
#6
Yes, you'd need to download the source and compile it, which isn't a trivial task, however I've put a copy of the modified file on my server for you.

NB this will only work if you're using Dharma RC2. If you're using v9.11 or an earlier beta of Dharma you should upgrade to Dharma RC2.

Go to http://swarchive.ratsauce.co.uk/xbmc/ and download XBMC-test.exe and save it into C:\Program Files\XBMC i.e. the same folder where you have installed XBMC. Now run XBMC-test.exe and it should run just the same as the Dharma RC2. Try viewing one of the streams you're downloading and see if it works.

JR
Reply
#7
Ok i will try it out now. i use newest dharma - beta 4.

which software did you use to compile the xbmc.exe ?
thanks again for yout help!
Reply
#8
XBMC cannot handle multitasking...

while XBMC is performing ANY action no other action starts untilthe oriiginal task as completed.

I have requested feature enhacemnt for XBMC so that we allowed to do something hwile xbmc is busy doing something else, provided it doesnt interfere with the original action.

e'g Im copying files from source a to destination B and would like to watch a movie or listen to soome music while that is going on.

In my case I use Linux and XBMCLive but I dont think it varies....
Reply
#9
@jhsrennie: Your mod works - i can't believe it Smile
Can u compile me the exe in dharma 4 or help my by doing it myself ?
Reply
#10
If you'd like to have a go at compiling XBMC have a look at http://wiki.xbmc.org/?title=HOW-TO_compi...ource_code. It isn't that hard to do, it's just that there's quite a lot of preparation needed, like installing the Windows SDK and the DirectX SDK.

If you'd prefer, just post in the support forum when XBMC is officially released and I'll build you a version with the change built in. I'll submit the change as a suggestion for the next version of XBMC and see if any of the developers can see a downside. I can't submit the change to Dharma because this late in the release cycle it's bug fixes only.

JR
Reply
#11
Ok thanks for the link.
Quote:I'll submit the change as a suggestion for the next version of XBMC and see if any of the developers can see a downside

This would be great. Anyway i got the code from you to change it in future builds.

Do you use this feature, too ?
Reply
#12
jhsrennie, good catch. Why FILE_SHARE_DELETE though?

A potential downside could be for file formats that can't be read until the file is completely written. I don't know how ffmpeg would react to such partial files, a dev with more experience of ffmpeg is needed.
Always read the Kodi online-manual, the FAQ and search the forum before posting.
Do not e-mail Kodi Team members directly asking for support. Read/follow the forum rules (wiki).
For troubleshooting and bug reporting please make sure you read this first.
Reply
#13
hi jr. can u please compile the new dharma final with your modded code ?
happy new year !Wink
Reply
#14
I have Visual Studio only installed in a Windows XP VMWare.
Can i compile it there or do i have to use native System (becouse of GPU) ?
Reply
#15
I tried to compile it myself but i didnt get it to work with the newest version?
Please - can someone help me by doing this ?

thanks a lot!!!
Reply

Logout Mark Read Team Forum Stats Members Help
Play MPEG-TS streams while they are being recorded from TV with a PVR application?1