SnapStream Forums

Go Back   SnapStream Forums > SnapStream Developer Network > Development Discussion
Register FAQ Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Rating: Thread Rating: 4 votes, 5.00 average. Display Modes
  #1  
Old 06-01-2007, 07:10 PM
Fonceur Fonceur is offline
Problem solver
 
Join Date: Jan 2004
Location: Montreal, Qc
Posts: 5,063
GrafCorder

GrafCorder is basically Anders Nolberger's SageGraphRecorder (the brain) transplanted on Howard Gilbert's HDHRcorder (the body). More info can be obtained from the wiki.

The idea is that you use GraphEdit (like from here), in order to make a simple .GRF file (first picture), which will allow you to "dump to a file" (for example using the DVBPortal HDTV Reference Dump Filter), from whichever device you want to record... Personally, I use it to perform Firewire recordings, since VLC refuses to record through the firewire port of my PACE 551HD and CapDVHS is just not flexible enough...


Use the format:

GraphCorder "myGraf.grf" 20:59:59 "D:\Video\myFile.TP"

where:

"myGraf.grf" = The fully qualified simple GraphEdit file (using a Dump filter for the saved file).

20:59:59 = end time or time in minutes (1-999).

"D:\Video\myFile.TP" = The fully qualified output file name.

While you might be able to make a .GRF file for DVB or unencrypted QAM channels, keep in mind that the channel tuning might be a whole different story (I use Tim M. Moore's channel.exe for firewire)...

Acknowledgements

- Thanks to Anders Nolberger's SageGraphRecorder for the original idea.

- Thanks to Howard Gilbert's HDHRcorder for the underlaying layout.

- Thanks to the DirectShowNet Library v 1.5 for wrapping up DirectShow into a C# usable format...
Attached Images
   
Attached Files
File Type: zip GrafCorder-0.07.zip (195.4 KB, 802 views)
__________________
BeyondTVLibrary: BTV 4.9 SDK addition for developers.
BTV-Negociator 5.07: Conflict resolution/Guide updates/Searches/etc.
BTV-Externinator 1.70: External recordings, Firewire/clear QAM/DVB/R5000HD/etc.
GrafCorder: Record from a simple .GRF file. - MLBeyond TV: MainLobby integration.
TaBTVRemote 0.12, BTVRemote 1.01, TiBTVRemote 1.05: Control BTV's interface with an Android device, PlayBook 2.0 or iPhone/iPod/iPad.

Last edited by Fonceur; 05-21-2012 at 07:49 AM.
Reply With Quote
  #2  
Old 06-02-2007, 11:53 AM
Fonceur Fonceur is offline
Problem solver
 
Join Date: Jan 2004
Location: Montreal, Qc
Posts: 5,063
Re : GrafCorder

Version .02 can be found in the first post...

- Added the display of the channel and tuner number (if found in the .inprogress.xml file).

- The actual name of the Tuner will be displayed. (it looks for "tuner" in the graph filters...)

- Improved the error handling.

- Add the possibility of hiding the file during recording. (prevents the BTV-Library from going into overdrive when a file is being written in a folder monitored by BTV...)
__________________
BeyondTVLibrary: BTV 4.9 SDK addition for developers.
BTV-Negociator 5.07: Conflict resolution/Guide updates/Searches/etc.
BTV-Externinator 1.70: External recordings, Firewire/clear QAM/DVB/R5000HD/etc.
GrafCorder: Record from a simple .GRF file. - MLBeyond TV: MainLobby integration.
TaBTVRemote 0.12, BTVRemote 1.01, TiBTVRemote 1.05: Control BTV's interface with an Android device, PlayBook 2.0 or iPhone/iPod/iPad.
Reply With Quote
  #3  
Old 06-04-2007, 03:03 PM
Fonceur Fonceur is offline
Problem solver
 
Join Date: Jan 2004
Location: Montreal, Qc
Posts: 5,063
Re : GrafCorder

Version .03 can be found in the first post...

- Added the possibility of analyzing the captured stream (i.e. obtain the width, height and frame rate).


The new feature works by recording 250-5000 ms (default = 1 second) to the default file (from the dump filter), creates another graph to play it back and then delete the file. This will fail if the recording PC has no sample grabber or can't actually playback the file... When I tested with 500 ms, sometimes the recorded file was only recognized as video (no audio) or audio (no video), so the process would fail... Keep that in mind...

Depending on timing, using the same filename for the actual recording as for the default one in your .GRF file, could create a problem...

Presently I don't analyze the audio, but that might change.
__________________
BeyondTVLibrary: BTV 4.9 SDK addition for developers.
BTV-Negociator 5.07: Conflict resolution/Guide updates/Searches/etc.
BTV-Externinator 1.70: External recordings, Firewire/clear QAM/DVB/R5000HD/etc.
GrafCorder: Record from a simple .GRF file. - MLBeyond TV: MainLobby integration.
TaBTVRemote 0.12, BTVRemote 1.01, TiBTVRemote 1.05: Control BTV's interface with an Android device, PlayBook 2.0 or iPhone/iPod/iPad.
Reply With Quote
  #4  
Old 09-19-2007, 04:08 PM
poobah poobah is offline
Registered User
 
Join Date: Aug 2003
Posts: 68
Re: Re : GrafCorder

Quote:
Originally Posted by Fonceur View Post
Version .03 can be found in the first post...

- Added the possibility of analyzing the captured stream (i.e. obtain the width, height and frame rate).


The new feature works by recording 250-5000 ms (default = 1 second) to the default file (from the dump filter), creates another graph to play it back and then delete the file. This will fail if the recording PC has no sample grabber or can't actually playback the file... When I tested with 500 ms, sometimes the recorded file was only recognized as video (no audio) or audio (no video), so the process would fail... Keep that in mind...

Depending on timing, using the same filename for the actual recording as for the default one in your .GRF file, could create a problem...

Presently I don't analyze the audio, but that might change.

Fonceur!

You're hacks are amazing. I just tried out Grafcorder, and could ALMOST get it to work.

I created a grf file using GraphEdt, similar to the one listed above - a simple graph connecting my Firewire tuner to the DVBPortal dump filter. In the dump filter I specified the name "M:\Media\test.tp".

Now when I invoke GrafCorder from the command-line or from BTVE, if the filename passed is different than "M:\Media\test.tp", I get an "Invalid filename" message and GrafCorder exits. If I use the same name as in the dump filter, then all is good. I note this is the OPPOSITE of what you predicted above...

Here's the entries from my GrafCorder log:

Quote:
9/19/2007 2:34:21 PM Starting GrafCorder Firewire.grf 5 M:\Media\test.tp
Renaming previous file to M:\Media\test-1.tp
9/19/2007 2:39:22 PM reached normal stopping time
Form closing, wrote 671
9/19/2007 3:00:00 PM Starting GrafCorder C:\BTV-Externinator\Firewire.grf 3:04:55 PM M:\Media\Documentaries\GrafCorder Test-2007-09-19-1.tp
Invalid output file path M:\Media\Documentaries\GrafCorder Test-2007-09-19-1.tp
9/19/2007 3:01:56 PM Starting GrafCorder Firewire.grf 2 M:\Media\test.tp
Renaming previous file to M:\Media\test-1.tp
9/19/2007 3:03:58 PM reached normal stopping time
Form closing, wrote 268
And here's from BTVE:
Quote:
9/19/2007 2:56:38 PM :: Starting BTV-Externinator version 1.14 (alpha)
9/19/2007 2:56:39 PM :: Connecting to http://localhost:8129.
9/19/2007 2:57:05 PM :: GrafCorder0: Setting up to record "2007 World Series of Poker" at 9/20/2007 10:00 AM.
9/19/2007 2:58:45 PM :: GrafCorder0: Setting up to record "GrafCorder Test" at 9/19/2007 3:00 PM.
9/19/2007 3:00:00 PM :: GrafCorder0: Auto execution...
9/19/2007 3:00:00 PM :: GrafCorder0: Setting up the next closing...
9/19/2007 3:00:00 PM :: GrafCorder0: Setting up to record "2007 World Series of Poker" at 9/20/2007 10:00 AM.
9/19/2007 3:04:48 PM :: GrafCorder0: Closing part...
9/19/2007 3:05:48 PM :: GrafCorder0: Starting the post-processing...
9/19/2007 3:05:48 PM :: GrafCorder0: Could not find the file "M:\Media\Documentaries\GrafCorder Test-2007-09-19-1.tp" for post-processing...
9/19/2007 3:05:48 PM :: Closing BTV-Externinator
This is GrafCorder 0.03, and BTVE 1.14.

This seems exciting to me because VLC recording is flaky!

Best of luck
-B.
Reply With Quote
  #5  
Old 09-19-2007, 06:21 PM
Fonceur Fonceur is offline
Problem solver
 
Join Date: Jan 2004
Location: Montreal, Qc
Posts: 5,063
Re : GrafCorder

Try again with a scheduled recording instead of a manual recording...
__________________
BeyondTVLibrary: BTV 4.9 SDK addition for developers.
BTV-Negociator 5.07: Conflict resolution/Guide updates/Searches/etc.
BTV-Externinator 1.70: External recordings, Firewire/clear QAM/DVB/R5000HD/etc.
GrafCorder: Record from a simple .GRF file. - MLBeyond TV: MainLobby integration.
TaBTVRemote 0.12, BTVRemote 1.01, TiBTVRemote 1.05: Control BTV's interface with an Android device, PlayBook 2.0 or iPhone/iPod/iPad.
Reply With Quote
  #6  
Old 09-19-2007, 06:40 PM
queonda queonda is offline
Registered User
 
Join Date: Jul 2003
Posts: 2,502
Re: GrafCorder

Thanks Fonceur. Going to give this a try tonight. I wonder if someone in my neighborhood going to watch Bionic girl pilot in HD on ondemand
Reply With Quote
  #7  
Old 09-19-2007, 09:04 PM
poobah poobah is offline
Registered User
 
Join Date: Aug 2003
Posts: 68
Re: Re : GrafCorder

Quote:
Originally Posted by Fonceur View Post
Try again with a scheduled recording instead of a manual recording...
Hi Fonceur!

Just did try with a schedule recording - same results. Here's the GrafCorder log:

Quote:
9/19/2007 8:00:01 PM Starting GrafCorder C:\BTV-Externinator\Firewire.grf 8:59:55 PM M:\Media\Shows\SportsCenter-2007-09-19-1.tp
Invalid output file path M:\Media\Shows\SportsCenter-2007-09-19-1.tp
Here's the BTVE log (nothing really to see):
Quote:
9/19/2007 7:31:03 PM :: Starting BTV-Externinator version 1.14 (alpha)
9/19/2007 7:31:03 PM :: Connecting to http://localhost:8129.
9/19/2007 7:31:34 PM :: GrafCorder0: Setting up to record "SportsCenter" at 9/19/2007 8:00 PM.
9/19/2007 7:34:07 PM :: Filling/updating all the lists
9/19/2007 7:41:34 PM :: Filling/updating all the lists
9/19/2007 7:51:34 PM :: Filling/updating all the lists
9/19/2007 8:00:00 PM :: GrafCorder0: Auto execution...
9/19/2007 8:00:00 PM :: GrafCorder0: Setting up the next closing...
I've attached my .grf file in the hopes that might be interesting, although it probably is useless on any other machine...

B.
Attached Files
File Type: zip Firewire.zip (881 Bytes, 352 views)
Reply With Quote
  #8  
Old 09-19-2007, 10:32 PM
Fonceur Fonceur is offline
Problem solver
 
Join Date: Jan 2004
Location: Montreal, Qc
Posts: 5,063
Re : Re: Re : GrafCorder

Quote:
Originally Posted by poobah View Post
Just did try with a schedule recording - same results.
Ok, try this version, it won't fix the problem but with the extra debugging I'll know where it's crashing... Next step will be to find out why...
__________________
BeyondTVLibrary: BTV 4.9 SDK addition for developers.
BTV-Negociator 5.07: Conflict resolution/Guide updates/Searches/etc.
BTV-Externinator 1.70: External recordings, Firewire/clear QAM/DVB/R5000HD/etc.
GrafCorder: Record from a simple .GRF file. - MLBeyond TV: MainLobby integration.
TaBTVRemote 0.12, BTVRemote 1.01, TiBTVRemote 1.05: Control BTV's interface with an Android device, PlayBook 2.0 or iPhone/iPod/iPad.

Last edited by Fonceur; 09-21-2007 at 06:18 PM.
Reply With Quote
  #9  
Old 09-20-2007, 05:38 PM
poobah poobah is offline
Registered User
 
Join Date: Aug 2003
Posts: 68
Re: Re : Re: Re : GrafCorder

Quote:
Originally Posted by Fonceur View Post
Ok, try this version, it won't fix the problem but with the extra debugging I'll know where it's crashing... Next step will be to find out why...
Hi Fonceur!

Here's some detailed output from the new version. First, here's what it looks like when it works (when I pass in the same filename as I used when setting up the .grf file):

Quote:
9/20/2007 4:33:19 PM Starting GrafCorder Firewire.grf 2 M:\Media\test.tp
Defining the file...
Defining the window's title...
File already exists...
Renaming previous file to M:\Media\test-1.tp
Defining the output file...
Analyzing...
Creating the inprogress file...
9/20/2007 4:35:20 PM reached normal stopping time
Form closing, wrote 269
What's interesting of course is that the file (M:Media\test.tp) DIDN'T exist before I started - so evidently setting up the graph created the original filename, which you then evidently rename as you then create the new file.

Here's the not working version:

Quote:
9/20/2007 4:35:51 PM Starting GrafCorder Firewire.grf 2 M:\Different.tp
Defining the file...
Defining the window's title...
Defining the output file...
Analyzing...
Invalid output file path M:\Different.tp
Note that a stub M:\Media\test.tp does get created here. I didn't bother launching it from BTVE since I see the same behavior - I will if you think it would be interesting.

I wonder if you could load my .grf on your machine with the debugger and see what happens. Alternatively, I wonder if you sent me your .grf file and I substituted my capture device if either might give an interesting result...

Thanks for all your hard tinkering
B.
Reply With Quote
  #10  
Old 09-20-2007, 06:46 PM
Fonceur Fonceur is offline
Problem solver
 
Join Date: Jan 2004
Location: Montreal, Qc
Posts: 5,063
Re : Re: Re : Re: Re : GrafCorder

Quote:
Originally Posted by poobah View Post
I wonder if you could load my .grf on your machine with the debugger and see what happens.
Those .grf are supposed to be machine specific, so I don't think that would work.

Since the problem seems to be at the "Analyzing..." step, try disabling "Analyze" in GrafCorder... Sounds like you have a bad signal, thus the problem with VLC and with my simple analysis... You are testing with non-copy-protected channels, right? Have you checked with CapDVHS if it can determine the resolution and such of those channels?
__________________
BeyondTVLibrary: BTV 4.9 SDK addition for developers.
BTV-Negociator 5.07: Conflict resolution/Guide updates/Searches/etc.
BTV-Externinator 1.70: External recordings, Firewire/clear QAM/DVB/R5000HD/etc.
GrafCorder: Record from a simple .GRF file. - MLBeyond TV: MainLobby integration.
TaBTVRemote 0.12, BTVRemote 1.01, TiBTVRemote 1.05: Control BTV's interface with an Android device, PlayBook 2.0 or iPhone/iPod/iPad.
Reply With Quote
  #11  
Old 09-20-2007, 09:19 PM
poobah poobah is offline
Registered User
 
Join Date: Aug 2003
Posts: 68
Re: Re : Re: Re : Re: Re : GrafCorder

Quote:
Originally Posted by Fonceur View Post
Those .grf are supposed to be machine specific, so I don't think that would work.

Since the problem seems to be at the "Analyzing..." step, try disabling "Analyze" in GrafCorder... Sounds like you have a bad signal, thus the problem with VLC and with my simple analysis... You are testing with non-copy-protected channels, right? Have you checked with CapDVHS if it can determine the resolution and such of those channels?
Hmm...

I tried turning off analysis (by that I assume you mean changing the following setting from the grafcorder.exe.config):

Quote:
<setting name="Analyze" serializeAs="String">
<value>False</value>
</setting>
Same result, interestingly your log still says Analyzing... in it.

Quote:
9/20/2007 7:11:22 PM Starting GrafCorder Firewire.grf 2 M:\another.tp
Defining the file...
Defining the window's title...
Defining the output file...
Analyzing...
Invalid output file path M:\another.tp
I doubt it's signal quality - if I run GrafCorder with the name found in the dump filter, it is just fine (records a beautiful transport stream), but when I change the name, things fail (note this is one after another on a channel I know is good). My guess is that whatever call you're making to change the filename in the dump filter is failing?

Perhaps there's something wrong with how I constructed my .grf file. Can you tell me exactly what filter you used as your dump filter, which category you selected it from in GraphEdt, and what settings you used with it?



B.
Reply With Quote
  #12  
Old 09-20-2007, 11:25 PM
Fonceur Fonceur is offline
Problem solver
 
Join Date: Jan 2004
Location: Montreal, Qc
Posts: 5,063
Re : Re: Re : Re: Re : Re: Re : GrafCorder

Quote:
Originally Posted by poobah View Post
Same result, interestingly your log still says Analyzing... in it.
Well, there's the test recording analysis, but there's also the Filters analysis at the same time... So I put more debugging lines.

Quote:
My guess is that whatever call you're making to change the filename in the dump filter is failing?
Sounds like it, but that doesn't make sense... )

Quote:
Perhaps there's something wrong with how I constructed my .grf file.
Could you post a picture of your graph, like I did in the first post...
__________________
BeyondTVLibrary: BTV 4.9 SDK addition for developers.
BTV-Negociator 5.07: Conflict resolution/Guide updates/Searches/etc.
BTV-Externinator 1.70: External recordings, Firewire/clear QAM/DVB/R5000HD/etc.
GrafCorder: Record from a simple .GRF file. - MLBeyond TV: MainLobby integration.
TaBTVRemote 0.12, BTVRemote 1.01, TiBTVRemote 1.05: Control BTV's interface with an Android device, PlayBook 2.0 or iPhone/iPod/iPad.

Last edited by Fonceur; 09-21-2007 at 06:19 PM.
Reply With Quote
  #13  
Old 09-21-2007, 04:54 PM
poobah poobah is offline
Registered User
 
Join Date: Aug 2003
Posts: 68
Re: Re : Re: Re : Re: Re : Re: Re : GrafCorder

Quote:
Originally Posted by Fonceur View Post
Well, there's the test recording analysis, but there's also the Filters analysis at the same time... So I put more debugging lines.


Sounds like it, but that doesn't make sense... )


Could you post a picture of your graph, like I did in the first post...
Hi Fonceur!

GraphEdit picture:



From 0.05. First here's the successful log (with Analyze = true, name = dump name):

Quote:
9/21/2007 3:38:39 PM Starting GrafCorder Firewire.grf 2 M:\Media\test.tp
Defining the file...
Defining the window's title...
File already exists...
Renaming previous file to M:\Media\test-1.tp
Defining the output file...
Analyzing...
Analyzing the filters...
Dump filter...
The output file is: M:\Media\test.tp
Tuner filter...
Done analyzing the filters...
Creating the inprogress file...
9/21/2007 3:40:40 PM reached normal stopping time
Form closing, wrote 268
Here's the unsuccessful with Analyze = true:

Quote:
9/21/2007 3:41:16 PM Starting GrafCorder Firewire.grf 2 M:\Different.tp
Defining the file...
Defining the window's title...
Defining the output file...
Analyzing...
Analyzing the filters...
Dump filter...
Invalid output file path M:\Different.tp
Analyze = False log looks exactly the same - the only difference is that with analyze = false no M:\Media\test.tp is created.

B.
Reply With Quote
  #14  
Old 09-21-2007, 06:18 PM
Fonceur Fonceur is offline
Problem solver
 
Join Date: Jan 2004
Location: Montreal, Qc
Posts: 5,063
Re : Re: Re : Re: Re : Re: Re : Re: Re : GrafCorder

Quote:
Originally Posted by poobah View Post
GraphEdit picture:
Looks fine... Using the "DVBPortal HDTV Reference Dump Filter" version 1.1.0, right?

So the problem is somewhere in the dump filter part... Try this version, hopefully it will produce a meaningful error message...
__________________
BeyondTVLibrary: BTV 4.9 SDK addition for developers.
BTV-Negociator 5.07: Conflict resolution/Guide updates/Searches/etc.
BTV-Externinator 1.70: External recordings, Firewire/clear QAM/DVB/R5000HD/etc.
GrafCorder: Record from a simple .GRF file. - MLBeyond TV: MainLobby integration.
TaBTVRemote 0.12, BTVRemote 1.01, TiBTVRemote 1.05: Control BTV's interface with an Android device, PlayBook 2.0 or iPhone/iPod/iPad.

Last edited by Fonceur; 04-13-2008 at 05:21 PM.
Reply With Quote
  #15  
Old 09-22-2007, 12:31 PM
poobah poobah is offline
Registered User
 
Join Date: Aug 2003
Posts: 68
Re: Re : Re: Re : Re: Re : Re: Re : Re: Re : GrafCorder

Quote:
Originally Posted by Fonceur View Post
Looks fine... Using the "DVBPortal HDTV Reference Dump Filter" version 1.1.0, right?

So the problem is somewhere in the dump filter part... Try this version, hopefully it will produce a meaningful error message...
Hi Fonceur!

Here's the succesful run, with the name unchanged:

Quote:
9/22/2007 11:13:50 AM Starting GrafCorder Firewire.grf 2 M:\Media\test.tp
Defining the file...
Defining the window's title...
File already exists...
Renaming previous file to M:\Media\test-1.tp
Defining the output file...
Analyzing...
Analyzing the filters...
Dump filter...
The output file is: M:\Media\test.tp
Tuner filter...
Done analyzing the filters...
Creating the inprogress file...
9/22/2007 11:15:52 AM reached normal stopping time
Form closing, wrote 47
And here's the unsuccessful version (which now crashes GrafCorder BTW- I assume it's an unhandled exception):

Quote:
9/22/2007 11:25:41 AM Starting GrafCorder Firewire.grf 2 M:\Different.tp
Defining the file...
Defining the window's title...
Defining the output file...
Analyzing...
Analyzing the filters...
Dump filter...
Unspecified error

System.Runtime.InteropServices.COMException (0x80004005): Unspecified error

at DirectShowLib.DsError.ThrowExceptionForHR(Int32 hr)
at GrafCorder.Rcorder.AnalyzeDumpFile(String FileName)
at GrafCorder.Rcorder.SetDumpFile(IBaseFilter DumpFilter)
Tuner filter...
Done analyzing the filters...
Creating the inprogress file...
Thanks again for looking at this
B.
Reply With Quote
Reply

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

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


All times are GMT -6. The time now is 06:21 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
©2004-2009 Snapstream Media
You Rated this Thread: