SageTV Community  

Go Back   SageTV Community > SageTV Development and Customizations > SageTV Studio
Forum Rules FAQs Community Downloads Today's Posts Search

Notices

SageTV Studio Discussion related to the SageTV Studio application produced by SageTV. Questions, issues, problems, suggestions, etc. relating to the Studio software application should be posted here.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 06-25-2010, 04:46 AM
jaminben jaminben is offline
Sage Icon
 
Join Date: Sep 2007
Location: Norwich, UK
Posts: 1,754
Send a message via MSN to jaminben
Continue playback of downloaded file after file has finished downloading.

Hello,

I have a problem where I can start playback of a downloading file just fine but as soon as the download finishes playback stops with a log entry of:

Code:
[ErrorStreamConsumer@86a398] stderr:[mov,mp4,m4a,3gp,3g2,mj2 @ 0xbb89b8]stream 0, offset 0x149112: partial file
Anyone got any ideas how I can continue the playback even if the file has finished downloading?

I'm using the default UI menu widget MediaPlayer OSD but even with a newly created menu widget which only contains a Video widget playback will still stop with the above log entry as soon as the file finishes downloading. I've been looking at the default UI online video feeds for clues as I guess this does the same thing but nothings really working for me at the moment.

Once the file has been downloaded fully I can re-start playback and everythings perfect.

Cheers

Ben
__________________
Server - Win7 64bit, 2.4Ghz Intel Core 2 Duo, TBS 6284 PCI-E Quad DVB-T2 Tuner, 3 x HD200 & 1 x HD300 extenders

Last edited by jaminben; 06-25-2010 at 04:48 AM.
Reply With Quote
  #2  
Old 06-25-2010, 05:32 AM
tmiranda's Avatar
tmiranda tmiranda is offline
SageTVaholic
 
Join Date: Jul 2005
Location: Central Florida, USA
Posts: 5,851
Ben,

I'm going from memory here but if I recall the default STV handles this in a 3 stage approach:

- Stage 1 is just to display the "progress" dialog and wait a little while the video starts downloading.

- Stage 2 is playing the video while the remainder of the video is being downloaded.

- Stage 3 is waiting around until the video is completely played or the user hits the "stop" button.

Much of this is in place to handle the user hitting the "Record" button but it may shed some light on the issue you are having.

I may be full of hot air but take a close look at the dialog that starts the download to see what happens after watch(). Also take a close look at the listeners in the OSD menu, especially the Record listener, the Stop listener and the one that is invoked when the media file playback is completed. (I forget the specific name but it should be obvious.)
__________________

Sage Server: 8th gen Intel based system w/32GB RAM running Ubuntu Linux, HDHomeRun Prime with cable card for recording. Runs headless. Accessed via RD when necessary. Four HD-300 Extenders.
Reply With Quote
  #3  
Old 06-25-2010, 09:11 AM
jaminben jaminben is offline
Sage Icon
 
Join Date: Sep 2007
Location: Norwich, UK
Posts: 1,754
Send a message via MSN to jaminben
Thanks for the point in the right direction Tom

I'm pretty sure I can see whats going on now....all I need to do is make mine do the same

Cheers

Ben
__________________
Server - Win7 64bit, 2.4Ghz Intel Core 2 Duo, TBS 6284 PCI-E Quad DVB-T2 Tuner, 3 x HD200 & 1 x HD300 extenders
Reply With Quote
  #4  
Old 06-29-2010, 12:26 PM
jaminben jaminben is offline
Sage Icon
 
Join Date: Sep 2007
Location: Norwich, UK
Posts: 1,754
Send a message via MSN to jaminben
Ok, I can't get this to work.....I can sort of see how the default UI does it but I'm not using StartFileDownload() or any of the default UI calls for downloading so I can't check for download progress in the same way (not that I think thats the problem).

Even when I use the same code as the default UI replacing the bits that I think should be replaced with my file download details the playback always stops at the point where the buffer kicks in (e.g 25% of the file has been downloaded so start playback), or if I set the buffer to 0% playback stops at the point where downloading finished.

Basically what I need to know is if I'm flogging a dead horse here or should I still be able to get full playback of a partial download no matter if its finished downloading or still has some of the file left to download without using the default api's for downloading?

Cheers

Ben

EDIT

Actually the problem isn't quite as I described it above, its more down to the fact that I told it start playback of an incomplete file e.g the buffer size that I've set of 25%. So shouldn't I be able to tell Sage to continue playback past this point of 25%?
__________________
Server - Win7 64bit, 2.4Ghz Intel Core 2 Duo, TBS 6284 PCI-E Quad DVB-T2 Tuner, 3 x HD200 & 1 x HD300 extenders

Last edited by jaminben; 06-29-2010 at 01:24 PM.
Reply With Quote
  #5  
Old 06-30-2010, 05:24 AM
tmiranda's Avatar
tmiranda tmiranda is offline
SageTVaholic
 
Join Date: Jul 2005
Location: Central Florida, USA
Posts: 5,851
Ben,

I have always used StartFileDownLoad() so I can't say for sure if there is something special in there that somehow interacts with watch() to deal with progressive downloads or not. I think I'd start looking for some global context variable that somehow tells watch() that a progressive download is in progress.

Going from memory here again but I think there are two variables used, IsPlaybackProgressive (maybe ProgressivePlayback or something else close to that) and IsDownloadComplete (or something close). Maybe that will lead you somewhere?

Another thing to look at is the debug output from StartFileDownload() to see if any of the messages indicate what (if anything) it's doing to interact with watch().

Lastly, as a testcase can you try replacing your download code with StartFileDownload() to see if the results are any different?

Tom
__________________

Sage Server: 8th gen Intel based system w/32GB RAM running Ubuntu Linux, HDHomeRun Prime with cable card for recording. Runs headless. Accessed via RD when necessary. Four HD-300 Extenders.
Reply With Quote
  #6  
Old 06-30-2010, 06:13 AM
jaminben jaminben is offline
Sage Icon
 
Join Date: Sep 2007
Location: Norwich, UK
Posts: 1,754
Send a message via MSN to jaminben
Hey Tom,

I sent Sage an email asking about this problem and basically if you don't use their download calls it wont work, so that's where my problem lies....There is some good news however, Sage "MAY" add a few more api's to the existing download calls which will allow greater flexibility e.g 'User Agents' and multiple background downloads. Allowing us to use 'User Agents' is the killer one and is the main reason we made our own download stuff originally.

Cheers

Ben
__________________
Server - Win7 64bit, 2.4Ghz Intel Core 2 Duo, TBS 6284 PCI-E Quad DVB-T2 Tuner, 3 x HD200 & 1 x HD300 extenders
Reply With Quote
  #7  
Old 06-30-2010, 07:49 AM
tmiranda's Avatar
tmiranda tmiranda is offline
SageTVaholic
 
Join Date: Jul 2005
Location: Central Florida, USA
Posts: 5,851
Thanks for clarifying, I figured that was the case. If you decide to use StartFileDownload() I can tell you that it is NOT reentrant - you need to make sure only 1 thread at a time is using the API. If you are interested I have some Studio code that coordinates things so that the foreground thread will not crash or block if a background thread is using StartFileDownload().

Tom
__________________

Sage Server: 8th gen Intel based system w/32GB RAM running Ubuntu Linux, HDHomeRun Prime with cable card for recording. Runs headless. Accessed via RD when necessary. Four HD-300 Extenders.
Reply With Quote
  #8  
Old 06-30-2010, 08:20 AM
jaminben jaminben is offline
Sage Icon
 
Join Date: Sep 2007
Location: Norwich, UK
Posts: 1,754
Send a message via MSN to jaminben
Thanks but we'll stick with what we have for now......it wouldn't work using StartFileDownload() anyway so we don't have a choice currently.

Onto the next problem

Cheers

Ben
__________________
Server - Win7 64bit, 2.4Ghz Intel Core 2 Duo, TBS 6284 PCI-E Quad DVB-T2 Tuner, 3 x HD200 & 1 x HD300 extenders
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
mpg video file Sage thinks is an audio file kmp14 SageTV Software 1 03-14-2010 08:01 PM
V6.1.7 Client - File name cut on Copy Media from File function tawpgk SageTV Beta Test Software 8 04-24-2007 12:52 AM
V6.1.7 Client - File Path not shown on Copy Media from File function directory list tawpgk SageTV Beta Test Software 3 04-17-2007 11:05 PM
show long file name in two rows and removing the file type oferc999 SageTV Software 1 03-01-2007 05:41 PM
Viewing downloaded MPG file on PVR350 Mark SageTV Recorder Software 3 02-19-2004 11:08 PM


All times are GMT -6. The time now is 06:08 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2023, vBulletin Solutions Inc.
Copyright 2003-2005 SageTV, LLC. All rights reserved.