in

andy vt's tools & blog

Flexibility isn't free

Possible to convert *.ts while it is still recording?

Last post 10-10-2008 3:26 PM by babgvant. 5 replies.
Page 1 of 1 (6 items)
Sort Posts: Previous Next
  • 09-23-2008 8:48 PM

    • dhandy
    • Top 500 Contributor
    • Joined on 09-24-2008
    • Posts 3

    Possible to convert *.ts while it is still recording?

    I am using 1.2.1.4 with a HD-PVR.  Everything works really great when I manually run a profle after a recording is done.  But when I setup conditions to try to run action convertforscanning, I get an error because the the file is being used by another process.

     A couple of questions here.

     The first action is Throttle DVRMStoMPEG, using the default settings of 5 minute wait and 30 second poll time.  Should this be waiting for 5 minutes after the recording stops?  The log waiting message all have the same filetime (FT) which is the recording start time, then the wait time, current time, and current file length.  Five minutes after the recording starts, the throttle completes and it moves on to the "Convert DVR-MS with an explicit graph" action.

     However, that immediately fails saying the process cannot access the file because it is being used by another process.

    I have added a FileWaitSize action to the profile to get it to wait until the length has stabilized before starting Throttle DVRMStoMPEG to allocate a worker.  But I'd much prefer to have it run concurrent with the HD-PVR recording.

    Since the predefined action did not include FileWaitSize I am wondering if either of these are true:

     1) Should the Throttle action be waiting for both the time to elapse and the filesize to stabalize?  Why would it list the filesize in the log otherwise?

     2) If the throttle doesn't need to wait, should the conversion to 320x240 be able to run concurrent with the recording?

    Sage can play the *.ts while it is recording, so I know there can't be an exclusive read lock on the file.  Is there a way to let the conversion happen in real time?

    A couple more questions on the actual conversion.  In the log, the conversion lists 0% and when nearly done a long list of some value slightly below 100%.  Then it reaches 100% but says "Failed to convert file" and "Action did not compolete successfully".  Yet if I look at the generated mpg, it seems complete.  What is going on here?

    Is there a way I can control the path for the output file on the conversion?  I can when I run the GUI version, but the automatic launch seems to put everything to the output folder in the installation directory.

     I have added a MoveOutputFile action to get it back to where I want the file (with the conversion configured to continue on failure so the move action runs).  But it seems like I should be able to get it to just create the converted file in the folder I want, and keep it off my OS partition where the app is installed.

     I'm learning my way around configuring this thing, and am REALLY impressed by what it can do.  But I think I'm missing something simple here.

  • 09-25-2008 12:20 PM In reply to

    Re: Possible to convert *.ts while it is still recording?

    % are only as good as the #s the graph provides, in many cases because there isn't a HW clock in the graph they aren't that useful.

    sage uses it's own filesource and demux filter.

    context values can be manipulated via ChangeContextValue, you can also change the default output folder in the settings tool.

    i was able to get it to read the file while recording using the profile/filters when I first did it, but now that there are h.264 compatilible scanners available I haven't been using this for a long time.

    some of the behaviours (i.e. fwthrottle's method for delaying processing) are artifacts of the way media center works.  instead of changing those behviours (unless it's a bug), I usually introduce new actions that produce similar results.  FWThrottle writes filesize but it doesn't use that to wait.

    DVRMSToolbox, Recording Broker, LcdWriter, and more software
    babgvant.com
  • 09-25-2008 12:50 PM In reply to

    • dhandy
    • Top 500 Contributor
    • Joined on 09-24-2008
    • Posts 3

    Re: Possible to convert *.ts while it is still recording?

    babgvant:
    % are only as good as the #s the graph provides, in many cases because there isn't a HW clock in the graph they aren't that useful.

     That's fine.  It seems to think the conversion failed (though it does reach 100%), but if I check the box to continue on failure I guess no harm, no foul.

     

    babgvant:
    context values can be manipulated via ChangeContextValue, you can also change the default output folder in the settings tool.

    Do you mean the output directory in the File Watcher tab?  I previously set that, but it does not seem to have any effect on where the file gets created.  So I am currently getting around that by using the "Move file ..." action after it completes.  This seems to have the artifact the filename has the value "fileprocess" appended just prior to the filename extension.

     I'll try inserting a ChangeContextValue ahead of the conversion and see if I can get that to work instead.  Thanks for the suggestion.

    babgvant:
    i was able to get it to read the file while recording using the profile/filters when I first did it, but now that there are h.264 compatilible scanners available I haven't been using this for a long time.

     I thought I had initially as well.  I don't know when/why that changed -- at the 1.2.1.4 upgrade maybe?  That also explains why the profile never needed an action like FileSizeWait. I'm not sure it was the 1.2.1.4 upgrade.  I think I got that looking for the FileSizeWait action I saw mentioned in another thread.

    How can I debug why it doesn't do it now?  I'd love to get this ability back.

    Is it just my system for some reason?  Can you try starting up the convert for scan profile while Sage has a recording still in progress?

    This is one incredible tool.  As a developer myself, my hat is off to you!
  • 10-10-2008 2:39 PM In reply to

    Re: Possible to convert *.ts while it is still recording?

    I tested this and wasn't able to get it working.  I think a custom filesource filter that takes a shared handle is necessary, maybe it didn't work before.

    DVRMSToolbox, Recording Broker, LcdWriter, and more software
    babgvant.com
  • 10-10-2008 2:58 PM In reply to

    • dhandy
    • Top 500 Contributor
    • Joined on 09-24-2008
    • Posts 3

    Re: Possible to convert *.ts while it is still recording?

    Andy,

    babgvant:

    I tested this and wasn't able to get it working.  I think a custom filesource filter that takes a shared handle is necessary, maybe it didn't work before.

     

     

    That is what is strange.  I know that originally it worked concurrently with the recording.  What I don't know is what changed.  I don't know exactly when it quit because I didn't use it routinely while recording. It may (or may not) have been when I upgraded to 1.2.1.4, but I don't know that is related.  I was really hoping you'd have some clue what changed.

  • 10-10-2008 3:26 PM In reply to

    Re: Possible to convert *.ts while it is still recording?

    a change in dtb wouldn't break that (i certainly didn't do anything explicit), I have the newest driver installed that could be it. 
    DVRMSToolbox, Recording Broker, LcdWriter, and more software
    babgvant.com
Page 1 of 1 (6 items)
@2008 andy vt
Powered by Community Server (Non-Commercial Edition), by Telligent Systems