SageTV Community  

Go Back   SageTV Community > SageTV Products > SageTV Software
Forum Rules FAQs Community Downloads Today's Posts Search

Notices

SageTV Software Discussion related to the SageTV application produced by SageTV. Questions, issues, problems, suggestions, etc. relating to the SageTV software application should be posted here. (Check the descriptions of the other forums; all hardware related questions go in the Hardware Support forum, etc. And, post in the customizations forum instead if any customizations are active.)

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 10-17-2007, 04:42 AM
tawpgk tawpgk is offline
Sage User
 
Join Date: Mar 2007
Posts: 46
Anyway to mass zap the airing time and duration?

Hi,

In the good intentions of removing commercials with video redo and then xcoding them to mp4, I seem to have crapped up the progress bar when playing back the videos. They play fine, but you cant click on the bar to jump forward, and sometimes the FF just goes back to the start.

What I did was to copy out the mpg files to another computer that had more horsepower and then copied them back when i was finished cutting and compressing. My sage server occasionally would freeze when i did the convert function over there.

I realized that a lot of the timing was based on the file timestamps (not sure why that really is relevant, since it recalculates the duration of the file just fine). anyway is there a way to mass update a slew of similarly named files (or all) in the db to refresh airing time to match the file timestamps or vice versa?

I have looked at the web server interface, but that works at a one at a time pace from what i see. At this point i am looking at about 200 shows/files, with at least that many more to go.

Any Clues?

Thanks,

Tom
Reply With Quote
  #2  
Old 10-17-2007, 09:11 AM
nyplayer nyplayer is offline
SageTVaholic
 
Join Date: Sep 2005
Posts: 4,997
Do you create my files or Xml files for your recordings. I know that my files have the correct start time. You would have to use a utility touch.exe with a script to read the my files and correct the timestamp.
__________________
Channels DVR UBUNTU Server 2 Primes 3 Connects TVE SageTV Docker with input from Channels DVR XMLTV and M3U VIA Opendct.
Reply With Quote
  #3  
Old 10-17-2007, 09:48 AM
nielm's Avatar
nielm nielm is offline
SageTVaholic
 
Join Date: Oct 2003
Location: Belgium
Posts: 4,496
Quote:
Originally Posted by tawpgk View Post
I realized that a lot of the timing was based on the file timestamps (not sure why that really is relevant, since it recalculates the duration of the file just fine).
The progress bar needs the start/end times of the recording
End time = file timestamp
Start time = file timestamp-file duration.

There is no bulk update feature -- you would have to move the files out of the recordings area, rescan (so that sage sees that they are gone) reset timestamp to match airing end time, then move them back and rescan (so that sage sees them as new files)

If you have programming skills, you may be able to use the XML show info generated by the webserver to get a list of files and the airing start times/duration which you can use to do this...
__________________
Check out my enhancements for Sage in the Sage Customisations and Sageplugins Wiki
Reply With Quote
  #4  
Old 10-17-2007, 10:47 AM
tawpgk tawpgk is offline
Sage User
 
Join Date: Mar 2007
Posts: 46
Ok,
I understand the math of the progress bar, but why is that related to the airing time/date stored stored in the db? it gets tripped up by the epg/db data for duration and air time. I have looked at the xml output from the webserver for the shows that i have changed and that seems to be issue.

<show epgId="EP2739280075">
<title>Good Eats</title>
<episode>For Whom the Cheese Melts 2</episode>
<category>Cooking</category>
<description>Macaroni and cheese.</description>
<originalAirDate>2002-03-21T00:00:00.00Z</originalAirDate>
<airing channelId="33648" duration="1800" favoriteId="66602" sageDbId="58547" startTime="2006-09-13T06:00:00.00Z">
<watched/>
<mediafile duration="1242" sageDbId="5417456" startTime="2007-10-08T03:09:17.85Z" type="TV">
<archived/>
<segmentList>
<segment duration="1242" filePath="G:\GoodEats\GoodEats-ForWhomtheCheeseMelts2-58547-0.avi" startTime="2007-10-08T03:09:17.85Z"/>
</segmentList>
</mediafile>
</airing>
</show>

The media file values are fine, but the airing values dont match the media info. Just don't understand why the progress bar doesn't go from the media file information.

I have segmented all the files i have changed into separate import directories, and not placed back into the recordings directories. would placing them back into a recordings directory make any difference?

I used to have good programming skills, but I guess not sure what would need to be done here. if it is to identify what files need changing, i already know that from them being separated out logically. if it is to parse through the xml data and zap the airing info, this dinosaur is too old to care to write code to do that. It shouldn't be this damned difficult.

I have seen posts about .my files and .properties files and converting / importing such, but where is that all documented? How are they used / how are they created? everything about sage is so littered about these forums it is really frustrating. Why cant there be white papers in a particular area on all the common functions that people want to accomplish? I wish someone could tell me to RTFM, but the FM doesn't have this stuff.

Thanks for any help here.

Tom
Reply With Quote
  #5  
Old 10-17-2007, 10:51 AM
tawpgk tawpgk is offline
Sage User
 
Join Date: Mar 2007
Posts: 46
I wanted to try to import the xml data into a database and do a sql query to update this stuff, but i had no luck in figuring that out either in a reasonable amount of time. if we could easily load up an access or sql server or openoffice db with this xml data, life could be a lot easier.
Reply With Quote
  #6  
Old 10-17-2007, 11:05 AM
tawpgk tawpgk is offline
Sage User
 
Join Date: Mar 2007
Posts: 46
Going back to the timestamp / progress bar, Why does the progress bar need to know anything but the duration of the show? that is recalculated and stored correctly in the media info. it is irrevevant as to when the show aired on the tube as to showing the time line of playback. It should not matter what the original on-air time duration is. This seems more of a bug to me. It may be WAD, but it should be reasonable to assume that people are want to cut out commercials to save space.

Last edited by tawpgk; 10-17-2007 at 11:15 AM. Reason: update
Reply With Quote
  #7  
Old 10-17-2007, 11:54 AM
nielm's Avatar
nielm nielm is offline
SageTVaholic
 
Join Date: Oct 2003
Location: Belgium
Posts: 4,496
Short answer: because thats how sage works

Long answer: because sage needs to know the start/end time of the file to handle cases where it is not the same as the start/end time of the show, eg:
  • padded recordings (1h10min recording for 1hr show: how should that be displayed? Was the padding before, after or both?)
  • short recordings (45min recording for 1hr show: how should that be displayed? What segment was missed?)
  • interrupted recordings (2x25 min segments for 1hr show?)


you can edit files -- i do it regularly, but to get the timestamps right, you must either:
  • use the video edit plugin that sets the file timestamps correctly.
  • Set the timestamp of the edited file to that of the original (the 'touch' tool can do this -- see step 5 of this howto) before copying it back to sage.

At some point I will add something to the XML import feature that will fix timestamp issues like this... Just need to get around to writing it...
__________________
Check out my enhancements for Sage in the Sage Customisations and Sageplugins Wiki
Reply With Quote
  #8  
Old 10-17-2007, 12:27 PM
tawpgk tawpgk is offline
Sage User
 
Join Date: Mar 2007
Posts: 46
Points taken.

the howto has a bad link, but i was able to find it. got a version of the touch utility so i think i am on the way. Tried installing the videoredo plugin, but i dont understand where you update the dynamic menus part. still searching for that answer.

Thanks for your help.

Tom

Last edited by tawpgk; 10-17-2007 at 12:27 PM. Reason: typo
Reply With Quote
  #9  
Old 10-17-2007, 01:18 PM
BobPhoenix BobPhoenix is offline
SageTVaholic
 
Join Date: Oct 2004
Posts: 3,152
Quote:
Originally Posted by tawpgk View Post
Points taken.

the howto has a bad link, but i was able to find it. got a version of the touch utility so i think i am on the way. Tried installing the videoredo plugin, but i dont understand where you update the dynamic menus part. still searching for that answer.

Thanks for your help.

Tom
Here's a MenuItemLet for the VideoEdit plugin. Select the text below and copy to the windows clipboard. Then in SageTV just navigate to the menu you want to have the VideoEdit plugin located then bring up the Dynamic Menu configuration popup and select "New>Paste From Clipboard"
Code:
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<!DOCTYPE sageMenu PUBLIC "-//NIELM//DTD SAGEMENU XML 1.4//EN" "http://sageplugins.sourceforge.net/nielm_modules/dynamic_menu/sagemenu_1_3.dtd">
<sageMenu version="1.4">
    <internalScreenMenuItem screen="Video Edit Menu" title="Video Edit">
        <evalExpression> </evalExpression>
    </internalScreenMenuItem>
</sageMenu>
This has also been added to the first post of the support thread as well. But I see I need to update it to be compatible with 6.2 so give me a couple of days.
Reply With Quote
  #10  
Old 10-19-2007, 01:24 AM
tawpgk tawpgk is offline
Sage User
 
Join Date: Mar 2007
Posts: 46
Thanks, Bob.

I guess i was a little befuddled since i was looking to find the dynamic menu support in the default STV. I see that there is another STV for that. I must load first to be able to hook it in when you are ready.

I was able to load both on my test sage system and it look pretty darned cool! You guys rock!

I'll mess around with it in the next few days.

Thanks,

Tom
Reply With Quote
  #11  
Old 10-19-2007, 01:49 AM
tawpgk tawpgk is offline
Sage User
 
Join Date: Mar 2007
Posts: 46
Thanks neilm,

I did write a quick and dirty C program to parse through your xml output that represented the files I need to change. Question on the times, though. I see in your xml that the times are represented in terms of zulu/gmt/uct and i am -7 here in Las Vegas.

I am hoping that you converted the timetamp to zulu for the output file and the sage db has it in my time zone. Could i be that lucky or do i have to massage the timestamps to be 7 hours earlier for the touch command??? Something inside tells me that Sage stores it as zulu.

Please, make my day. LOL if not, i will be giving the text times a h-j. oh joy. Are there timestamp arithmetic functions in C/C++? seems reasonable. Maybe I should just edit a different version of the touch command to do the subtraction to get me through this or if i'm ambitious add a -z switch to specify the input time as zulu.

Thanks for the help.

Tom
Reply With Quote
  #12  
Old 10-19-2007, 02:17 AM
tawpgk tawpgk is offline
Sage User
 
Join Date: Mar 2007
Posts: 46
Regarding the TZ, i might have made the wrong assumption that the file timestamps are in local time. i should have figured that everything would/should be stored in zulu time.

If that is indeed the case, couldn't i just change my current time zone to zulu and run the command? or am i making much to much of this and the touch command will work without any problems since it is rightly zapping the zulu time? I guess its time for a test, now isnt it. it's too late here for clear thinking.

Thanks for your patience.

Tom
Reply With Quote
  #13  
Old 10-19-2007, 02:59 AM
tawpgk tawpgk is offline
Sage User
 
Join Date: Mar 2007
Posts: 46
It works when you change the TZ to zulu

I was able to successfully zap the timestamp after i changed the time zone in the system tray clock to zulu. Just running the command with the time as indicated on the xml output did not work with touch. maybe there is a use for a z switch on the touch command after all.

Thanks for all your help and patience.

Tom

UPDATE:
Due to Daylight savings time here i had to set the time zone to zulu -1 for the correct time to show for episodes recorded during DST.

Last edited by tawpgk; 10-21-2007 at 02:05 AM. Reason: update2
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
Question about replacing a SageTV recording BobPhoenix SageTV Studio 3 12-14-2006 11:18 PM
Peculiarities with GetMediaDuration and Time beelzerob SageTV Studio 9 08-23-2006 12:18 AM


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


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