SageTV Community  

Go Back   SageTV Community > SageTV Development and Customizations > SageTV v7 Customizations
Forum Rules FAQs Community Downloads Today's Posts Search

Notices

SageTV v7 Customizations This forums is for discussing and sharing user-created modifications for the SageTV version 7 application created by using the SageTV Studio or through the use of external plugins. Use this forum to discuss plugins for SageTV version 7 and newer.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 07-13-2011, 11:17 AM
appelm appelm is offline
Sage Aficionado
 
Join Date: Jul 2004
Location: Chappaqua, NY
Posts: 323
iPodifier alternative?

I've been a happy user of iPodifier for years. I have used it to transcode several shows nightly and automatically download them to my iPhone. I get up in the morning, unplug my iPhone, get on my commuter train and happily watch several shows.

Recently though I had to upgrade my main PC to Windows 7. For the life of me, I can't get iPodifier to work properly anymore. It transcodes videos but then iTunes gives me an error message that the video won't play on my device. I've tried using other versions of both iPodifier and FFMPEG but to no avail. Frustratingly, it seems iPodifer is no longer being supported. The main google forum talks about it being dead and the forum will be closed soon.

So I'm looking for alternatives. Is there anything else out there that does this well and automatically? I am not looking to do anything fancy like commercial removal. I just want the transcoded shows added to my iPhone and waiting for me in the morning.

One idea I have is pretty basic and almost works. ITunes now has an "Automatically Add to iTunes" folder. Media that is dropped in there is snapped up by iTunes if its running and added to the library. So I set up my SageTV server to automatically convert selected recordings to IPhone format using the handy Convert functionality of SageTV and to save the converted files in the "Automatically add to itunes" folder of my other networked computer that has iTunes running on it. Unfortunately ITunes grabs the .tmp files before they are completely transcoded causing iTunes to move them without adding them. So I have to tell Sage to put the transcoded files in a staging area to later be copied to the "Automatically add to itunes" folder.

I can write a very simple batch file to copy .mp4's (not .tmp) from my staging area to the "automatically add to itunes folder" and schedule it with Windows to be executed every 10 minutes or so. Haven't tried this yet so I'm not even sure I can do it every 10 minutes but I expect I can.

I think this would get the files into iTunes. But the next problem is kicking off a Sync action for my iPhone. I can't find a way to do this. iPodifier does it so there must be an API call to do it, but I'm not a programmer (anymore) and was hoping to keep this simple. Does anyone know a simple way to trigger iTunes to sync an Iphone/iPod via a batch file like action?

I've thought about using a windows macro type program that memorizes mouse actions, but that seems rather cumbersome.

Any thoughts or other tips appreciated.
Reply With Quote
  #2  
Old 07-13-2011, 12:45 PM
matt91's Avatar
matt91 matt91 is offline
Sage Icon
 
Join Date: Feb 2005
Location: Washington, DC
Posts: 1,185
I have used (in years past) Sage Job Queue to run a script which would do this for me automatically. I used ffmpeg I think to actually do the conversion.
__________________
Server: Ubuntu 16.04 running Sage for Linux v9
Reply With Quote
  #3  
Old 07-14-2011, 07:09 AM
appelm appelm is offline
Sage Aficionado
 
Join Date: Jul 2004
Location: Chappaqua, NY
Posts: 323
I thought about Sage Job Queue. Actually what Sage has built-in already seems adequate enough for the conversion side of things. The reason I didn't look too much at Sage Job Queue is because, correct me if I'm wrong, I don't think it could add to iTunes or trigger a sync, which are the main problem I'm trying to solve.

I do think I have found a solution that works, though perhaps is not the most graceful. I wrote a bat file that runs recursively, checking for additions to a staging area of SageTV converted videos, and then moving them into the iTunes "Automatically add to iTunes" folder. Then to trigger the sync, the only thing I could figure out was to have the bat file close iTunes and re-open it. That works. On re-open, iTunes performs a sync of any device that is connected.

Here is the bat file that worked for me last night (I haven't used it long enough to really know if its a long-term solution yet):

Code:
:start
if exist "C:\Users\appelml\Music\iTunes\iTunes Media\iTunes converted 
files\*.mp4" goto :mvfiles
timeout /t 120
goto :start
:mvfiles
start "" "C:\Program Files\iTunes\iTunes.exe"
move "C:\Users\appelm\Music\iTunes\iTunes Media\iTunes converted 
files\*.mp4" "C:\Users\appelm\Music\iTunes\iTunes Media\Automatically Add to 
iTunes"
:waitforitunes
if exist "C:\Users\appelm\Music\iTunes\iTunes Media\Automatically Add to 
iTunes\*.mp4" goto :waitforitunes
timeout /t 10
taskkill /IM iTunes.exe"
timeout /t 10
start "" "C:\Program Files\iTunes\iTunes.exe"
goto :start
First it checks if any mp4 files are in a folder I created called "iTunes converted files" which is where I instructed SageTV to deposit the newly recorded and converted MP4s. The bat file checks for existence and if there are none, it waits 2 minutes and then checks again. I might tweak the 2 minutes to a bit longer. Again, the reason for the staging area is iTunes will move any file, even the .tmp files that SageTV uses during conversion, out of that folder. Moving the .tmp file obviously interrupts the conversion. If it finds files, it starts iTunes (does nothing if its already running), moves all mp4's to the "Autmatically add to iTunes" folder, then recursively checks if the mp4's are still in that folder. iTunes moves the files out of that folder when it finds them. The bat file just waits for that to happen. The bat file waits another 10 seconds just to make sure the files are processed and then it closes iTunes with the "taskkill" command which exits iTunes gracefully. it then waits ten seconds more to make sure iTunes is closed before re-starting iTunes. On re-start, a sync action ocurs and the files are copied to my iPhone. Then the bat file restarts at the beginning waiting for more files.

I tried using Task Scheduler rather than having the bat file loop and remain open. It seemed to run the bat file as its own user and didn't properly close iTunes. I ended up with lots of iTunes processes. I will have to play around with that some more. I would rather not have a bat file command window open all the time (though I plan on minimizing it to the task bar).

One advantage of iPodifier over this though is that iPodifier would delete and replace old shows in iTunes with new ones. I could instruct it to keep no more than 2 episiodes and those would always be the newest. I don't see a good way to do that myself yet. The best I can do is instruct iTunes to only copy unwatched shows to my iPhone. When I watch the show, it'll get removed the next day and replaced.

Another thing lacking is tags. iPodifier would properly tag the recordings with show name, genre, etc. I'm surprised SageTV doesn't do that when it converts.

Would be very happy to hear any suggestions or alternatives/tweaks.
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
Are There Any Alternative Themes Available For 7? PeteCress SageTV v7 Customizations 14 10-08-2010 10:10 AM
HD PVR alternative? valnar Hardware Support 27 01-07-2009 11:06 AM
Wiz.bin alternative? GTwannabe SageTV Software 19 07-21-2007 07:21 AM
PVR-350 Video Alternative deppeler General Discussion 0 03-02-2007 02:00 PM


All times are GMT -6. The time now is 10:52 PM.


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