Users online right now: 78 - LoginLanguage: en, more , translate 

Automation Tools v4.0.2

Warning: This module is not verified yet and thus it is not recommended to use it. Do not trust it until it is reviewed. That can take several days or even months, so please be patient.
Automation Tools v4.0.2
Uploaded by ninoid
File size: 220 KB

multimedia  network  console
download
add to build
activate

Automation Tools for Linux of (c)Drazen Mravinac, Croatia - GPL 2010/2011
=========================================================================

Version 4.0.2
Date: 01.09.2011.

This tools is for any Linux powered machine and is Global Public Licence.
Use for any. It is command line tools for automate internet download, encode video and audio
content, write CD/DVD, check web pages and files changes and other usefull works.

-- Added 'eu' for programming functionality (Euphoria programming utility for advanced user).
-- Added 'ffmpeg-screencast', patched version of ffmpeg command line utility, for audio encoding and capture computer
screen video.
-- Added 'normalize' for audio volume normalization.
-- Program 'encoder' completly rewrited. Some options removed.
-- Added program for easy and fast CD/DVD burning from command line (beta test).
-- Program 'rsdl' completly rewrited and changed.
-- Some bugs fixed and added patched 'ctorrent' for experimental functionality (not yet workable).
-- Some bugs fixed and 'rsdl' can now be used for torrent download.
-- Program 'rsutil' removed from tools. Debuged 'rsdl'.
-- Video cut added to 'encoder'.
-- New abilities for 'cdrw'.
-- New code for 'encoder' and 'cdrw' and abilities for 'rsdl'.
-- Added 'webcheck' utility.
-- Some bugs corrected.
-- Added initialisation system configuration to 'cdrw'
-- New abilities for 'rsdl' and 'encoder'
-- Added disk backup functionality to 'cdrw'
-- All programs rebuilded with executable stub 'backendu' (small programs size).
-- 'ctorrent' and 'ffmpeg-screencast' removed from package
-- New 'encoder' options.


RSDL
----
Rapidshare/YouTube Download Automation Tool v2.5 (konsole)

Create file 'rsdl.lst' in download destination folder and run 'rsdl' in this folder from shell
konsole and download, extract/hjsplit and encode any files from Rapidshare file server.
Currently work from Free User Account without Captcha.

From version 1.6 added YouTube direct download ability.
From version 2.0 not use Python script 'youtube-dl' because use 'netcat' and internal download script.

Example of 'rsdl.lst' file:

# This is a comment
: c
: m=2
: r=100
: rsp=2
http://rapidshare.com/files/369164389/Pustolovine.jednog.zeca-gogi.part1.rar
http://rapidshare.com/files/369180902/Pustolovine.jednog.zeca-gogi.part2.rar
http://rapidshare.com/files/369196488/Pustolovine.jednog.zeca-gogi.part3.rar
http://rapidshare.com/files/369212166/Pustolovine.jednog.zeca-gogi.part4.rar
http://rapidshare.com/files/369228667/Pustolovine.jednog.zeca-gogi.part5.rar
http://rapidshare.com/files/369244731/Pustolovine.jednog.zeca-gogi.part6.rar
x
! encode 5
: This is some message for user
http://www.youtube.com/watch?v=WUhASVdYIXY Audicija - Djuro
!

First, download file with six part and second, after all parts is downloaded, extract RAR archive and
encode with 'encoder' profile 5.
Internal command 'x' extract parted RAR archive (xxxx.part1.rar), typical Rapidshare archive.
Can add password (x password) if needed. For extract, use better and faster '7z' program.
Next, download YouTube video file "Audicija - Djuro.flv".
And last, abort next execution (not needed on end of list).
This program skip already downloaded file. Require 'wget' (and 'curl') for work.
Create empty file 'off' in folder with list file and program will be automaticly power off
computer after last download.

Command line options:
rsdl [-c] [-m] [number]

-c -- use 'curl' utility for Rapidshare download, instead of 'wget'.
Same as ": c" in RSDL.LST file.
-m -- if all Rapidshare mirrors fails, wait 2 minutes and try again, instead of abort.
Same as ": m=minutes" in RSDL.LST file (example, ": m=5" for wait 5 minutes and try again.
number -- limit download to define rate in kbit/s (example, 100 for 100 kbit/s).
Same as ": r=number" in RSDL.LST file (example, ": 100" for 100 kbit/s).

: p=number -- define download protocol. Default is 1 (Rapidshare r1).
From version 2.5 can use and protocol 2 (Rapidshare r2). If some protocol not work,
try different for same download server or another protocol for different download
server. This command can be used from RSDL.LST file.

Next you can place all downloaded FLV file to 'encoder' input folder and convert it to any other
video format. New FLV format can be encoded only with new version of Ffmpeg v0.6 .

Internal command 'x' try to extract all archives in current directory. Because this, do not place
this command after block of downloaded files and, after extracting, break program (with CTRL+C) and
remove this block from RSDL.LST file.
Program aborting keystrokes (CTRL+C) can be used anytime, but better after one file download complet.

From version 2.0, 'rsdl' can be used for download torrent via patched version of 'ctorrent' utility.
In future maybe 'rtorrent' be used because is better.
Currently, you must create directory and place ONLY ONE torrent file and special RSDL.LST file on it.
This lst file must have only next line:

:T 23321 150 15 "-AZ4404" "Azureus 4.4.0.4"

23321 --> forwarded router torrent port (default is 6881 but this maybe not work)
150 --> download limit in kbit/s
15 --> upload limit in kbit/s
Next is for compatibility reason (some torrent sites not work with ctorrent).
now, run 'rsdl' from it directory in separated console window. If not some errors, 'ctorrent' start to
download torrent files with internal directory structures in this folder (must have enought space).
For ctorrent download and help, see http://www.rahul.net/dholmes/ctorrent/userguide.html .
For download more that one torrents, run same action in separated directory and konsole.

NOTE ! For break download before end (can be continue latter normaly), use 'q' key. If you close
konsole before use quit key, ctorrent continue work in background and can be stoped only with kill
process or system restart.

From version 2.4, 'rsdl' can be used for programming download. In 'rsdl.lst' use command:

:P programming download item

Programming items can be defined anywhere in 'rsdl.lst' file and will be executed before
other downloads in order from first to last.

Programming download items that supported in 'rsdl':

dwn_link web_page
-- Download temporary web page for find link. This is usefull for download from megaupload and
similarly page.

find_link link_shift end_char prefix
-- Find prefix in temporary file downloaded with dwn_link and save link starting from
link_shift position of prefix to first space character. Can use any character in prefix.
Link word tipicaly end with character 32 (ASCII code of space) or 34 (quote), but can be
defined and any other (maybe 63 for ?).

sleep seconds
-- Sleep before continue. Some pages require waiting before download

dwn_found must filename
-- Download link saved with find_link as file. Use 'wget' for download and erase saved link
after download. Canot use space in filename. If must=1 and link not found (with find_link),
program abort with error.

del_link
-- Delete temporary web page downloaded with dwn_link

dwn web_page filename
-- Direct download web page, or any from web to filename. Canot use space in filename.


ENCODER
-------
Audio/Video Mencoder/Ffmpeg Encoder Automation Tool v2.4 (konsole)

This program use 'mencoder' or 'ffmpeg' command line A/V encoders for encode audio or
video files.
Create file 'encoder.ini' in /usr/share/dmtool/ or in current working folder and
run encoder from konsole for encode all files from input folder to output folder.

Example of 'encoder.ini' file:

/mnt/sda7/capture/in/ -- input files folder
/mnt/sda7/video/temp/ -- output files folder
:DivX 352x288/25Hz + MP3 128/44100Hz (quality 5) -- name of encoding profile
mencoder "$1" -font "/usr/share/fonts/TTF/DejaVuSans.ttf" -sws 9 -vf scale=352:288,harddup -ofps 25 \
-oac mp3lame -srate 44100 -af lavcresample=44100 -af volume=3:0 -lameopts cbr:br=128:mode=0 \
-noskip -ovc lavc -lavcopts vcodec=mpeg4:vqscale=5:mbd=2:autoaspect:trell:v4mv:turbo \
-ffourcc DIVX -o "$2.avi" -- command line options (this three line must be in one)
-sub "$3" -subcp cp1250 -subfont-autoscale 1 -subpos 88 -- subtitle addition command line options
:DivX 512x410/25Hz + MP3 192/48000Hz (quality 5)
mencoder "$1" -font "/usr/share/fonts/TTF/DejaVuSans.ttf" -sws 9 -vf scale=512:410,harddup -ofps 25 \
-oac mp3lame -srate 48000 -af lavcresample=48000 -af volume=3:0 -lameopts cbr:br=192:mode=0 \
-noskip -ovc lavc -lavcopts vcodec=mpeg4:vqscale=5:mbd=2:autoaspect:trell:v4mv:turbo \
-ffourcc DIVX -o "$2.avi"
-sub "$3" -subcp cp1250 -subfont-autoscale 1 -subpos 88

If profile not have subtitle option, leave empty line or any one character.
Input and output folder must be in format "/folder/subfolder/". for simplicity, create
"/root/encoder/in/" and "/root/encoder/out/" folders.

Variables is:
$0 - 'encoder' binary file folder (/usr/bin/)
$1 - input file
$2 - output file
$3 - subtitle file (must be same name as input, but with extension .SRT). Only SRT support.
$4, $5, ... - additional command line options

Create empty file 'off' in input folder and program will be automaticly power off
computer after last encoding.

This distribution include and default INI file. If you add some data in INI file, before install
new version of Automation Tools, backup your INI file and copy added data to new installed INI file.
By default, INI file is located in "/usr/share/encoder" (enable hidden files view if you not can view
this folder from Linux GUI).
And, distribution include computer screen activity saving to video. Reolution of this video must be
same as resolution of your computer system.

From version 1.7 program is completly rewrited. User choice from program is removed (must define
profile from command line) and added some extra features.

Some INI profiles explanation:

My default encoding profiles is based for AVI-DivX format. Base profiles is from 1 to 7. First
five is with variabile bitrate and next tree is with fixed, but all is one pass encoding.
Currently, most computers (my included) not have enought processor power for HD multipass
encoding in acceptable duration time. And, AVI-DivX format not have enought quality for HD.
Much fastest profile is 5 (VHS quality for TV series and Cartoons). Profile 6 is enought for
TV films, action series and Cinema Cartoons. Profile 7 is enought for Home Camera and films for
see on Home TV.
For use subtitle (text based SRT), change 'mencoder' option '-subcp' in profile with propertly
keyboard map code. Currently is Central Europe, code 1250 (Croatian).
Next profiles is for fixation (audio volume, synchronisation, ...) and audio MP3 encoding (pure
audio use 'lame' for best compatibility and speed).
Some profiles is for create YouTube compatibility FLV, capture computer screen (must define you current
screen resolution) and use 'ffmpeg' encoding utility.
Currently, encoder profiles is created for reencode files downloaded from Rapidshare and Torrent in mind
(paste subtitle, fix errors). Can be used and for encode DVD to AVI, but in more that one step.

Command line options:

encoder profile_number [option_$4] [option_$5] ...
-- use this profile order number instead prompt for this. In this mode can define unlimited
additional options that can be used with profiles that support it. If profile not have
additional options in definition and encoding executable is 'mencoder' can define
audio volume as additional option.
encoder 2 -- use second profile from 'encode.ini'
encoder 6 3 128 -- use 6. profile and define volume size to 3 and 128 kbit/s bitrate
encoder 4 10 -- use 4. profile that not have additional options and increase volume to 10.

encoder ini editor
-- edit initialisation data.
For Slax Linux, use 'kwrite' editor (can be 'vim' in some other Linux distributions).

encoder ini bak|res
-- backup (bak) or restore (res) initlialisation data.
Use this for experiment with profiles.

encoder split size [1]
-- splits all files (HjSplit compatible) from input folder to parts with defined size (use 'k' or 'M') any.
If add '1' to command line, first part will be 001, instead of 000.
encoder split 512k
-- create files My_file.rar.000, My_file.rar.001, ...
Any part (except last) have 512 Kb in size.

encoder resplit [1]
-- connect HjSplited file from input folder with same name to one file in output folder.
If add '1' to command line, first part will be 001, instead of 000.
encoder resplit -- connect My_file.rar.000, ...

encoder connect file_path
-- concatenate all video files from input folder to defined output file in output folder.
Created for AVI format, but maybe work and for other A/V formats.
Use for create one video file from more of one video files. All must be with same
preferences (resolution, fps, bit-rate, codecs, ...)
Require 'mencoder' command line utility.
encoder connect "My File.avi"

encoder unrar [password]
-- unrar all parted RAR files in current folder.
Recongnize parted RAR files (part1.rar, ...). Require '7z' command line utility.
Usefull for unrar files downloaded from Rapidshare server.
Unlike other commands, this not use standard 'encoder' input folder.

encoder uniso file
-- extract ISO image file.

encoder normal [file_path]
-- normalize audio volume of all MP3 files in defined or current directory and all
subdirectoryes to -12dB. Usefull for equalize volume of large number of audio files
in one process.

encoder cut start_time end_time
-- extract part of video file from input folder to output folder.
Time must be in format hh:mm:ss or 0 if not used.
encoder cut 00:05:00 0 -- skip first 5 minutes of video
encoder cut 0 01:00:00 -- use first hour of video
encoder cut 00:00:52 00:17:52 -- use 17 minutes of video

encoder rip options
-- DVD ripping. Require 'mencoder' and 'mplayer' utilityes.
Options:
-p=profile -- direct encode DVD to other format using encoder profile.
Only 'mencoder' profiles with subtitle definition can be defined.
-t=number -- DVD title (default is 1)
-a=number|lang -- DVD audio position or language (default is first avail, 128 or en)
In direct encode mode only number can be defined.
-s=number|lang|file -- DVD subtitle position or language (default not use). First is 0.
In direct encode mode, number or external SRT file can be defined.
-f=pathname -- file for create, without extension (default is output)
If use encoder default folders, can define only file name (without extension).
-d=device|path -- define DVD device or path with DVD files
-d -- define encoder default folders as input7output directoryes. Name defined with
'-f=' option will be used as file name only. Must be last defined option.
-i -- see information about DVD and stream video.
Example: encoder rip -i
See DVD from default DVD device streams data (titles, angles, audios, subtitles, ...).
Use this before any other riping command.
Example: encoder rip -d=/mnt/sda2/dvd/VIDEO_TS/ -t=2 -a=de -s=hr -f=/mnt/sda2/dvd/myfilm
Rip DVD with files in '/mnt/sda2/dvd/VIDEO_TS/' directory. Use title 2 (VTS_02_0.IFO),
German audio language and Croatian subtitle. Files 'myfilm.mpg', 'myfilm.idx' and
'myfilm.sub' in directory /mnt/sda2/dvd/ will be created.
Ripped subtitle is in picture format and cannot be used for mencoder based subtitle
for later encode. This format must be converted to text based (SRT) subtitle.
Example: encoder rip -p=6 -a=129 -s=2 -f=/mnt/sda2/dvd/myfilm
Use encoder profile 6 and encode first title (second AC3 audio and second subtitle)
from default DVD device.
Example: encoder -p=4 -s=0 -f="My DVD" -d
Direct encoder DVD files in default encoder input folder, using first title, audio and
subtitle to default encoder output folder and file name 'My DVD'. Encoding profile is 4.
Extension of created file is defined in profile.

encoder img options
-- Image file(s) operations. Require 'convert' utility that is part of ImageMagicks packages
(http://www.imagemagick.org/script/index.php). Use for convert or perform image operations
of all image files (jpg, png, bmp, ...) from input folder and create files to output folder.
Options is standard image operators of 'convert' utility. After install ImageMagicks, type
'man convert' for see options or see web page for help.
Example: encoder img -geometry 800x600 -gamma 1.5
-- resize images to 800x600 pixels and increase gamma.

encoder checkutil
-- Check system for encoder required utilities installation. If some of utility not installed,
command that require this utility cannot be used.


CDRW
----
Command line CD/DVD burning and disk backup tool for Linux v2.0 (konzole)

Program require standard Linux command line burning tools (growisofs, mkisofs,
cdrecord and readcd) and 7z for backup functionality.

cdrw cfg [data_folder iso_image close_disk delete_temp cd_speed dvd_speed burn_device \
burnproof volume_name always_iso]
-- Define, or view if use without any parameter, default data. All options required.
Disk backup functionality cannot be configured from this command.
data_folder - folder with data for burn (/root/cdrw/data/)
iso_image - temporary ISO image pathname (/root/cdrw/image.iso)
close_disk - close disk after writing (1)
delete_temp - delete temporary ISO image after writing (1)
cd_speed - CD writing speed (48)
dvd_speed - DVD writing speed (8)
burn_device - burning device (/dev/dvd). See 'scan' command.
burnproof - use BurnProoof feauthure, if device support it (1)
volume_name - default CD/DVD volume name (CDRW)
always_iso - always use temporary ISO image creation (0)

cdrw ini editor
-- Edit initialisation file. User can define configuration from command line, with 'cfg'
option, or trought initialisation file. This is better because can change only one
configuration option and can change backup functionality options.
cdrw ini kwrite -- edit INI file with 'kwrite' editor

cdrw scan
-- Scan system for burning devices. Default burning device if system have one DVD device
is '/dev/dvd'. For burning with multiple burning device in same time, open more of one
konsole windows and, with '-d' option define different burning device in any konsole.

cdrw img [-i:iso_image] [-c] [-v:volume_name] [-b:boot_image:boot_catalog]
-- Create ISO image file. If defined '-c' option, use existing disk from device and create
image. By default, create image of data from default data folder. With '-v' option
can define volume name different of default. If '-i' option not specifed, create
default ISO image.
-b:boot_image:boot_catalog -- create Bootable ISO image.
This option is prefered for create Linux Boot CD/DVD. Require boot image file
(isolinux.bin) and boot catalog file (isolinux.boot).

cdrw cd [-c] [-n:num_copy] [-i:iso_image] [-v:volume_name] [-d:dev] [-b:boot_image:boot_catalog]
-- Burn CD disk. By default, create temporary ISO image of data and burn one CD disk.
-c -- copy existing CD disk via ISO image.
-n:num_copy -- number of copyes (1)
-i:iso_image -- if defined ISO image exist, use this image for burn (not data).
If ISO image not exist, create this (not temporary) and not
delete it after writing.
-v:volume_name -- volume name
-d:dev -- overide default burning device (use for multi-device burning)
-b:boot_image:boot_catalog -- create Bootable CD disk.

cdrw dvd [-c] [-n:num_copy] [-i:iso_image] [-v:volume_name] [-v] [-d:dev] [-b:boot_image:boot_catalog]
-- Burn DVD disk. By default, burn data on DVD disk (without temporary image).
-c -- copy existing CD disk via ISO image.
-n:num_copy -- number of copyes (1)
-i:iso_image -- use this image for burn (not data).
-v:volume_name -- volume name
-v -- create DVD-Video disk
-d:dev -- overide default burning device (use for multi-device burning)
-b:boot_image:boot_catalog -- create Bootable DVD disk.

cdrw multi cd|dvd|dvdiso [-d:dev]
-- Burn multiple CD/DVD. It is usefull for serialize burning process.
cd -- any ISO file from data folder is one CD disk
dvd -- any directory from data folder is one DVD disk and its name is volume name
dvdiso -- any ISO file from data folder is one DVD disk
-d:dev -- overide default burning device (use for multi-device burning)

cdrw bak archive drive|folder
-- Backup folder (with all subfolders) or whole drive to archive.
Backup method option in initialisation file define backup process:
0 = simple backup files and folders without permissions and settings.
Use this for backup folders or non-system drive. It is fastest.
1 = Windows system drive backup (C:). In this method Windows pagefile will be
deleted and Windows file attributes will be stored.
2 = Linux system drive backup. In this method all files permissions will be stored.
If use strong compression, backup process can be very slow on whole drive backup.
cdrw bak cdrive /mnt/sda1 -- backup whole sda1 drive to archive name cdrive.dmb
cdrw bak "My Documents" "/mnt/sda1/My Documents" -- backup Windows documets folder

cdrw res archive drive|folder
-- Restore folder or whole drive from archive. Program recognize backup method.


WEBCHECK
--------

webcheck v0.7 - Check that web pages or files changed and periodicaly download.
(c)Drazen - Mravinac - Croatia, GPL - 2010.

WebCheck is konsole utility for Linux. Use it for periodicaly check that web page or local disk file
is changed, and if yes, send e-mail about this. And, can be used for periodicaly download some
web page to local disk and rename it about current date and time.

Create 'webcheck.ini' file and place it some commands (see comments in example webcheck.ini file for
commands details):

addpage=margin id_name web_page|local_file
Add web page or local file for check changes of last check time. If size is changed more that
defined change margine (new size is less that margin/2 or greather that margin/2), mail with
indentification name will be send.

addmail=mail_address
Add new e-mail address. If web page or file is changed, mail about this will be sended to all
mail addresses.

period=minutes
Check change period in minutes.

mailserver=server
Standard SMTP send mail server.

serveruser=user
If server require autentification, define username.

serverpass=pass
If server require autentification, define password.

sender=mail_address
Mail sender address. If server require, must be existed mail address.

subject=Some subject words
Mail subject.

body=Body prefix words
Mail body prefix. Body of message will be: Body prefix 'id_name'.

start=0|1
Not send|send mail on webcheck activation. Use for check mail server.

addtime=time_format period_sec web_page local_path
Add new web page for periodicaly download. Program 'webcheck' any period_sec seconds download
web page 'web_page' and save this to local_path (cannot include space in name) in name
'DD.MM.YYYY - hh.mm.ss.extension' (time_format=1) or 'YYYY.MM.DD - hh.mm.ss.extension'
(time_format=2). This is very usefull for periodicaly download some web surveillance
camera picture.

This module requires:
Slax Core 6.1.2
Slax Xorg 6.1.2

 


list detailed dependencies of this module
browse all modules from this author


Slax is generously supported by: P&P Software GmbH and wisol technologie GmbH