DWM86 / transcoding-machine

Automatically exported from code.google.com/p/transcoding-machine
0 stars 0 forks source link

Unable to automatically add to the queue #2

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Installed with admin user
2. Set prefs
3. Copied files into the input folder

What is the expected output? What do you see instead?
I expected the file to be added to the queue, but nothing was added.

What version of the product are you using? On what operating system?
1.0 (1)
OSX 10.6.3

Please provide any additional information below.
Adding the file manually to the queue using the add button works fine, 
transcoding the file as 
expected.

Original issue reported on code.google.com by saintm@gmail.com on 17 May 2010 at 8:58

GoogleCodeExporter commented 8 years ago
That is usually caused by the OS losing the folder actions, go into preferences 
and
disable the monitoring and re-enable to reset the folder actions on the 
directory.
You can check the folder action setup by right clicking the directory in finder 
and
selecting Folder Actions Setup

Original comment by cory.powers@gmail.com on 17 May 2010 at 9:02

GoogleCodeExporter commented 8 years ago
Thanks for the quick response.

I did as you said, and the action remaining on the folder is "add to 
transcoding machine.scpt", but still nothing 
appears in the queue.

I've tried a .mp4 and a .avi file. Both convert if I add them to the queue 
manually.

Original comment by saintm@gmail.com on 17 May 2010 at 9:15

GoogleCodeExporter commented 8 years ago
Check the file extensions in preferences to make sure they are included as valid
extensions.

Open up Console and take a look at Console Messages, drop a file in the watched 
dir
and see if the system tries to start up the script. Don't add files to close to 
one
another since the os will throttle the folder actions if a file is added right 
after
another, on my system it is 8 seconds but that could vary.

I have seen one other case of folder actions issues where someone had to go into
finder and remove all the current folder actions on that folder then go into
preferences and enable monitoring. 

There are a lot of issues I have seen with Folder Actions being unreliable and
unfortunately there is nothing I can do about it since the OS is providing that
functionality. Usually clearing the enabling/disabling the monitoring resolves 
the
issues but I have seen it require a reboot to resolve. Also, seemingly randomly 
the
OS will lose the folder action setup and you will need to enable/disable 
monitoring
to clear it up

Original comment by cory.powers@gmail.com on 17 May 2010 at 9:21

GoogleCodeExporter commented 8 years ago
I've tried disabling, re-enabling, rebooting and creating new folders to use, 
but still the same.

I'm not that familiar with OSX so can't say if it is actually trying to execute 
the script, but here are some recent entries after I had reset the folder 
actions and gone back and enabled them in transcodingmachine, then moved a 
.avi file into the watched folder:

17/05/2010 22:48:07 Folder Actions Setup[290]   *** WARNING: Method 
selectedRowEnumerator in class NSTableView is deprecated. It will be removed in 
a future release and should no longer be used.
17/05/2010 22:48:54 TranscodingMachine[252] Checking path 
file://localhost/Users/macmini/Documents/folder1/
17/05/2010 22:48:57 TranscodingMachine[252] Checking path 
file://localhost/Users/macmini/Documents/folder1/
17/05/2010 22:48:57 TranscodingMachine[252] Checking path 
file://localhost/Users/macmini/Documents/folder1/
17/05/2010 22:48:57 TranscodingMachine[252] Folder action name folder1
17/05/2010 22:48:57 TranscodingMachine[252] Folder action path 
file://localhost/Users/macmini/Documents/folder1/
17/05/2010 22:48:57 TranscodingMachine[252] Folder action path string 
file://localhost/Users/macmini/Documents/folder1/
17/05/2010 22:48:57 TranscodingMachine[252] Folder action volume Macintosh HD
17/05/2010 22:48:57 TranscodingMachine[252] Script named add to transcoding 
machine.scpt
17/05/2010 22:48:57 TranscodingMachine[252] Found folder action
17/05/2010 22:48:59 com.apple.FolderActions.enabled[322]    launchctl: Error 
unloading: com.apple.FolderActions.folders
17/05/2010 22:49:30 /System/Library/CoreServices/AppleScript 
Runner.app/Contents/MacOS/AppleScript Runner[327]   CPSGetFrontProcess(): This 
call is deprecated and should not be called anymore.

Original comment by saintm@gmail.com on 17 May 2010 at 9:53

GoogleCodeExporter commented 8 years ago
Make sure the script is installed at /Library/Scripts/Folder Action Scripts/add 
to transcoding machine.scpt, if 
is there then delete it and restart TM. The app will install the script when it 
is loaded if its not found.

The TranscodingMachine entries in that log are from enabling/disabling the 
monitoring on the folder after the 
last line you should see a message in the log from TM that says AddFileCommand 
performDefaultImplementation, that message means that the script was run and 
called into TM with the file 
name.

You can try manually adding the Folder Action through finder as well to see if 
you have any better success but 
from the logs it looks like TM is able to setup the folder action just fine but 
for some reason OSX isn't calling 
it or there is a problem with the script.

You are using RC2, right?

Original comment by cory.powers@gmail.com on 17 May 2010 at 10:16

GoogleCodeExporter commented 8 years ago
It was in there, so I deleted it and moved another file into the watched folder:

18/05/2010 00:02:58 TranscodingMachine[459] Using output file: 
/Users/macmini/Library/Application Support/TranscodingMachine/tm_encoder.log
18/05/2010 
00:03:03    [0x0-0x65065].com.apple.systemevents[462]   com.apple.FolderActions.enabl
ed: Already loaded
18/05/2010 00:03:05 TranscodingMachine[459] Checking path file://localhost
18/05/2010 00:03:05 TranscodingMachine[459] Folder action name folder1
18/05/2010 00:03:05 TranscodingMachine[459] Folder action path 
file://localhost/Users/macmini/Documents/folder1/
18/05/2010 00:03:05 TranscodingMachine[459] Folder action path string 
file://localhost/Users/macmini/Documents/folder1/
18/05/2010 00:03:05 TranscodingMachine[459] Folder action volume Macintosh HD
18/05/2010 00:03:05 TranscodingMachine[459] I have awoke from the nib
18/05/2010 00:03:05 TranscodingMachine[459] Looking for folder action script at 
/Library/Scripts/Folder Action Scripts/add to transcoding machine.scpt
18/05/2010 00:03:05 TranscodingMachine[459] NOT FOUND: Copying script from 
/Applications/TranscodingMachine.app/Contents/Resources/add to transcoding 
machine.scpt
18/05/2010 00:03:36 TranscodingMachine[459] Checking path 
file://localhost/Users/macmini/Documents/folder1/
18/05/2010 00:03:36 TranscodingMachine[459] Folder action name folder1
18/05/2010 00:03:36 TranscodingMachine[459] Folder action path 
file://localhost/Users/macmini/Documents/folder1/
18/05/2010 00:03:36 TranscodingMachine[459] Folder action path string 
file://localhost/Users/macmini/Documents/folder1/
18/05/2010 00:03:36 TranscodingMachine[459] Folder action volume Macintosh HD
18/05/2010 00:03:36 TranscodingMachine[459] Script named add to transcoding 
machine.scpt
18/05/2010 00:03:36 TranscodingMachine[459] Found folder action

Nada.

So I removed the FolderAction and added it manually, then moved a file again:

18/05/2010 00:08:10 Folder Actions Setup[480]   *** WARNING: Method 
selectedRowEnumerator in class NSTableView is deprecated. It will be removed in 
a future release and should no longer be used.
18/05/2010 
00:09:47    com.apple.launchd.peruser.502[88]   (com.apple.FolderActions.folders) 
Throttling respawn: Will start in 1 seconds

I'm using the download "TranscodingMachine-1.0RC2.zip".

Original comment by saintm@gmail.com on 17 May 2010 at 11:10

GoogleCodeExporter commented 8 years ago
18/05/2010 
00:09:47    com.apple.launchd.peruser.502[88]   (com.apple.FolderActions.folders) 
Throttling 
respawn: Will start in 1 seconds

That line means it will not add the file you just dropped in the folder, it is 
the throttling done by the OS so TM 
never gets a chance for its script to run. Try dropping another file in there 
but I doubt it will work...

Do you know how to edit a plist file? If you have property list editor 
installed it will open when you double 
click a  plist file if not you will have to edit the xml in a text editor be 
careful if you use this approach cause 
you could lose your settings if you mess up the file.

Either way edit 
~/Library/Preferences/com.uversainc.com.TranscodingMachine.plist and set a path 
to a logFile 
and changed debugLevel to 2.

Now if the script does run at all it will write to the log file. This will tell 
us for sure if its a script issue or a 
Folder actions issue.

Original comment by cory.powers@gmail.com on 17 May 2010 at 11:18

GoogleCodeExporter commented 8 years ago
Here are the contents of the log file:

add to transcoding machine script called
adding '/Users/macmini/Documents/folder1/Red Dwarf - s03e01 - Backwards.mp4'

It's not adding anything to the queue still though. "No current process" is the 
message in the 
TranscodingMachine queue window.

Original comment by saintm@gmail.com on 17 May 2010 at 11:51

GoogleCodeExporter commented 8 years ago
That output is good, that means folder actions are working, the other issue may 
be that applescript can't find 
TM. Are you running it from your Applications folder? If not shut it down and 
move it to /Applications then open 
TM again.

Then open the add to transcoding machine.scpt in the applescript editor, tell 
me see if you get a compile error. 

Original comment by cory.powers@gmail.com on 18 May 2010 at 12:01

GoogleCodeExporter commented 8 years ago
I am running it from the applications folder.
When I click compile nothing happens (I'm guessing if there was an error, it'd 
of told me).

Original comment by saintm@gmail.com on 18 May 2010 at 12:11

GoogleCodeExporter commented 8 years ago
Open the applescript editor again and select Open Dictionary from the File 
menu, is TranscodingMachine 
listed there?

Type the following into the editor and try and run it, what happens?

tell application "TranscodingMachine"
    add "/somefile.mp4"
end tell

if you make the /somefile.mp4 path a full path to a real file it should add it 
to the queue, otherwise you will 
get an error 100 cause the file does not exist.

Also, send me your com.uversainc.TranscodingMachine.plist file

Original comment by cory.powers@gmail.com on 18 May 2010 at 12:34

GoogleCodeExporter commented 8 years ago
Yup, it's there.

Running that code, with a valid video file, added it to the queue!

Original comment by saintm@gmail.com on 18 May 2010 at 7:01

Attachments:

GoogleCodeExporter commented 8 years ago
Have you tried enabling/disabling folder actions and seeing if it works now?

Did the editor change the name of TranscodingMachine to anything else?

Can you open the folder action script again and save it, sometimes the 
applescript editor changes stuff...

Have you changed the name of the executable?

Your plist looks good

Original comment by cory.powers@gmail.com on 18 May 2010 at 7:06

GoogleCodeExporter commented 8 years ago
a) Just disabled and re-enabled it and it didn't change the result.

b) I'm not sure what you mean by changing the name. Can you expand please?

c) BINGO, WE HAVE A WINNER :)

I opened it, clicked compile and it prompted me to save when closing it. Closed 
it and tried again and the file 
was added to the queue!

Original comment by saintm@gmail.com on 18 May 2010 at 7:14

GoogleCodeExporter commented 8 years ago
I mean change the application name from TranscodingMachine to something else 
like TranscodingMachine-1.0 
or whatever? AppleScript initially tries to find an app by its name.

Can you attach your add to transcoding machine.scpt file so I can see what it 
changed?

Original comment by cory.powers@gmail.com on 18 May 2010 at 7:24

GoogleCodeExporter commented 8 years ago
Nope, I didn't alter the name. It's still called TranscodingMachine.

Original comment by saintm@gmail.com on 18 May 2010 at 7:28

Attachments:

GoogleCodeExporter commented 8 years ago
I don't see anything different in the script but at least it is working.....

Original comment by cory.powers@gmail.com on 18 May 2010 at 7:34

GoogleCodeExporter commented 8 years ago
Aye, strange.

Anyway, thanks a lot for your help in getting me going. It's a useful tool :)

Original comment by saintm@gmail.com on 18 May 2010 at 7:37

GoogleCodeExporter commented 8 years ago
I'm so happy I found this thread.  

Long story short, after fixing the arguments to use my preferred preset, and 
removing/adding the folder actions a few times, testing, enabling debugging, 
tailing log files, etc, I finally tried editing the "add to..." script and 
clicked compile, then saved the file.  

Then the next file I dropped into my watched folder worked!!  

I'm looking forward to using TranscodingMachine as a replacement to 
"Breakfast.app".  I loved that app, but I'm looking forward to having an 
integrated queue manager, and scraping/tagging for more than just tv shows 
(though I use it mostly for tv). 

Thanks a million!

One thought:  It would be cool to have a presets option (like Breakfast.app 
had) that lets you choose built-in handbrake presets.  I totally like the power 
of being able to declare input/output macros, but the presets drop-down would 
probably be very useful for beginners.

Cheers!  This is an awesome app!  I'm not sure if you also created 
videoengine/breakfast, but I'm very grateful!!!

Original comment by iamnosk...@gmail.com on 4 Oct 2010 at 5:20

GoogleCodeExporter commented 8 years ago
Just to let you know, I had the same problem and was able to solve it by the 
steps above.  Disabled and re-enabled folder actions, then opened, compile and 
saved .scpt file.  Worked well.  

Original comment by dru...@gmail.com on 5 Oct 2010 at 6:12

GoogleCodeExporter commented 8 years ago
Same here, had to re-compile the applescript in Library/... and then it worked 
fine.

Original comment by ag...@mac.com on 5 Oct 2010 at 7:15