# READ ME READ ME # RE ADME RE ADME # R EADME R E A D - M E R EADME # README README # README README # READM E READM E # # ========================================= # Yet Another Set of MEncoder Scripts # ========================================= # YAMS Copyright (C) 2006,2007,2008,2009 # V. Spinelli for SpinelliCreations.com # This program comes with ABSOLUTELY NO WARRANTY # This is free software, released under GNU GPL, # and you are welcome to redistribute it. # ========================================= # Author: V. Spinelli # Handle: PoweredByDodge # Email: Vince@SpinelliCreations.com # WEBSITE: http://SpinelliCreations.com # http://sourceforge.net/projects/yamsproject/ http://download.spinellicreations.com/yams # ---------------------------------------------------------- # NOTE # # This is Linux friendly only; that is to say that while # a Windows version of Mencoder does exist, this script # does not jive with it 'out of the box'. # ---------------------------------------------------------- # INITIAL SETUP # # The following is required for this script package to work: # 1- Mplayer (for mencoder) http://mplayer.hq # 2- Lame MP3 Encoder http://lame.sourceforge.net # 3- FFdshow codec pack (for lavc) (should come with Mplayer/Mencoder # , but might not) # 4- A dvd-reader optical drive. # 5- About 1 GB of hard drive space available per hour of video # that you wish to rip/encode. (will increase if you change # the default settings). # 6- OPTIONS !!! MUST !!! BE SET! # - most importantly, the default directory where you would # like to output finished video files must be set in the # field "OUTPUTDIR", and the directory !! MUST !! exist, # and be writable! # - also, if you have installed Mplayer/Mencoder to an # execution directory other than /usr/bin/mencoder, than # you !! MUST !! update this field to the correct PATH. # 7- A minimum of roughly 800 MHz CPU in order # to rip video at an even remotely acceptable # speed (15 frames per second). # # # !! NOTE !! -- 1 / 2 / 3 above, and other 'things to make life easy' # may have been distributed with this package. # Often, older (possibly more stable or 'tried and true' # versions will be included with the download rather # than the 'latest and greatest'. But, please, remember # that if you have a newer version of something installed, # such as FFdshow's latest subversion snapshot, that your # newer copy should work just as well if not better than # the older copy included with this download. There is no # need to uninstall/reinstall different versions. # ---------------------------------------------------------- # EXECUTABLES # # You should place the entire yams package in a directory # where you have easy command line access... such as, # # /opt/yams/ # # It is suggested you change permissions of this directory # to '777' and make your life easy. # ---------------------------------------------------------- # CONFIGURATION # # You MUST edit (using a text editor such as VI, Gedit, # Emacs, or other) 'options.sh' before using this script. # # DO NOT edit any other files without a clear understanding # of their operation. # ---------------------------------------------------------- # EDITING options.sh # # Below are all of the fields that you will find in # the file options.sh, and an explanation of how to # edit them. Also, some explanation of 'why, and what' # is included. ## PATH MENCODER # MENCODERPATH=/usr/local/bin/ # This is the path that you must use to get to # mencoder. # If you do not know your path, simply go to # a terminal window and start guessing. # Type [abc@123]$ /usr/bin/mencoder # ... if nothing comes up, that's not it. # Then try [abc@123]$ /usr/sbin/mencoder # ... no luck? # Try [abc@123]$ /usr/local/bin/mencoder # # Or you can always use locate... # [abc@123]$ locate mencoder # # The default for most installations of MPlayer # (which includes MEncoder) should be # /usr/local/bin/ , and that is why it is our # default choice. # # If you still have no luck, pull up the # documentation for both your distribution of # Linux and your distribution of MPlayer/Encoder. ## PERMANENT FINAL LOCATION FOR OUTPUT FILES # - Could be on a local home server # - Could be another physical drive on the same machine # OUTPUTDIR=/home/mediacenter/record/other/ # This is where you want your files to end up once # they are finished recording. # # Change permissions of this directory to '777' !! ## REGION # VIDEOQ=1789 OR 1500 # Choose your region (PAL or NTSC), this is the format # of what your video has been recorded at. # You may choose to use a higher frame rate than that # of the original recording (for example, 2200 for an # NTSC recording). While video quality will not increase, # you will then be assured of zero dropped frames, although # file size will dramatically increase and you may encounter # issues if ever trying to convert the file back to a dvd # compatible file. ## AVI FILE TYPE # FCCTYPE=FMP4 OR DX50 # Choose how you want to identify your MPEG4 Audio Video # stream. LibavCodec's FMP4 is a 'Divx Compatible' stream # but if you are going to be watching this on a Windows # system and don't want to install the LibavCodec pack # through FFMPEG, then Winamp or Windows Media Player # won't pick up the FMP4 header properly... so you # can 'trick' it by using a DX50 header. The actual # stream is still the same though. However, we # reccomend that you leave it as FMP4 for playing # on all Mac and Linux systems, and then simply # take 2 minutes and install the FFMPEG pack which # contains LibavCodec onto any Windows computer. ## AUDIO QUALITY # AUDIOQ=320 # This is the bitate of the mp3 audio track that you # are going to associate with your video. # You may rip the audio at 96, 128, 160, 256, or 320 # kB per second. The minimum for acceptable audio # is 128, although 320 is highly recommended, as file # size is barely affected. ## VIEWING SCALE # TVSCALE=720 # TARGET VIEWING SCALE (based upon original format) # ... viewing hd 1080 on standard 720 --> 1080 # ... viewing hd 1080 on hd 1080 --> 1080 # ... viewing standard 720 on standard 720 --> 720 # ... viewing standard 720 on hd 1080 --> 720 # ---------------------------------------------------------- # EDITING options_core.sh # Super-Duper hard-core junkies may want to edit the # core options of Yams... to do so, simply edit as follows... ## VIDEOFILTER # pp=de # postprocessing type = deinterlace # scale=${TVSCALE}:-2 # scale = resolution defined in # # options.sh, and trimmmed # # a shade. ## CODECOPTS # mpeg4 # output type = mpeg4 (divx style # # lavc avi) # vhq # tells mencoder to use 'very high # # quality' # v4mv # allows smaller motion partitions # # in video, may yield # # slightly larger # # filesize. # vqmin=2 # minimum quantizer level # ---------------------------------------------------------- # PROCESSING # CPU Threads allows you to modify the performance of the mencoder # backend in order to tweak it for your specific processor. # It's pretty simple. Single processor machines, select '1'. # Hyperthreaded single core or non-HT dual core, select 2. Non-HT # Dual Core through HT-Dual Core, select 2 to 4... etc etc etc... # To give you an idea, on a AMD Athlon X2 6000+ (3 GHz Dual Core), # we'll run 2 to 4 threads... 4 is a tiny tiny tiny bit quicker, but # 2 yields slightly more consistent results when running multiple # instances. # ---CPU THREADS--- # ----------- # ---single core cpu 1 # ----------- # ---single core cpu w/HT 2 # ----------- # ---dual core cpu 2 to 4 # ----------- # ---dual core cpu w/HT 4 to 8 # ----------------- #THREADSQ=1 THREADSQ=2 #THREADSQ=4 #THREADSQ=8 # ---------------------------------------------------------- # USING yams.sh(finally~) ## RIPPING DVD or VCD MOVIE # Call as... # ./yams.sh MOVIE [NAME] [DRIVE] [CROP] [TRACK] [AUDIOTRACK] # Example... # ./yams.sh MOVIE myhomemovie hdc 720:405:00:00 1 129 ## TRANSCODING VIDEO FILE # Call as... # ./yams.sh FILE [NAME] [FILE FULL PATH LOCATION] [CROP] # Example... # ./yams.sh FILE mytranscodedmovie /home/USER/myoriginalmovie.avi 720:405:00:00 # Upon completion, a file will be output # # with the name 'myhomemovie.avi', and it # # will be the first track off of /dev/hdc. # # It will be cropped to 720 x 405 (16 x 9 # # anamorphic in this case), and placed # # in your output directory. ## BATCH RIPPING of DVD or VCD MOVIES # Open up yams_batch.sh with your favorite text editor or ViM. # - Then simply edit the lines so that you can rip multiple # dvd titles at once. # - Set it, forget it, walk away and come back 10 hours later # to find all your videos done! # Save the file, then... # Call as... # ./yams.sh BATCH # yams_batch.sh is simply a 'batch' run of yams.sh with # # predefined options, such that you can run 3 or 4 dvd's in a row # # (provided you have 3 or 4 dvd reader drives installed), and # # leave your machine unattended while the ripping occurs. # # # yams_batch.sh has been pre-loaded with the settings for # # various discs -- purely as an example. ## MERGING (and TRANSCODING) VIDEO FILES # Call as... # ./yams.sh MERGE [NAME OF OUTPUT VIDEO] [1st Device or Input Filename with # Extension to be Added] [2nd Device or Input Filename...] [3rd] [4th] # [etc...] # Example... # ./yams.sh MERGE mymergedmovie /home/USER/video_01.avi /home/USER/video_02.avi /home/USER/video_03.avi /home/USER/video_04.avi # The program will then ask you whether you want to just MERGE the files (type # '1' and hit enter) or if you want to MERGE AND RECODE the files (type '2' # and hit enter). # If you merge the files, then the process will merge them, tell you # where the new single file is located, and exit. # If you merge and recode, then the process will merge them, and give # you the option to select a CROP RANGE (to be entered at XX:YY:xx:yy). # If you don't want to crop the recoded video, then just hit enter (leaving # the field blank). When merge + recode is done, you will be notified of # the location of the new single recoded file, and the program will exit. # NOTE -- MENC MERGE WILL NOT INTENTIONALLY DELETE ANY OF YOUR ORIGINAL FILES! ## FOLDER (SIMILAR TO BATCH, BUT NOT) # this instance allows you to run yams 'FILE' command on ALL THE FILES # IN A PARTICULAR FOLDER! Yes, this is yams_batch.sh on steroids. # Let's say you have 10 movies you need to transcode, and you are going # to place all of those files (must be avi format, or at least rename # them as .avi even if they're not, just to make it work) into a folder # called "/mnt/temp/my_temp_movies/" # # ok, now, you can run yams 'FILE' on all of these, and have them # exported to your yams output directory by using the following # command... # # ./yams.sh FOLDER /mnt/temp/my_temp/movies # # so, we see, the call is actually... # # ./yams.sh FOLDER [path-to-your-temp-files-without-the-trailing-slash] # ----------------------------------------------------------