Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.
Screen.

In command line via ssh, you can run 'screen'. It allows a terminal session that you can detach from and still have the process running.

Here is a brutal quick run tutorial of how I use it.

Ssh into computer, type screen. This opens a screen. Run a command, let it do its thing. If you get disconnected or want to detach, press Control+a, release and then hit D. This detaches the screen, now your in the first session.
You can exit or if you want to reattach to that screen to see the progress, type in screen -R -D

Now its back on your screen.

Play with it with simple things until you figure out how it works. Google will help you as well with more options.

Just been playing with screen. Amazing, almost life-changing. Thanks HackerJL.
 
Last edited:
Ok, next question. Is it possible to change label colors of files via the command line?

A quick google doesnt show much promise, but if you want, make an automator script to do that, and run that on command line.

And yes...screen changes life. I ssh into many MANY machines, and I type screen almost by habit, updates, downloads, everything completes for sure, even if I get disconnected.
 
Ok, next question. Is it possible to change label colors of files via the command line?

I usually use AppleScript to set the colors. Below is a list of the numbers that correlate to the label colors. I've also included a few examples of how you'd use them in Terminal and Hazel.

LABEL INDEX REFERENCE
No color = 0
Orange = 1
Red = 2
Yellow = 3
Blue = 4
Purple = 5
Green = 6
Gray = 7​

Code:
# TERMINAL: SET LABEL COLOR TO GREEN
osascript -e "try" -e "set thisFile to POSIX file \"/Users/usershortname/path/to/file.m4v\" as alias" -e "tell application \"Finder\" to set label index of thisFile to 6" -e "end try"

Code:
# HAZEL (RUN SHELL SCRIPT): SET LABEL COLOR TO GREEN
osascript -e "try" -e "set thisFile to POSIX file \"$1\" as alias" -e "tell application \"Finder\" to set label index of thisFile to 6" -e "end try"

Code:
-- HAZEL (RUN APPLESCRIPT): SET LABEL COLOR TO GREEN
try
	tell application "Finder" to set label index of theFile to 6
end try
 
Backing up and Encoding a 2 Disc Movie

Hey. Really appreciate this tutorial. I'm having great success with it. Thanks!!!

I have one question. I have Lord of the Rings Extended Trilogy. This basically means the movie is split across 2 Discs in two parts. How do I backup/encode these as a single movie?

Any help appreciated. Thanks :D
 
Hey. Really appreciate this tutorial. I'm having great success with it. Thanks!!!

I have one question. I have Lord of the Rings Extended Trilogy. This basically means the movie is split across 2 Discs in two parts. How do I backup/encode these as a single movie?

Any help appreciated. Thanks :D

I usually just keep them as separate files, but I did play around with this a few years ago and found DVD2One to be a good solution. Here's a thread on the HB forum that details the process: https://forum.handbrake.fr/viewtopic.php?f=5&t=2937

Thanks!

mac.jedi
 
A Little hazel help

This tutorial is awesome! Thanks for the great work! In the tutorial you mention this:

You can also duplicate this workflow for TV Shows as well keeping the files in separate folders and automatically creating subfolders based on the show name and season.

How do you set hazel to move the final TV Show encoded files into subfolders based on the show name and season?

Thanks!
 
This tutorial is awesome! Thanks for the great work! In the tutorial you mention this:



How do you set hazel to move the final TV Show encoded files into subfolders based on the show name and season?

Thanks!

Nowadays I just have iTunes do it. When you have iTunes set to organize your files, and add a Movie or TV Show file to the "Automatically Add to iTunes" folder, iTunes will create the folders necessary and add the file. Note that the files have to be properly tagged before they are added to iTunes.

Before iTunes made this so easy, I used the shell script below in Hazel's "Run Shell Script" action.

Code:
#sortTvShowToSubFolder.sh

tvFolderPath="/Volumes/Drobo/TV Shows"
theFile="$1"
fileName=`basename "$theFile"`
showName=`basename "$theFile" .m4v | sed 's/\ \-\ S[0-9].*$//g'`
seasonFolder=`basename "$theFile" .m4v | sed -e 's/^.*-\ S//g' -e 's/E[0-9][0-9]$//g' -e 's/^0//' -e 's/^/Season\ /'`
sortFilePath="$tvFolderPath/$showName/$seasonFolder"

if [ ! -e "$sortFilePath" ]; then
	mkdir -p "$sortFilePath"
fi

mv "$theFile" "$sortFilePath/$fileName"

It's a bit complicated if you're not familiar with scripting, so for a beginner I'd recommend just using iTunes.

Thanks!

mac.jedi
 
I just downloaded the .8 version to use after installing lion. Even i go to use Batch Rip Dispatcher it says:

"The action "Batch Rip Dispatcher" encountered an error"

When I look at the workflow, its blank. Unsure if thats how its meant to be... *shrugs*

Edit: They all now come up with the same error...:/
 
I just downloaded the .8 version to use after installing lion. Even i go to use Batch Rip Dispatcher it says:

"The action "Batch Rip Dispatcher" encountered an error"

When I look at the workflow, its blank. Unsure if thats how its meant to be... *shrugs*

Edit: They all now come up with the same error...:/

Hi zero-beat,

Sorry you are having problems. It sounds like the actions may not be installed. The Batch Rip Dispatcher workflow should have a Batch Rip Dispatcher item in the workflow, but note that this action has no options; just a title.

Here are a few tips to troubleshoot.

  1. Reboot Computer.
  2. Quit Automator before installing the Actions.
  3. Reinstall Batch Rip Actions for Automator.
  4. Verify that the Services have been installed in your user Library Folder (~/Library/Services).
  5. Verify that the Actions have been installed in your root Library Folder (/Library/Automator).
  6. Launch Automator.
  7. Choose Open.
  8. Select Services from the file type pull-down menu. Select and Open the Batch Rip • Batch Rip Dispatcher.workflow.
  9. In Automator, Right-Click on the Batch Rip Dispatcher Action Panel in the workflow area, and Select "Show in Finder".
  10. Verify that the Service is linked to the Batch Rip Dispatcher.action file in your root Library Folder (/Library/Automator).

I hope this helps.

Thanks!

mac.jedi
 
Is there away to make the tagging scripts add the meta data to the files without making copies of the files? I use the program Subler to add tags but it would be nice to utilize the scripts. Subler adds the tags without copying the file, so the writing process takes only a few seconds.

If this is not possible, is there away to make a work flow or automation to auto run Subler?

Also, I've been trying to find where the add chapter names script is located on my hard drive but I can't seem to find it.

Thanks
 
Just curious.....will all of these workflows still work in Lion?

they still work for me

the only one that doesn't work is the one that looks up the movie tag information from themoviedb.org
but i think that is more to do with the API key that's being used being out of date and the script that pulls down the tag metadata from thetvdb.com still works fine
 
they still work for me

the only one that doesn't work is the one that looks up the movie tag information from themoviedb.org
but i think that is more to do with the API key that's being used being out of date and the script that pulls down the tag metadata from thetvdb.com still works fine

The latest version (1.0.8) was updated for Lion:
https://forums.macrumors.com/posts/13143323/

I just tested the Add Movie Tag actions and they are working fine.
 
The latest version (1.0.8) was updated for Lion:
https://forums.macrumors.com/posts/13143323/

I just tested the Add Movie Tag actions and they are working fine.

Hi Mac.Jedi,

It's been a long time I didn't came back to this thread and I'm pleased to see you continue to develop this script, but I've got two questions regarding this new version :

- is it now possible to set the script in order to encode 2 or 3 different audio languages (and the corresponding subtitles), for example French and English, if they can be found in the DVD images (xxx.dvdmedia) ?

- is it possible to make a MKV file from a DVD image ?

Kind regards
 
FPS when using Makemkv to rip DVDs...

Thanks mac.jedi for all your work!

I just have a question. I've noticed when I use Makemkv to rip DVDs (when Fairmount doesn't work) that the framerate passed to Handbrake is 29.970 instead of the usual 23.976. This doesn't cause problems, does it? I'm assuming that Handbrake is able to correctly figure this out, but wanted to verify.
 
Thanks for the great scripts :D Made my life easy

Though, is there anyway to stop it from making multiple copies of the same file?

(eg. when a dvd has 4 eps on it, i end up with 8 files because it makes two of each. And they are then numbered 1 -8)
 
Just wondering if anyone else is having problem with the looking up of TV information?

When i start Batch Rip, the action starts and asks to search for the show name, it just hangs and eventually starts ripping the disk anyway.

Additionally when i try to add TV tags (Artwork, show name etc) it just hangs and eventually stops.

Is the service down? Is there a way of checking?

Answered my own question! Looks like thetvdb.com is down...
 
Last edited:
Well I fixed the problem.

Yesterday videos on the external drives would no longer player in Quicktime saying they were corrupted but played fine in VLC, played fine if I copied the files back to the desktop, or connected the hard drive to another Mac.

Fixing disk permissions (again) didn't work, setting up a new account didn't work. So in the end I gave in and reinstalled Lion and the automator services now work on files not on the primary drive.

So looks like my Lion server install must have been corrupt in someway. God only how/why
 
Problems/Questions

Hey, I just wanted to thank you for the scripts has saved me a lot of time. But I am having some issues.

1. Since updating to the 1.0.8 scripts and lion I receive an error message after every movie I receive the error message:
"Error: Add Movie Tags
The API may be down or there is a problem returning the data.
Check tagchimp.com to verify chapter information"

It properly tags the file and renames the file just not sure why the error messages appears.

2. When I would run any automator script using 1.0.6 I would get the spinning gear icon in the status bar that no longer appears.

3. When I use the Add TV tags (Date Aired or DVD) for a series of .m4v files all properly named it will find the majority of the files but sometimes it says it can not find an episode which was named the same way as every other file. The fix is usually take the file name of a file that works copy and paste it over the old file name and just change the episode number.

4. I receive "Covert art failed" do you know why this happens and is their a fix for it .

Thanks in advance
 
I'm having some trouble encoding mkv files that haven't been created with the Batch Rip action. I think it might be connected with the default audio language setting. Could this be correct?

Also, if I have a mix of SD (from DVD rips) and HD mkv files in my Batch Rip Movies folder, what settings should I choose in the Batch Encode action? Can I select for both SD and HD encoding?

Final question is with regard to color labels of files. Can you give us a list of what the different color labels of files in the Batch Rip and Batch Encode folders mean? I know that green labels mean that the files have been processed correctly, but I'm also getting orange-labelled encoded files in the Batch Encode folder, and grey-labelled source folders in the Batch Rip folder.

Many thanks for your help mac.jedi.
 
Hey, I just wanted to thank you for the scripts has saved me a lot of time. But I am having some issues.

1. Since updating to the 1.0.8 scripts and lion I receive an error message after every movie I receive the error message:
"Error: Add Movie Tags
The API may be down or there is a problem returning the data.
Check tagchimp.com to verify chapter information"

It properly tags the file and renames the file just not sure why the error messages appears.

2. When I would run any automator script using 1.0.6 I would get the spinning gear icon in the status bar that no longer appears.

3. When I use the Add TV tags (Date Aired or DVD) for a series of .m4v files all properly named it will find the majority of the files but sometimes it says it can not find an episode which was named the same way as every other file. The fix is usually take the file name of a file that works copy and paste it over the old file name and just change the episode number.

4. I receive "Covert art failed" do you know why this happens and is their a fix for it .

Thanks in advance

1. You can edit the workflow to not add chapters, they dont work for all of them, but do on some.

2. This was addressed earlier. Seems they removed that feature in lion.

3. I, too, have had this issue. I was tagging True Blood. I waited about a day, tried again, and it worked. Honestly dont know whats going on.

4. All the time or just some? I have rarely had it happen lately, but I did sometimes, generally not a lot you can do with it, it fails some quality check I think.

----------

I'm having some trouble encoding mkv files that haven't been created with the Batch Rip action. I think it might be connected with the default audio language setting. Could this be correct?

Also, if I have a mix of SD (from DVD rips) and HD mkv files in my Batch Rip Movies folder, what settings should I choose in the Batch Encode action? Can I select for both SD and HD encoding?

Final question is with regard to color labels of files. Can you give us a list of what the different color labels of files in the Batch Rip and Batch Encode folders mean? I know that green labels mean that the files have been processed correctly, but I'm also getting orange-labelled encoded files in the Batch Encode folder, and grey-labelled source folders in the Batch Rip folder.

Many thanks for your help mac.jedi.

Your first problem: copy/paste what your terminal spits out doing the batch encode.

Second: not sure, mac.jedi will have to speak to that.

Third. I second that, Id love to know the list.
 
Closed Captioning

These scripts have been a great aid in automating my DVD ripping process for use on my Apple devices (iPad 2, Apple TV 2, and iPhone 4).

One feature I have been trying to figure out how to add (with little success because of my limited scripting knowledge) is the ability to include closed captioning as soft-subs in the encodes.

The majority of my rips are TV series I have on DVD and all include closed captions. Being able to auto-select the CC track and encode it would be of huge benefit to me (due to often watching these in noisy environments on the go).

Being closed captions, they require no conversions. I just need to be able to have it auto-select the correct track in the Batch Encode script.

Any advice on this would be greatly appreciated.
 
Final question is with regard to color labels of files. Can you give us a list of what the different color labels of files in the Batch Rip and Batch Encode folders mean? I know that green labels mean that the files have been processed correctly, but I'm also getting orange-labelled encoded files in the Batch Encode folder, and grey-labelled source folders in the Batch Rip folder.

Many thanks for your help mac.jedi.

Files
Orange - labeled file means it failed during tagging process.
Red - Means File integerity failed(rarely see this)
Green - Movie encoded and tagged correctly(doesn't mean all tagged info is correct or complete)

Folders
Grey - movie encode process done?

I cant remember them all. I have Hazel handle all that, so i dont even pay attention to them anymore. LOL

I have Hazel move all movie files that are orange to a Hold Folder, becuase those movies need my attention beforeing addign to iTunes. Once I am done fixing/tagging, then I change color label and Hazel once again moves files and adds to iTunes.

Believe if your not using Hazel, you're only using half the potential of all these scripts. Put in DVD select movie name, and lit it do it's thing.. I do nothing after selecting movie name, except fix the ones that have an error. To include moving them to my NAS for storage, changing color labels. I change mine to blue after adding, so that Hazel even copies them to a drive for my cloud based solution so I can can access them anywhere I want them.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.