Using AppleScript and 3rd-Party Software with EyeTV

Working implementation of commercial skipping for EyeTV

Postby j-christ » January 1st, 2008, 1:02 am

I have a working implementation of automatic commercial skipping for EyeTV, and it's now available for free from sourceforge. There is also a facility to limit series recordings to a certain number (e.g. keep only the last two nights of the daily news, or the last three eposides of a cartoon for the kids.)

The installation is not polished yet, but the fundamentals are there. Please check out

http://sourceforge.net/projects/etvcomskip/

and follow the instructions in the README contained in the file.

Happy New Year.
Last edited by j-christ on January 2nd, 2008, 7:05 pm, edited 1 time in total.
Check out my free EyeTV add-ons:
ETVComskip (skip ads): http://code.google.com/p/etv-comskip/
PyeTV (Front Row plugin): http://code.google.com/p/pyetv/
User avatar
j-christ
Charter Member
 
Posts: 209
Joined: December 4th, 2007, 11:38 pm

Re: Working implementation of commercial skipping for EyeTV

Postby nyamatongwe » January 1st, 2008, 3:28 am

Thanks for publishing this.

The README file should say that the ETVComskip directory should be copied into the Applications directory as MarkCommercials.sh is expecting to find its ini file there.

The commercials seem to be found OK and produce a .plist file but then when ComSkipper is about to skip a commercial up pops a message box "Can't set item 1 of {} to 0." where 1 varies. This seems to be the line "set item i of doneMap to 0" but I don't have any AppleScript experience so couldn't debug much.

There was another issue where MarkCommercials.sh didn't like an episode whre the title contained a single quote.

All on OS X 10.4.11.
User avatar
nyamatongwe
Level 2
 
Posts: 86
Joined: November 21st, 2007, 9:00 am
Location: Sydney, Australia

Re: Working implementation of commercial skipping for EyeTV

Postby j-christ » January 1st, 2008, 12:07 pm

Thanks for pointing these issues out. I have posted a new release candidate which should fix both of these issues.
Check out my free EyeTV add-ons:
ETVComskip (skip ads): http://code.google.com/p/etv-comskip/
PyeTV (Front Row plugin): http://code.google.com/p/pyetv/
User avatar
j-christ
Charter Member
 
Posts: 209
Joined: December 4th, 2007, 11:38 pm

Re: Working implementation of commercial skipping for EyeTV

Postby kami » January 1st, 2008, 5:09 pm

Wow ... just what the doctor ordered. Thanks for putting in your time on this kind of thing.

I'm a longtime Microsoft prisoner just recently beginning to master usage (not programming) of OSX. EyeTV has been really good to me IRtrans etc. This comskip is exactly what I've found lacking.

When attempting to start ComSkipper.app OSX wants to run it in classic mode. Is this correct\normal?

Bit afraid to go there at the moment as I have a lot of recordings scheduled in the next while. Should I be?

Also ... FYI I'm attemting to run this on an iMAC G5 "PPC" NOT Intel.
So far FileWatcher.app appeared to open (momentary flash of a window opening) without any error window. I looked in the activity monitor but could not find it there. Is it actually running? If so what would it be called in activity monitor?

All the recordings in my EyeTV Archive folder are named *.eyetv NOT *.mpg Is this wrong?
Filewatcher.app did not generate any .plist file that I can find.

Probably too many questions without enough info from me but I'd be willing to open a dialog with you and be a tester or help you in any way.

Thanks again
User avatar
kami
Level 1
 
Posts: 11
Joined: December 6th, 2007, 9:41 pm
Location: Vancouver Canada

Re: Working implementation of commercial skipping for EyeTV

Postby j-christ » January 1st, 2008, 6:34 pm

kami wrote:When attempting to start ComSkipper.app OSX wants to run it in classic mode. Is this correct\normal?


I don't think so, but ComSkipper was created on an Intel mac. You should be able to open ComSkipper.app in ScriptEditor (/Applications/Utilities/AppleScript/) and save it as a "stay open" application to get a version native for your platform.

kami wrote:Bit afraid to go there at the moment as I have a lot of recordings scheduled in the next while. Should I be?

Also ... FYI I'm attemting to run this on an iMAC G5 "PPC" NOT Intel.


As mentioned in the README, FileWatcher and comskip were compiled for intel mac. I don't have a PPC machine to test on, so I haven't made universal binaries as I have no way to know if comskip will actually work on PPC. Hopefully some developer with a PPC mac will be able to build a ppc version, and verify if comskip actually works there.


kami wrote:So far FileWatcher.app appeared to open (momentary flash of a window opening) without any error window. I looked in the activity monitor but could not find it there. Is it actually running? If so what would it be called in activity monitor?


I doubt it's actually working. Running PPC apps works on Intel thanks to Rosetta, but I'm pretty sure it doesn't work the other way 'round.

kami wrote:All the recordings in my EyeTV Archive folder are named *.eyetv NOT *.mpg Is this wrong? Filewatcher.app did not generate any .plist file that I can find.


The .eyetv files in the archive are actually bundles (directories). If you right-click (or control-click) and choose "show package contents" from the menu in finder you'll see the contents of the directories including the .mpg files, and this is where generated .plist files would go, but again, I highly doubt comskip actually runs under PPC. If anyone builds a PPC version please let me know and I'll be sure to post about it here.
Check out my free EyeTV add-ons:
ETVComskip (skip ads): http://code.google.com/p/etv-comskip/
PyeTV (Front Row plugin): http://code.google.com/p/pyetv/
User avatar
j-christ
Charter Member
 
Posts: 209
Joined: December 4th, 2007, 11:38 pm

Re: Working implementation of commercial skipping for EyeTV

Postby nyamatongwe » January 2nd, 2008, 12:39 am

RC3 fixed the message box issue in ComSkipper for me.

One very large file failed within comskip with CPU sticking at around 30% rather than the normal 95%+ until it produced an incomplete .plist and said it had only found 7 frames. Worked OK after editing to remove some extra content at start and end. May be an idea to update the included version of comskip as the upstream site shows current version is 14 revisions later.

The EyeTV limitation where it overwrites the .eyetvr file is a bit unpleasant. I wonder if there is some way to tell it "hey I changed this file behind your back, read it in again". The "all" option to FileWatcher is good - I had started working on a script to do that myself.
User avatar
nyamatongwe
Level 2
 
Posts: 86
Joined: November 21st, 2007, 9:00 am
Location: Sydney, Australia

Re: Working implementation of commercial skipping for EyeTV

Postby j-christ » January 2nd, 2008, 7:56 am

nyamatongwe wrote:RC3 fixed the message box issue in ComSkipper for me.

One very large file failed within comskip with CPU sticking at around 30% rather than the normal 95%+ until it produced an incomplete .plist and said it had only found 7 frames. Worked OK after editing to remove some extra content at start and end. May be an idea to update the included version of comskip as the upstream site shows current version is 14 revisions later.


How large was the file? There might be an issue with comskip and very large files related to a difference between Mac OS X and window's seek functions. What was in the .log file?

I don't understand what you mean by the "upstream site shows current version is 14 revisions later"---I pulled the latest comskip sources from the subversion repository before I began the port. SVN update shows "at Revision 17". Is there something I missed?

nyamatongwe wrote:The EyeTV limitation where it overwrites the .eyetvr file is a bit unpleasant. I wonder if there is some way to tell it "hey I changed this file behind your back, read it in again". The "all" option to FileWatcher is good - I had started working on a script to do that myself.


Yes, it *is* unpleasant, but El Gato is aware of the issue. See this thread:

http://forums.elgato.com/viewtopic.php?f=91&t=623

Feel free to comment in that thread to add you support for a scriptable interface to the
markers property (it can't hurt), and I have an open support request on this topic.
Check out my free EyeTV add-ons:
ETVComskip (skip ads): http://code.google.com/p/etv-comskip/
PyeTV (Front Row plugin): http://code.google.com/p/pyetv/
User avatar
j-christ
Charter Member
 
Posts: 209
Joined: December 4th, 2007, 11:38 pm

Re: Working implementation of commercial skipping for EyeTV

Postby nyamatongwe » January 2nd, 2008, 9:25 am

The file that failed was over 16GB - a high definition movie. The log file has been deleted (as was the original file) and was very short, not including the normal repetitive progress lines, just the header, 7 frames decoded in x seconds, and Commercials were not found.

http://www.kaashoek.com/comskip/files/readme.txt shows 0.79.113 as the most recent but this version of comskip says it is 0.79.99. Many of the revisions may not be applicable but there is a note "Do use build 102 or earlier".
User avatar
nyamatongwe
Level 2
 
Posts: 86
Joined: November 21st, 2007, 9:00 am
Location: Sydney, Australia

Re: Working implementation of commercial skipping for EyeTV

Postby simo » January 2nd, 2008, 1:40 pm

Can this be used to create markers to the recording so it'd be possible to permanently remove commercials using "Compact" in EyeTV's editor?
Export your EyeTV recordings easily to DVD with iTV2DVD
User avatar
simo
Level 1
 
Posts: 10
Joined: December 21st, 2007, 5:01 pm
Location: Finland

Re: Working implementation of commercial skipping for EyeTV

Postby j-christ » January 2nd, 2008, 7:03 pm

simo wrote:Can this be used to create markers to the recording so it'd be possible to permanently remove commercials using "Compact" in EyeTV's editor?


Yes. However, due to a limitation in EyeTV, changes to the .eyetvr file (where the markers are kept) made by third-party programs *while EyeTV is running* are lost. There is a thread about this limitation here:

http://forums.elgato.com/viewtopic.php?f=91&t=623

Feel free to register your support for this feature request by commenting in that thread.

Even with the limitation, it's possible to do exactly that by running FileWatcher from the ETVComskip distribution with EyeTV not running.
Check out my free EyeTV add-ons:
ETVComskip (skip ads): http://code.google.com/p/etv-comskip/
PyeTV (Front Row plugin): http://code.google.com/p/pyetv/
User avatar
j-christ
Charter Member
 
Posts: 209
Joined: December 4th, 2007, 11:38 pm

Re: Working implementation of commercial skipping for EyeTV

Postby j-christ » January 2nd, 2008, 7:08 pm

For those following this thread, I'd like to point out that sourceforge has finally gotten around to processing my name-change request for the ETVComskip program, and so it has a new URL. I've updated the URL in the first post in this thread to be correct now.

So, the current URL for the (intel) Mac OS X port of comskip and scripts for integrating it into EyeTV is:

http://sourceforge.net/projects/etvcomskip/
Check out my free EyeTV add-ons:
ETVComskip (skip ads): http://code.google.com/p/etv-comskip/
PyeTV (Front Row plugin): http://code.google.com/p/pyetv/
User avatar
j-christ
Charter Member
 
Posts: 209
Joined: December 4th, 2007, 11:38 pm

Re: Working implementation of commercial skipping for EyeTV

Postby Lycestra » January 2nd, 2008, 8:24 pm

http://www.lycestra.com/etvcomskip_unifinal.patch

patch i made to allow both programs to compile as a universal binary. the intel binaries posted can't run at all on a PowerPC machine. The patch modifies the makefiles to build universal binaries, and alters headers and some source to properly compile. I don't know if it's correct, but at least it should try to run.

The config.h is kinda annoying in how its staticly configured to the host machine, rather than allowing the compiler to aid in target-specific stuff. But I think Mac OS X is the only platform with universal binaries, which is why its so annoying. The config.h had to be modified so that x86-specific options are enabled on non-ppc, and ppc-specific options are enabled on ppc. Kludgey, but it compiles :D

By the way, is there some way to maybe make this as a Recording Plugin (rather than a Live plugin) so it works like Edit features (like export and compress do)?

Cheers.
User avatar
Lycestra
Level 2
 
Posts: 31
Joined: December 29th, 2007, 11:47 pm

Re: Working implementation of commercial skipping for EyeTV

Postby j-christ » January 2nd, 2008, 8:48 pm

You, sir, are my new hero. I was actually working on this, but I couldn't quite figure out how to get my 10.4.10 mac to accept the altivec instructions. I'll try your patch.

Lycestra wrote:The config.h is kinda annoying in how its staticly configured to the host machine, rather than allowing the compiler to aid in target-specific stuff. But I think Mac OS X is the only platform with universal binaries, which is why its so annoying. The config.h had to be modified so that x86-specific options are enabled on non-ppc, and ppc-specific options are enabled on ppc. Kludgey, but it compiles :D


I agree. However, from what I can tell from Apple's universal binary porting guide, they actually recommend that you switch from configure-time determination of architecture to compile-time using the macros __i386__ and __ppc__, similar to how you've used __POWERPC__ in your patch.

you turned off ACCEL_DETECT in config.h for both architectures. Any particular reason?

and I'm not sure about your implementation of SaturateRound for ppc. I hit the same snag, and don't really grok x86 assembly, but from what I can tell the x86 version of this is supposed to round the double arg to a short, with the proviso that if the value is out of the range for a short it will return SHORT_MAX or SHORT_MIN. I don't see how your implementation does the same thing at all.

Lycestra wrote:By the way, is there some way to maybe make this as a Recording Plugin (rather than a Live plugin) so it works like Edit features (like export and compress do)?
Cheers.


Uh, I'm afraid you've lost me me here. This isn't any sort of plug-in at all, currently. Are you talking about the EyeTV SDK, which I haven't looked at yet?
Check out my free EyeTV add-ons:
ETVComskip (skip ads): http://code.google.com/p/etv-comskip/
PyeTV (Front Row plugin): http://code.google.com/p/pyetv/
User avatar
j-christ
Charter Member
 
Posts: 209
Joined: December 4th, 2007, 11:38 pm

Re: Working implementation of commercial skipping for EyeTV

Postby Lycestra » January 2nd, 2008, 9:24 pm

One thing to try is just do a "-arch ppc" and it will make ppc-only (vs universal or intel-only) binaries. on an intel machine, they would run in rosetta. Thats one way to test it on your machine. there isn't a reverse rosetta (ppc running intel apps) and no need either, since that isn't really reverse compatibility but a perversion of forward compatibility. (can 68k run native PPC Illustrator yet? :P)

My eyetv hardware is all on my G5 machine, so I figured I should give it a try. But im not at home right now to test.

Feel free to switch from __POWERPC__ to __ppc__ if you like. I just went with what worked first.

ACCEL_DETECT broke some compile thing on PPC (jump code), but i forgot to make it a ppc-only config thing. There was a warning breaking the compile regarding some of that code for altivec. It probably should be enabled for x86 considering how many accel options there probably are for x86 cpus. (not sure how much it varies for intel-mac) ppc is pretty much altivec and thats it. maybe.

SaturateRound was a bit of a crap shoot. I had ac3 decoding code from other open source project code i had laying around. Had spotlight help find which source was most similar (find the name of the 5-channel to 2-channel downsample function its used in) and i found what was probably another version (likely older) of the same code that used no asm. So I copied that to create the SaturateRound. multiplication, so its slower than the asm. Mostly I was fitting what I thought was a square peg into a square hole, hoping it fits.

That last part about the plugin was my mind wandering. I looked at Elgato's plugin SDK, which seems to support Live filters. Naturally if this were to become a plugin, it would be an editing function which operates on existing recordings, like export and compact. But that was my quick glance at it. I don't know absolutely what plugins can and can't plug into. Mostly, I was musing into the ether.

Let me know if you want any help. I plan on testing what I have tonight. I've got a history of trying to make things work (for me) when the source is available, so really, it was more fun than anything to try getting this compiling. Making it work on ppc is another issue, but hopefully not too much of a slog.
User avatar
Lycestra
Level 2
 
Posts: 31
Joined: December 29th, 2007, 11:47 pm

Re: Working implementation of commercial skipping for EyeTV

Postby j-christ » January 2nd, 2008, 9:36 pm

Lycestra wrote:ACCEL_DETECT broke some compile thing on PPC (jump code), but i forgot to make it a ppc-only config thing. There was a warning breaking the compile regarding some of that code for altivec. It probably should be enabled for x86 considering how many accel options there probably are for x86 cpus. (not sure how much it varies for intel-mac) ppc is pretty much altivec and thats it. maybe.


I figured turning off ACCEL_DETECT on x86 was on oversight.

I've been in contact with Erik (upstream maintainer of comskip) about possibly upgrading the libmpeg2 library from comskip. The version from
http://svn.mplayerhq.hu/mplayer/trunk/libmpeg2/ seems to be newer, and it may better support PPC. It'd be a shame (if it even works at all) to totally turn off ACCEL_DETECT for ppc, since there seems to be altivec/PPC accel code already in the library. It's just a matter of getting it to work.

What version of GCC are you using? When I try to build with your patch, things go along fine until I hit:
Code: Select all
cc -c -pipe -Wall -W -Os -fasm-blocks -Wno-unused  -DHAVE_CONFIG_H   -arch i386 -arch ppc -I/Developer/qt/mkspecs/default -I. -Ilibmpeg2 -IAC3Dec -Iargtable2-7/src -o cpu_state.o libmpeg2/cpu_state.c
{standard input}:17:stvx vector instruction is optional for the PowerPC (not allowed without -force_cpusubtype_ALL option)




And then if I add that flag: I get
Code: Select all
cc -c -pipe -Wall -W -Os -fasm-blocks -Wno-unused  -DHAVE_CONFIG_H   -arch i386 -arch ppc -force_cpusubtype_ALL -I/Developer/qt/mkspecs/default -I. -Ilibmpeg2 -IAC3Dec -Iargtable2-7/src -o idct_altivec.o libmpeg2/idct_altivec.c
In file included from libmpeg2/idct_altivec.c:29:
/usr/lib/gcc/powerpc-apple-darwin8/4.0.1/include/altivec.h:36:2: error: #error Use the "-maltivec" flag to enable PowerPC AltiVec support


And then gcc reports maltivec is an invalid option if I try to use it.

Lycestra wrote:Let me know if you want any help. I plan on testing what I have tonight. I've got a history of trying to make things work (for me) when the source is available, so really, it was more fun than anything to try getting this compiling. Making it work on ppc is another issue, but hopefully not too much of a slog.


Yes please. Any help would be appreciated. It might be better to move development discussion to sourceforge, though.
Check out my free EyeTV add-ons:
ETVComskip (skip ads): http://code.google.com/p/etv-comskip/
PyeTV (Front Row plugin): http://code.google.com/p/pyetv/
User avatar
j-christ
Charter Member
 
Posts: 209
Joined: December 4th, 2007, 11:38 pm

Re: Working implementation of commercial skipping for EyeTV

Postby j-christ » January 2nd, 2008, 9:42 pm

Code: Select all
#define SaturateRound(x) (x < -32768) ? -32768 : ((x > 32767) ? 32767 : ((short)x));


Seems like a better choice for SaturateRound's implementation on PPC.
Check out my free EyeTV add-ons:
ETVComskip (skip ads): http://code.google.com/p/etv-comskip/
PyeTV (Front Row plugin): http://code.google.com/p/pyetv/
User avatar
j-christ
Charter Member
 
Posts: 209
Joined: December 4th, 2007, 11:38 pm

Re: Working implementation of commercial skipping for EyeTV

Postby sjk » January 2nd, 2008, 9:50 pm

j-christ wrote:It might be better to move development discussion to sourceforge, though.

But it's much easier reading/posting here than on SF's crappy "forum".
sjk
Charter Member
 
Posts: 3685
Joined: November 15th, 2007, 10:13 pm
Location: Hawaii

Re: Working implementation of commercial skipping for EyeTV

Postby Lycestra » January 2nd, 2008, 9:59 pm

probably is a little better. I didn't actually look at it to consider what it does.

I'm on Leopard, so my GCC probably is a little newer. Are you using XCode 2.5? (leopard has 3, but 2.5 is the update for 10.4 that came out after leopard) Not quite sure how to use -maltivec at a command line that does both archs. If the compile was split into 2 gcc commands, the resulting objects would have to be merged using 'lipo' (takes thin binaries and combines them. the name appears to be a joke on the old 68k/PPC "Fat" binaries.) That would mean modifying makefile rules to have arch-specific objects (whatever.ppc.o and whatever.x86.o) and then the final object (whatever.o) be a lipo command that depends on the other two. never done that myself. blah. Maybe switch to XCode.

I just regged with sourceforce. Prolly about time I did. amazingly still got the same name as here. This is /my/ nick. :D I'll look at that tonight. for now, I should get to work.

Oh yeah. i was wondering whats with the QT make directives? thats just.. weird.
User avatar
Lycestra
Level 2
 
Posts: 31
Joined: December 29th, 2007, 11:47 pm

Re: Working implementation of commercial skipping for EyeTV

Postby j-christ » January 2nd, 2008, 10:14 pm

Lycestra wrote:probably is a little better. I didn't actually look at it to consider what it does.

I'm on Leopard, so my GCC probably is a little newer. Are you using XCode 2.5? (leopard has 3, but 2.5 is the update for 10.4 that came out after leopard) Not quite sure how to use -maltivec at a command line that does both archs. If the compile was split into 2 gcc commands, the resulting objects would have to be merged using 'lipo' (takes thin binaries and combines them. the name appears to be a joke on the old 68k/PPC "Fat" binaries.) That would mean modifying makefile rules to have arch-specific objects (whatever.ppc.o and whatever.x86.o) and then the final object (whatever.o) be a lipo command that depends on the other two. never done that myself. blah. Maybe switch to XCode.



I'm using XCode 2.4.1, but really everything I do is from the command line (I'm really a linux geek, not a Mac OS X one), so it's
Code: Select all
gcc --version
i686-apple-darwin8-gcc-4.0.1 (GCC) 4.0.1 (Apple Computer, Inc. build 5367)


I just regged with sourceforce. Prolly about time I did. amazingly still got the same name as here. This is /my/ nick. :D I'll look at that tonight. for now, I should get to work.

Oh yeah. i was wondering whats with the QT make directives? thats just.. weird.


The upstream comskip didn't come with a build system, so I just used qmake to create one.
Code: Select all
qmake -project


creates comskip.pro, and then running qmake on that makes the Makefile. It's the easiest way I know of to create a makefile from a bare directory.

There should not be any actual Qt dependencies in the comskip build, (so you shouldn't even need Qt to build it), but FileWatcher did wind up using it just to create the app bundle. Since FileWatcher is so simple, I should probably just hand-edit the makefile for that so as not to need Qt at all.
Check out my free EyeTV add-ons:
ETVComskip (skip ads): http://code.google.com/p/etv-comskip/
PyeTV (Front Row plugin): http://code.google.com/p/pyetv/
User avatar
j-christ
Charter Member
 
Posts: 209
Joined: December 4th, 2007, 11:38 pm

Re: Working implementation of commercial skipping for EyeTV

Postby Lycestra » January 2nd, 2008, 10:27 pm

j-christ wrote:
I'm using XCode 2.4.1, but really everything I do is from the command line (I'm really a linux geek, not a Mac OS X one), so it's
Code: Select all
gcc --version
i686-apple-darwin8-gcc-4.0.1 (GCC) 4.0.1 (Apple Computer, Inc. build 5367)



Code: Select all
i686-apple-darwin8-gcc-4.0.1 (GCC) 4.0.1 (Apple Computer, Inc. build 5370)
Copyright (C) 2005 Free Software Foundation, Inc.

Hmm.. Not sure what would be gained with XCode 2.5 other than compatibility with XCode 3's project files. The gcc version with 2.5 is build 5370, same version tho.

Ah. another linux geek gone mac. Welcome to the club. Tho I switched to mac hardware almost 10 years ago. Stuck with Linux primarily until i got 10.2 and a G4.
User avatar
Lycestra
Level 2
 
Posts: 31
Joined: December 29th, 2007, 11:47 pm

Re: Working implementation of commercial skipping for EyeTV

Postby rackerby » January 3rd, 2008, 5:48 pm

kami wrote:So far FileWatcher.app appeared to open (momentary flash of a window opening) without any error window. I looked in the activity monitor but could not find it there.
I'm experiencing this too. I'm on an Intel Mac (MacBook Pro).
_
User avatar
rackerby
Charter Member
 
Posts: 168
Joined: November 27th, 2007, 7:42 pm

Re: Working implementation of commercial skipping for EyeTV

Postby Lycestra » January 3rd, 2008, 6:47 pm

rackerby wrote:
kami wrote:So far FileWatcher.app appeared to open (momentary flash of a window opening) without any error window. I looked in the activity monitor but could not find it there.
I'm experiencing this too. I'm on an Intel Mac (MacBook Pro).
_


Easiest way to see the error is to run it in Terminal. basically, in the terminal, type "/path/to/wherever/FileWatcher.app/Contents/MacOS/FileWatcher" (replacing /path/to/wherever with wherever you keep it) and see what happens. Maybe a segfault, or a linker error.


Also, update on my progress with the universal binary test. Keeping it simple to test the comskip functionality, I tried running MarkCommercials.sh on the mpg file in an existing file. EyeTV wasn't running while doing that, and then I started up EyeTV when it was done. It didn't seem to do anything. Tho i forgot to change the saturatedround function. Might be that bug, a miscalibration, or I'm just not using it right. I was expecting that if EyeTV isn't running while the MarkCommercials.sh script is running, it would tweak the file so commercials are marked, and EyeTV started after that would see it as such. I figured that MarkCommercials.sh was a good starting point to test just that functionality. What should I expect if I run MarkCommercials.sh while EyeTV isn't running?
User avatar
Lycestra
Level 2
 
Posts: 31
Joined: December 29th, 2007, 11:47 pm

Re: Working implementation of commercial skipping for EyeTV

Postby j-christ » January 3rd, 2008, 8:19 pm

Lycestra wrote:
rackerby wrote:
kami wrote:So far FileWatcher.app appeared to open (momentary flash of a window opening) without any error window. I looked in the activity monitor but could not find it there.
I'm experiencing this too. I'm on an Intel Mac (MacBook Pro).
_


Easiest way to see the error is to run it in Terminal. basically, in the terminal, type "/path/to/wherever/FileWatcher.app/Contents/MacOS/FileWatcher" (replacing /path/to/wherever with wherever you keep it) and see what happens. Maybe a segfault, or a linker error.


Ok, I can confirm this. The problem was introduced when I added the "all" flag to
FileWatcher. I wasn't actually checking for "all", I was just assuming that any argument should make FileWatcher go into batch mode. Apparently, double clicking on an .app bundle adds an argument of the type: -psn_0_23724033.

Changing
Code: Select all
if (argc>1) {

to

Code: Select all
  bool do_all=false;
  for (int i=0; i< argc; ++i)
  {
    if (strncmp(argv[i],"all",3)==0) {
      do_all=true;
      break;
    }
  }

  if (do_all)
  {


seems to work, in that FileWatcher.app starts and stays running (as can be monitored in console), but eventually the Dock shows "Application not responding" (even though it's doing what it's supposed to do. I'm pretty sure that as a hidden login item this should be ok, but I'm open to suggestions as to how to make this more mac-like. (As a linux guy, I'd just put something in my .login file.)

Is there a better way of making a background process like FileWatcher into a login item? FileWatcher is really a command line program, I just made it into an app bundle so that it could be made into a login item which didn't pop open the terminal.

Also, update on my progress with the universal binary test. Keeping it simple to test the comskip functionality, I tried running MarkCommercials.sh on the mpg file in an existing file. EyeTV wasn't running while doing that, and then I started up EyeTV when it was done. It didn't seem to do anything. Tho i forgot to change the saturatedround function.


From what I can tell SaturateRound isn't actually used with EyeTV mpeg2 input, since it seems to be using mpeg2 sound and not AC3. Still worth getting right, but not the top priority.

Might be that bug, a miscalibration, or I'm just not using it right. I was expecting that if EyeTV isn't running while the MarkCommercials.sh script is running, it would tweak the file so commercials are marked, and EyeTV started after that would see it as such. I figured that MarkCommercials.sh was a good starting point to test just that functionality. What should I expect if I run MarkCommercials.sh while EyeTV isn't running?


If EyeTV isn't running MarkCommercials.sh should run comskip (the application) which will create a .plist file. Then PlistBuddy should merge those markers into the .eyetvr file, and when EyeTV is started, the markers should show up in the editor window.

If that doesn't work for you, the best thing to do is probably run comskip manually from the terminal to see what it's doing, and/or look at the .log file to see what it did.

Code: Select all
./comskip -v 6 file.mpg


Assuming that works, then check the contents of the .plist file, and finally look in the .eyetvr file to see if the markers array was set.

Please keep me informed of your progress on the PPC version. I'll post an update on sourceforge with the changes to FileWatcher.
Check out my free EyeTV add-ons:
ETVComskip (skip ads): http://code.google.com/p/etv-comskip/
PyeTV (Front Row plugin): http://code.google.com/p/pyetv/
User avatar
j-christ
Charter Member
 
Posts: 209
Joined: December 4th, 2007, 11:38 pm

Re: Working implementation of commercial skipping for EyeTV

Postby j-christ » January 3rd, 2008, 9:37 pm

Let's move this discussion to the ETVComskip forum at:

http://sourceforge.net/forum/forum.php?forum_id=766457

Also, I've update ETVComskip to 1.0RC4, and created the subversion repository of it at sourceforge.
Check out my free EyeTV add-ons:
ETVComskip (skip ads): http://code.google.com/p/etv-comskip/
PyeTV (Front Row plugin): http://code.google.com/p/pyetv/
User avatar
j-christ
Charter Member
 
Posts: 209
Joined: December 4th, 2007, 11:38 pm

Re: Working implementation of commercial skipping for EyeTV

Postby sjk » January 3rd, 2008, 11:43 pm

j-christ wrote:Let's move this discussion to the ETVComskip forum at:

http://sourceforge.net/forum/forum.php?forum_id=766457

'Tis a downgrade… losing the convenience of e-mail notifications and the ability to view multiple posts on the same page that we've got here. Oh well.

Any reason you chose to host this project on SourceForge instead of Google Code?
sjk
Charter Member
 
Posts: 3685
Joined: November 15th, 2007, 10:13 pm
Location: Hawaii

Next

 
Welcome, Guest
Elgato FAQ Find Elgato on Facebook and become a fan Follow us on Twitter Available on the App Store Update to EyeTV 3