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 10-19-2010, 08:08 PM
Slugger Slugger is offline
SageTVaholic
 
Join Date: Mar 2007
Location: Kingston, ON
Posts: 4,008
Are all segments of a recording always going to be in same dir?

Just realized I've been coding on an assumption, now I need to make sure my assumption is true.

If a recording is split into multiple segments for whatever reason, does the core guarantee that all segments for the same recording (Airing) will be stored in the same recording directory?

If recording A starts in dir /var/media/tv1/ and the user stops the recording and then resumes it 30 seconds later. Is segment 2 of this recording guaranteed to also reside in /var/media/tv1/ even if /var/media/tv2/ - another configured recording dir - has more free space now than /var/media/tv1/? I've been assuming it will always continue the recording in the same dir, but now I need to confirm that.
__________________
Twitter: @ddb_db
Server: Intel i5-4570 Quad Core, 16GB RAM, 1 x 128GB OS SSD (Win7 Pro x64 SP1), 1 x 2TB media drive
Capture: 2 x Colossus
STB Controller: 1 x USB-UIRT
Software:Java 1.7.0_71; SageTV 7.1.9
Clients: 1 x HD300, 2 x HD200, 1 x SageClient, 1 x PlaceShifter
Plugins: Too many to list now...
Reply With Quote
  #2  
Old 10-20-2010, 06:31 AM
tmiranda's Avatar
tmiranda tmiranda is offline
SageTVaholic
 
Join Date: Jul 2005
Location: Central Florida, USA
Posts: 5,851
Slugger,

I've always gone under the assumption that the core does NOT guarantee all segments will be in the same directory. I know that the core does not guarantee that the segments will be recorded by the same tuner because I've run into that issue before so I can only assume the core treats each segment independently.

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
  #3  
Old 10-20-2010, 07:02 AM
Slugger Slugger is offline
SageTVaholic
 
Join Date: Mar 2007
Location: Kingston, ON
Posts: 4,008
Don't say that! Bad news for me if this is true, but it also makes sense that it would work like this.
__________________
Twitter: @ddb_db
Server: Intel i5-4570 Quad Core, 16GB RAM, 1 x 128GB OS SSD (Win7 Pro x64 SP1), 1 x 2TB media drive
Capture: 2 x Colossus
STB Controller: 1 x USB-UIRT
Software:Java 1.7.0_71; SageTV 7.1.9
Clients: 1 x HD300, 2 x HD200, 1 x SageClient, 1 x PlaceShifter
Plugins: Too many to list now...
Reply With Quote
  #4  
Old 10-20-2010, 08:15 AM
tmiranda's Avatar
tmiranda tmiranda is offline
SageTVaholic
 
Join Date: Jul 2005
Location: Central Florida, USA
Posts: 5,851
I'm assuming this means it has ramifications for SJQv4?

If you're thinking about other "gotcha's" keep in mind the somewhat strange behavior of the "MediaFileDeleted" core event that I documented here: http://forums.sagetv.com/forums/showthread.php?t=51447

It might not be something that the SJQ server needs to be worried about, but clients that rely on this event will certainly have to be aware of it.
__________________

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
  #5  
Old 10-20-2010, 10:57 AM
Slugger Slugger is offline
SageTVaholic
 
Join Date: Mar 2007
Location: Kingston, ON
Posts: 4,008
Yeah, it isn't a show stopper, but it does affect how I generate the recording path metadata for a queued task. I've sent a support request to get final confirmation because I need to know one way or the other because if I'm not handling this properly then there is potential for all kinds of (apparently) weird behaviour from SJQ. Problem is that this kind of bug would not surface too often (how often do people have multi-segment recordings AND those segments end up on different paths?), but if/when someone hits this then all hell will break loose, so to speak.
__________________
Twitter: @ddb_db
Server: Intel i5-4570 Quad Core, 16GB RAM, 1 x 128GB OS SSD (Win7 Pro x64 SP1), 1 x 2TB media drive
Capture: 2 x Colossus
STB Controller: 1 x USB-UIRT
Software:Java 1.7.0_71; SageTV 7.1.9
Clients: 1 x HD300, 2 x HD200, 1 x SageClient, 1 x PlaceShifter
Plugins: Too many to list now...
Reply With Quote
  #6  
Old 10-20-2010, 12:16 PM
tmiranda's Avatar
tmiranda tmiranda is offline
SageTVaholic
 
Join Date: Jul 2005
Location: Central Florida, USA
Posts: 5,851
Another design consideration should be mixed linux/Windows environments. Strange things can happen if the (SJQ) client is on one platform and the (SJQ) server is on another. For example, if the server is linux based and the client is windows based, java methods such as File.getAbsolutePath() return paths that start with a drive letter and colon (C: ). This makes the linux server very unhappy
__________________

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
  #7  
Old 10-20-2010, 01:52 PM
Slugger Slugger is offline
SageTVaholic
 
Join Date: Mar 2007
Location: Kingston, ON
Posts: 4,008
Quote:
Originally Posted by tmiranda View Post
I'm assuming this means it has ramifications for SJQv4?

If you're thinking about other "gotcha's" keep in mind the somewhat strange behavior of the "MediaFileDeleted" core event that I documented here: http://forums.sagetv.com/forums/showthread.php?t=51447

It might not be something that the SJQ server needs to be worried about, but clients that rely on this event will certainly have to be aware of it.
Quote:
Originally Posted by Slugger View Post
Yeah, it isn't a show stopper, but it does affect how I generate the recording path metadata for a queued task. I've sent a support request to get final confirmation because I need to know one way or the other because if I'm not handling this properly then there is potential for all kinds of (apparently) weird behaviour from SJQ. Problem is that this kind of bug would not surface too often (how often do people have multi-segment recordings AND those segments end up on different paths?), but if/when someone hits this then all hell will break loose, so to speak.
Just got confirmation from support that my assumption was correct. Once a recording starts in one directory, any additional segments will be created in the same directory.

Quote:
Originally Posted by tmiranda View Post
Another design consideration should be mixed linux/Windows environments. Strange things can happen if the (SJQ) client is on one platform and the (SJQ) server is on another. For example, if the server is linux based and the client is windows based, java methods such as File.getAbsolutePath() return paths that start with a drive letter and colon (C: ). This makes the linux server very unhappy
In SJQv3, I had a :MAPDIR option that allowed you to map directories for cases like this. In SJQv4, it's the responsibility of the user to remap directories as required. To facilitate this, SJQv4 provides two important environment variables in all test and task executions:

SJQ4_PATH: The directory where the recording is stored, according to the SageTV server (i.e. D:\tv)

SJQ4_SEGMENTS: The number of file segments currently available for the MediaFile (i.e. 1)

SJQ4_SEGMENT_0: The file name of segment index 0

SJQ4_SEGMENT_0..n where n < SJQ4_SEGMENTS will exist, each being the name of the file of the recording segment (TheBigBangTheory-4234-0.mpg)

Users who run a remote task client are responsible for converting the SJQ4_PATH var as appropriate to access the files listed in SJQ4_SEGMENT_n. I expect for most users, they'd just ignore the SJQ4_PATH and hardcode it per task client. For example, a user knows that the tast client installed on remote host "linuxpc" accesses all SageTV recordings via the mount point "/mnt/share/sagetv/tv" and so they'd only care about the SJQ4_SEGMENT_n vars and prefix those file names with "/mnt/share/sagetv/tv/"
__________________
Twitter: @ddb_db
Server: Intel i5-4570 Quad Core, 16GB RAM, 1 x 128GB OS SSD (Win7 Pro x64 SP1), 1 x 2TB media drive
Capture: 2 x Colossus
STB Controller: 1 x USB-UIRT
Software:Java 1.7.0_71; SageTV 7.1.9
Clients: 1 x HD300, 2 x HD200, 1 x SageClient, 1 x PlaceShifter
Plugins: Too many to list now...
Reply With Quote
  #8  
Old 10-20-2010, 04:46 PM
tmiranda's Avatar
tmiranda tmiranda is offline
SageTVaholic
 
Join Date: Jul 2005
Location: Central Florida, USA
Posts: 5,851
Quote:
Originally Posted by Slugger View Post
Just got confirmation from support that my assumption was correct. Once a recording starts in one directory, any additional segments will be created in the same directory.
That's good to know.
__________________

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
  #9  
Old 10-20-2010, 07:50 PM
razrsharpe razrsharpe is offline
Sage Icon
 
Join Date: Sep 2008
Location: Boston, MA
Posts: 2,111
Quote:
Originally Posted by Slugger View Post
Just got confirmation from support that my assumption was correct. Once a recording starts in one directory, any additional segments will be created in the same directory.
Not that this is normal behavior but say you...
  1. start a recording
  2. manually stop the recording
  3. restart it at some point later in the same program
This would create multiple segments of the same airing by something other then tuner errors (channel changing would be another example).... Does that still constitute a single recording?... I think the answer is yes because both segments would have the same airing ID.

like i said I think the answer is that they are the same recording but you may want to verify with support... if you havent already...
__________________
Server 2003 r2 32bit, SageTV9 (finally!)
2x Dual HDHR (OTA), 1x HD-PVR (Comcast), 1x HDHR-3CC via SageDCT (Comcast)
2x HD300, 1x SageClient (Win10 Test/Development)
Check out TVExplorer
Reply With Quote
  #10  
Old 10-21-2010, 10:15 AM
Slugger Slugger is offline
SageTVaholic
 
Join Date: Mar 2007
Location: Kingston, ON
Posts: 4,008
As long as you restart the recording of the same airing id then it's the same recording, with multiple segments. If you stopped a recording then restarted it on another channel, that would be a new MediaFile.
__________________
Twitter: @ddb_db
Server: Intel i5-4570 Quad Core, 16GB RAM, 1 x 128GB OS SSD (Win7 Pro x64 SP1), 1 x 2TB media drive
Capture: 2 x Colossus
STB Controller: 1 x USB-UIRT
Software:Java 1.7.0_71; SageTV 7.1.9
Clients: 1 x HD300, 2 x HD200, 1 x SageClient, 1 x PlaceShifter
Plugins: Too many to list now...
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
Recordings in multiple segments? drmargarit SageTV Beta Test Software 4 06-12-2010 01:44 PM
Converting segments in playlist to individual songs bastafidli SageTV Software 7 01-29-2008 11:30 AM
Maximum file size (segments) feilerd SageTV Software 11 01-23-2008 10:06 PM
Problem with multiple segments of a show laurenglenn SageTV Linux 1 02-03-2006 08:11 PM
Major problems using external authoring programs (for exporting segments). JonZ General Discussion 6 02-03-2005 07:34 AM


All times are GMT -6. The time now is 02:26 AM.


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