├── README.md ├── bin └── vhs.sh ├── configure ├── configure.yassi ├── docs ├── ChangeLog ├── INSTALL.md ├── LICENSE ├── README.md └── vhs.1 ├── files ├── build-rpm-vhs.sh ├── vhs-desc ├── vhs.spec └── vhs_compl.bash ├── icons └── hicolor │ ├── 128x128 │ └── apps │ │ ├── vhs-audio.png │ │ ├── vhs-config.png │ │ ├── vhs-guide.png │ │ ├── vhs-help.png │ │ ├── vhs-kill.png │ │ ├── vhs-screen.png │ │ ├── vhs-videos.png │ │ ├── vhs-webcam.png │ │ └── vhs-webradio.png │ ├── 16x16 │ └── apps │ │ ├── vhs-audio.png │ │ ├── vhs-config.png │ │ ├── vhs-guide.png │ │ ├── vhs-help.png │ │ ├── vhs-kill.png │ │ ├── vhs-screen.png │ │ ├── vhs-videos.png │ │ ├── vhs-webcam.png │ │ └── vhs-webradio.png │ ├── 32x32 │ └── apps │ │ ├── vhs-audio.png │ │ ├── vhs-config.png │ │ ├── vhs-guide.png │ │ ├── vhs-help.png │ │ ├── vhs-kill.png │ │ ├── vhs-screen.png │ │ ├── vhs-videos.png │ │ ├── vhs-webcam.png │ │ └── vhs-webradio.png │ └── 64x64 │ └── apps │ ├── vhs-audio.png │ ├── vhs-config.png │ ├── vhs-guide.png │ ├── vhs-help.png │ ├── vhs-kill.png │ ├── vhs-screen.png │ ├── vhs-videos.png │ ├── vhs-webcam.png │ └── vhs-webradio.png ├── links ├── vhs-audio.desktop ├── vhs-config.desktop ├── vhs-guide.desktop ├── vhs-help.desktop ├── vhs-killer.desktop ├── vhs-screen.desktop ├── vhs-video.desktop ├── vhs-webcam.desktop └── vhs-webradio.desktop └── screenshots ├── example-stream-play-history.jpg ├── example-with-2pass-and-join.png └── example-with-progressbar.jpg /README.md: -------------------------------------------------------------------------------- 1 | docs/README.md -------------------------------------------------------------------------------- /configure: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # Yet Another Simple Script Installer 3 | # ------------------------------------------------------------------------ 4 | # Copyright (c) 2015 Simon Arjuna Erat (sea) 5 | # All rights reserved. 6 | # 7 | # This program is free software: you can redistribute it and/or modify it 8 | # under the terms of the GNU General Public License as published 9 | # by the Free Software Foundation, either version 3 of the License, or 10 | # (at your option) any later version. 11 | # 12 | # This program is distributed in the hope that it will be useful, 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | # GNU General Public License for more details. 16 | # 17 | # You should have received a copy of the GNU General Public License 18 | # along with this program. If not, see 19 | # 20 | # 21 | # Created: 2015.02.27 22 | # Transformed: 2015.12.07 23 | # Changed: 2015.12.20 24 | script_name=configure 25 | script_version=1.8.6 26 | # 27 | # Description: 28 | # This script automaticly generates, 29 | # according to passed options, the following files, 30 | # named to go along with GNU Automake terminology. 31 | # * make 32 | # * make-install 33 | # * make-install-all 34 | # * make-uninstall 35 | # * make-check 36 | # * make-clean 37 | # * make-distclean 38 | # * make-doc-{info,html,dvi,pdf,ps} 39 | # * make-check 40 | # * make-installdirs 41 | # * make-mostlyclean 42 | # * make-maintainer-clean 43 | # * Makefile 44 | # 45 | # YASSI aims to be an easy to use 'configure' handler for projects that do not need binary compiling. 46 | # It also aims for portability as it can write a Makefile for the create scripts. 47 | # 48 | # As home- or end-user you will probably only want to read: ./configure --help 49 | # As a developer or packager, you will prefer the details on: ./configure --manpage 50 | # 51 | # To report bugs or suggestions about YASSI (configure), 52 | # * please raise an issue on: https://github.com/sri-arjuna/yassi/issues 53 | # * or send me an email, subject YASSI: erat.simon@gmail.com 54 | # 55 | # ------------------------------------------------------------------------ 56 | # 57 | # Clear data of previous / other runs 58 | # 59 | unset CHROOT DESTDIR 60 | unset ${!APP_*} ${!AUTHOR_*} ${!MAINTAINER_*} ${!MAILLIST_*} BUGTRACKER 61 | unset DOWNLOAD_IF_MISSING DOWNLOAD GIT SVN 62 | unset REQS DEPS DOCS MAKE PRIOR POST UNINSTALL CLEAN DISTCLEAN IGNORE CHECK INSTALLDIRS MOSTLYCLEAN MAINTAINER_CLEAN 63 | unset doMakefile doGNU doTUI doRef 64 | unset ${!DIR_*} 65 | # 66 | # Set command-tools help output to english and bypass alias' 67 | # 68 | export LC_ALL=C 69 | declare AWK=\gawk GREP=\grep LS=\ls SED=\sed WHICH=\which 70 | # 71 | # Prepare cleared arrays and variables 72 | # 73 | # Arrays 74 | declare -A FHS DOCS REQS 75 | declare -a MAKE PRIOR POST UNINSTALL CLEAN IGNORE CHECK INSTALLDIRS 76 | # Variables 77 | declare APP_NAME="APPNAME" APP_VER APP_LIC \ 78 | APP_TITLE APP_PRJ APP_HOMEPAGE \ 79 | APP_DIR="${PREFIX:-/usr/local}" 80 | declare AUTHOR_NAME AUTHOR_EMAIL AUTHOR_HOMEPAGE 81 | declare MAINTAINER_NAME MAINTAINER_EMAIL MAINTAINER_HOMEPAGE 82 | declare BUGTRACKER DOWNLOAD_IF_MISSING DOWNLOAD GIT SVN DEPS 83 | declare CFG="${CFG:-./configure.yassi}" REF MANPAGE="/tmp/yassi.1" 84 | # Bools 85 | declare doMakefile=false doGNU=false doTUI=false doRef=false 86 | declare VERBOSE=false DEBUG=false ## V=1 // V=2 87 | # Basic 'compatiblity' with the 'prepass V=[1|2] toggle' (covers --verbose (V=1) and --debug (V=2)) 88 | [ -n "$V" ] && VERBOSE=true && [ $V -eq 2 ] && DEBUG=true 89 | # 90 | # Message Strings 91 | # 92 | [ -f "$CFG" ] && source "$CFG" 93 | # List supported 'error message' languages here: 94 | YASSI_LANGS=" " 95 | # Parse for any found language, or fallback to 'en_GB' 96 | for lng in $YASSI_LANGS en_GB 97 | do # If lng is not default, check if LANG and lng are the same lang, even if not country. 98 | [ ! $lng = en_GB ] && L="${LANG##\.*}" && { [ "${L/_*}" = "${lng/_*}" ] || continue ; } 99 | case "${lng:-en_GB}" in 100 | en_*) MSG_NO_CODE="Fatal error, could not retrieve project (${APP_NAME^^}) code!" 101 | MSG_NO_CONFIG="Configuration file ($CFG) not found!" 102 | MSG_NO_NAME="Missing APP_NAME..." 103 | MSG_NO_INTERNET="No working internet connection found." 104 | MSG_NO_REQS="Did not find the following required commands:" 105 | MSG_NO_DL_APP="Could not find: curl/wget!" 106 | MSG_CANNOT_EXE_DIR='Cannot execute a directory: $1!' 107 | MSG_MISSING_CMDS="Please provide these commands before configuring $APP_NAME!" 108 | MSG_NO_TEXI="The command 'texi2any' was not found, which is required to create this manual" 109 | MSG_TARBALL_GOOD="Successfully created tarball" 110 | MSG_TARBALL_BAD="There was an error building the tarball" 111 | MSG_REQS_ONE="Please install at least one of these commands:" 112 | MSG_REQS_OPTS="You might like to install one of these too:" 113 | MSG_RERUN_CFG="Please rerun ./configure with your settings." 114 | #MSG_="" 115 | break 116 | ;; 117 | esac 118 | done 119 | # 120 | # Default path list 121 | # 122 | mandirs="mandir $(echo man{1..9}dir)" 123 | list_index="prefix bindir sbindir sysconfdir datarootdir appdir icondir datadir docdir htmldir infodir $mandirs dvidir pdfdir psdir compldir sharedstatedir localstatedir rootdir bootdir efidir grubdir" 124 | list_variables="";for i in $list_index;do list_variables+=" ${i^^}";done 125 | # 126 | # Version & Help 127 | # 128 | show_version() { 129 | # Prints the version of the script 130 | # and exits 131 | cat <<-EO_SCREEN 132 | ./configure, Version $script_version 133 | Copyright (C) 2015 by Simon Arjuna Erat, erat.simon@gmail.com 134 | License GPLv3+: GNU GPL version 3 or later 135 | 136 | This is free software; you are free to change and redistribute it. 137 | There is NO WARRANTY, to the extent permitted by law. 138 | 139 | Report bugs of ./configure to: 140 | Or send an email to: 141 | EO_SCREEN 142 | exit 0 143 | } 144 | show_paragraph() { # NODE "CONTENT" 145 | # Prints a helptext block 146 | # that is usable as manpage 147 | printf "\n%s\n" "${1^^}" ; shift 148 | for a in "${@}";do printf "\t%s\n" "$a";done 149 | } 150 | show_help() { 151 | # Prints the helpscreen 152 | # and exits 153 | [ -n "$APP_LIC" ] && \ 154 | scr_lic="$(show_paragraph license "${APP_LIC}" " ")" || \ 155 | src_lic="" 156 | app_ver="" 157 | [ -n "$APP_VER" ] && \ 158 | app_ver=" (${APP_VER})" || \ 159 | app_ver="" 160 | 161 | cat <<-EO_SCREEN 162 | SYNOPSIS 163 | ./$script_name [options] 164 | 165 | DESCRIPTION 166 | Routine to configure the installation of "${APP_TITLE:-${APP_NAME:-APPNAME}}$app_ver" 167 | $scr_lic 168 | BASIC 169 | -h|--help Shows this screen and exits 170 | --version Shows the version of YASSI (./configure) and exits 171 | --verbose Prints all the action of the make* commands on the screen (V=1 ./configure [opts]) 172 | --debug Like --verbose but also internal action how those files are created (V=2 ./configure [opts]) 173 | 174 | --prefix DIR Sets the prefix to DIR (default: PREFIX=${APP_DIR}) 175 | 176 | DIRECTORIES 177 | --bindir DIR user executeables (\$PREFIX/bin) 178 | --sysconfdir DIR read-only single-machine data (\$PREFIX/etc) 179 | --datadir DIR read-only architecture-independent data (\$DATAROOTDIR/${APP_NAME:-APPNAME}) 180 | --compldir DIR Bash completion (\$DATAROOTDIR/bash-completion/completions) 181 | 182 | --datarootdir DIR read-only arch.-independent data root (\$PREFIX/share) 183 | --localedir DIR locale-dependent data (\$DATAROOTDIR/locale) 184 | --localstatedir DIR modifiable single-machine data (\$PREFIX/var) 185 | --sbindir DIR admin executeables (\$PREFIX/sbin) 186 | --sharedstatedir DIR modifiable architecture-independent (\$PREFIX/com) 187 | 188 | DOCUMENTION 189 | --docdir DIR Project documentation root (\$DATAROOTDIR/doc/${APP_NAME:-APPNAME}) 190 | --infodir DIR Info documentation (\$DATAROOTDIR/info) 191 | 192 | --mandir DIR Basedir for manpages (\$DATAROOTDIR/man) 193 | --man[1-9]dir DIR Specific manpage dirs (\$MANDIR/man/man[1-9]) 194 | 195 | --htmldir DIR Project documentation root (\$DOCDIR) 196 | --dvidir DIR Project documentation root (\$DOCDIR) 197 | --pdfdir DIR Project documentation root (\$DOCDIR) 198 | --psdir DIR Project documentation root (\$DOCDIR) 199 | 200 | GUI 201 | --appdir DIR *.desktop files (\$DATAROOTDIR/applications) 202 | --icondir DIR Icons for the desktop files (\$DATAROOTDIR/icons) 203 | 204 | REDISTRIBUTION 205 | --chroot DIR Sets the CHROOT to DIR (for 'builddirs' or before chrooting into a partition) 206 | --tarball Equivalent of: "./configure [opts] && (./make-tarball || make dist)" 207 | --makefile Writes a dynamic Makefile according to created scripts 208 | 209 | DEVELOPERS 210 | --sample Prints a mini example for a '$CFG' 211 | --sample-full Prints a template with all options of a '$CFG' 212 | --sample-full-clean Prints the same template without comments. 213 | --manpage Prints an advanced help screen for developers and packagers 214 | 215 | NOTES 216 | Common Prefix Locations 217 | Common places that are used as --prefix=DIR: 218 | * / or /usr 219 | * /usr/local or /opt 220 | * \$HOME or \$HOME/usr 221 | * \$HOME/local or \$HOME/.local 222 | 223 | EO_SCREEN 224 | 225 | # Print messages according to passed configuration file 226 | [ -n "$AUTHOR_NAME" ] && echo "The project \"${APP_NAME^^}\" was written by \"$AUTHOR_NAME\" <$AUTHOR_EMAIL> ($AUTHOR_HOMEPAGE)" 227 | [ -n "$APP_HOMEPAGE" ] && echo "To learn more about \"${APP_TITLE:-$APP_NAME}\" visit: <$APP_HOMEPAGE>" 228 | [ -n "$MAINTAINER_NAME" ] && echo "This package of \"${APP_TITLE:-$APP_NAME}\" is maintained by \"$MAINTAINER_NAME\" <$MAINTAINER_EMAIL> ($MAINTAINER_HOMEPAGE)" 229 | [ -n "$MAILLIST_NEWS" ] && echo "To stay informed about \"${APP_NAME^^}\", subscribe to: <$MAILLIST_NEWS>" 230 | [ -n "$MAILLIST_BUGS" ] && echo "To report bugs about \"${APP_NAME^^}\", please send a descriptive email to <$MAILLIST_BUGS>" 231 | [ -n "$BUGTRACKER" ] && echo "If you experience any bugs or errors using \"${APP_NAME^^}\", please raise an issue on <$BUGTRACKER>" 232 | exit 0 233 | } 234 | show_manpage() { # 235 | # Prints the developer manpage 236 | # -> basic text prepared for txt2man where available 237 | cat <<-EO_SCREEN 238 | DESCRIPTION 239 | This manpage shall explain how to write/modify a YASSI configuration file. 240 | 241 | This part of the manual is still in progress and also describes functionality that is still in developement or not yet stable. 242 | 243 | Further it handles the topcis like the full sample from top to down. 244 | 245 | SYNTAX 246 | VARNAME=file Assign this file to be installed to VARNAME 247 | VARNAME=dir1 Assign only content of this dir to be install to VARNAME 248 | VARNAME=./dir2 Assign this dir and all its content to be installed to VARNAME 249 | VARNAME=dir3/[RI]*.md Assign all files starting with capital 'R' and 'I' and ending with '.md' to be installed to VARNAME 250 | VARNAME="file dir ./dir dir2/[RI*.md]" All above syntax can be combined within a list 251 | 252 | TASK_LIST[0]="entry" Depending on the kind of the TASK_LIST[@]: 253 | * Dirs/Files either get executed or removed 254 | * Non found entries either gets removed or printed 'as is' 255 | 256 | Exceptions are: REQS[] and DEPS, please see details below. 257 | 258 | PROJECT INFO 259 | This section explains most of the variables visible to the enduser by looking at --help. 260 | 261 | APP_NAME The unix shortname of the project. 262 | This name is also used for installation path 263 | APP_VER Set the project version, this is also used in/on: 264 | * the --help screen 265 | * the tarball will contain version number 266 | * Can be used to keep $DOWNLOAD up-to-date (see: Advanced: Mini Installer) 267 | APP_LIC Set the license of your project 268 | APP_TITLE Someimtes a title is more that just one word 269 | APP_PRJ Is this project part of another project? What is its name? 270 | APP_HOMEPAGE Where to get the latest information about the project? 271 | APP_DIR Set another default path for ./configure (default /usr/local) 272 | 273 | AUTHOR AND MAINTAINER INFO 274 | {AUTHOR,MAINTAINER}_NAME Name of Author / Maintainer 275 | {AUTHOR,MAINTAINER}_EMAIL Email of Author / Maintainer 276 | {AUTHOR,MAINTAINER}_HOMEPAGE Homepage of Author / Maintainer 277 | 278 | PROJECT CONTACT 279 | MAILLIST_NEWS Newsletter for \$APP_NAME 280 | MAILLIST_BUGS Email to send bugs to 281 | BUGTRACKER Website to report bugs or raise issues 282 | 283 | BOOLEANS 284 | Syntax: doBOOLNAME=true 285 | 286 | There are a few optional bool'ish helpers, by default they are set to false: 287 | 288 | doMakefile It is quite obvious what doMakefile does if it is set to true. 289 | doGNU If not provided by the author of the project, it adds some targets to the Makefile 290 | doRef installs the reference file of the used paths to /etc/appname.conf, 291 | if enabled, the file is also uninstalled automaticly. 292 | If you need to apply the systems absolute paths into your scripts, use the \$REF for your TASK's in your $CFG. 293 | doVer Some projects require to have the version in their path name 'doVer' does that. 294 | doTUI As I wrote YASSI for myself, this doTUI toogle will install the Text User Interface, 295 | framework for scripts before the the actual install. 296 | 297 | REQS 298 | Syntax: REQS[]="list of required commands" 299 | 300 | REQS[app] Your project requires these commands and cannot run without them 301 | REQS[make] This command is required to prepare the/your project files 302 | REQS[opt] This command can improve usablity for your project but is not essential 303 | 304 | Why this destinction? 305 | 306 | In regards of the 'app' it is quite obvious, configure will exit with failure (1) if any of these commands is missing. 307 | 308 | The same behaviour is for 'make', as that should contain a list of commands that are required to 'make' preparations for your projct before it gets installed. 309 | 310 | 'opt' on the other hand will only print a messsage to the user and let him know that it might be cool to install the missing commands of this list. 311 | 312 | 313 | 314 | DIRECTORIES 315 | This is where the actual magic happens... 316 | 317 | Basicly all files and directories assigned to any of the *DIR variables according to above provided SYNTAX, 318 | will get installed to the directory represented by the VARNAME*DIR (eg: BINDIR). 319 | 320 | Please see: ./configure --help for a list of supported dirnames, note that the variables must be in CAPITAL letters. 321 | 322 | DOCS 323 | Is a nice handler to create texi documents. 324 | 325 | Each of the following assignments will create a specific: make-doc- file. 326 | 327 | Supported TYPE's are: info, html, pdf, dvi and ps. 328 | 329 | DOCS[\$TYPE]=docs/texi/\$APP_NAME.texi The created script will create the info document. 330 | 331 | DOCS[info]="docs/texi\$APP_NAME.texi docs/texi/other-node.texi" Also multiple entries are supported. 332 | 333 | There is no need to handly the 'texi2any' requirement, using DOCS[TYPE] will inform the user if it is missing. 334 | Also, it will not allow the user to delete (./make-clean) these docs if 'texi2any' is not available. 335 | 336 | While this only takes care of creating these docs, you still need to place them for the installation: 337 | 338 | INFODIR=docs/tex/*.info 339 | HTMLDIR=docs/tex/*.html 340 | 341 | Upon ./configure, ./make-doc- will be created. 342 | 343 | Upon ./make-doc-, it will check if 'texi2any' is avilable or not. 344 | 345 | Upon ./make-install-all, all available ./make-doc-* are executed before the actual ./make-install script. 346 | 347 | 348 | ADVANCED 349 | REDISTRIBUTION 350 | --chroot=DIR Install \$APP_NAME to DIR/\${PREFIX} 351 | This setting can be overwritten by passing DESTIDR=DIR to make. 352 | --tarball Packages a tarball of the project dir from parent dir 353 | --makefile If a Makefile should be required or desired 354 | 355 | ADVANCED 356 | MINI INSTALLER 357 | These tools are nice if you want to share your application with a very low storage requirement. 358 | 359 | DOWNLOAD_IF_MISSING Only if this DIR or FILE is not found, it triggers the other download preferences. 360 | This DIR or FILE should NOT be created by ./make but exist and be required anyway. 361 | GIT Set the GIT URL to clone from (prefered) 362 | SVN Set the SVN URL to checkout from (2nd) 363 | DOWNLOAD Download this tarball 364 | DOWNLOAD_DIR Only required if the extracted tarball has another dirname than: 365 | * \$APP_NAME 366 | * \$APP_NAME-master 367 | * \$APP_NAME-\$APP_VER 368 | 369 | For GIT and SVN downloads, a directory named "\$APP_NAME.src" will be created. 370 | The TARBALL will be downloaded and exracted and the path checked. 371 | 372 | Afterwards YASSI changes its PWD to the new directory and continue installation. 373 | 374 | ADVANCED 375 | TARBALL 376 | 377 | A tarball is usally not required, unless you create them manual for upstream, now this can be partialy automated! 378 | 379 | TARBALL Set alternate output file (default: ../\$APP_NAME[-\APP_VER].tar.gz) 380 | TARBALL_DIR Set custom output path, but let YASSI decide the filename 381 | IGNORE Ignore these entries when creating the tarball 382 | 383 | A tarball can be created by either: 384 | 385 | ./configure --tarball 386 | ./configure --makefile ; make dist 387 | 388 | ADVANCED 389 | VARIABLES PRESETS 390 | These variables may be placed in front of ./configure and will influence the behavior of YASSI. 391 | 392 | CFG=file This is the same as "./configure --conf file" 393 | DESTDIR This is the same as ./configure --chroot=dir, 394 | but it can also overwrite the previous set CHROOT by 395 | passing "DESTDIR=dir make install" 396 | TARBALL By default the created tarball will reside in the top dir, use this to change the location 397 | 398 | 399 | ADVANCED 400 | CUSTOM DIRECTORIES 401 | You may define and use custom paths, be aware that you probably have to handle them your own. 402 | 403 | To define a new TARGET DIR, use: 404 | 405 | DIR_DEMO='$DATADIR/demo' 406 | 407 | Then to assing the installer to install files there: 408 | 409 | DEMO_DIR=demo/my*files 410 | 411 | NOTE: This is a hardcore example of what could have been: 412 | 413 | DATADIR=./demo 414 | 415 | ADVANCED 416 | TASKS 417 | If you need to generate some files, for example a file containing the absolute paths of the system it is installed to, 418 | you can do that by adding one or multiple MAKE array entries: 419 | 420 | MAKE[0]="cat scripts/template.sh > bin/myapp" 421 | 422 | You could also let ./make execute other scripts: 423 | 424 | MAKE[1]=scripts/prepare.sh 425 | 426 | Or print a message to the user: 427 | 428 | MAKE[2]='echo "Hello $USER"' 429 | 430 | Likewise for PRIOR[0] and POST[0], but those will be executed before and after the actual installation of the TARGETs. 431 | 432 | The obvious exceptions are: UNINSTALL[0], CLEAN[0], DISTCLEAN[0], and IGNORE[0]. 433 | IGNORE is used for --tarball (make dist), the others obvious for their make-s. 434 | 435 | ADVANCED 436 | DEPS 437 | 438 | Syntax: DEPS="deps/first.yassi deps/second.yassi" 439 | 440 | BETA IN PLAN 441 | This will install each of the passed dependencies before the actual install. 442 | 443 | YASSI will change its PWD to each of the DEP files and the call its default routines to install this passed configuration. 444 | 445 | 446 | AUTHOR 447 | YASSI was started in early Feb 2015 by Simon Arjuna Erat from Switzerland. 448 | 449 | 450 | EO_SCREEN 451 | } 452 | show_sample() { # 453 | # Prints a minimal example config 454 | # 455 | cat <<-EO_SCREEN 456 | #!/usr/bin/env bash 457 | # This configure.yassi was generated on $(date +'%F') using YASSI ($script_version) 458 | # 459 | # Project Info 460 | # 461 | APP_NAME=myapp # Install name of the application, \$PREFIX/share/\$APP_NAME 462 | # APP_VER=0.5b # Optional, Show Versionnumber 463 | # APP_LIC=GPLv3+ # Optional, Show License 464 | # APP_HOMEPAGE="mywebsite.web" # Optional, homepage of project 465 | # AUTHOR_HOMEPAGE="mywebsite.web" # Optional, your personal homepage 466 | # AUTHOR_NAME="My Name" # Optional, Name of author 467 | # AUTHOR_EMAIL="some@mail.web" # Optional, Email of author 468 | 469 | # 470 | # Default target dirs 471 | # 472 | BINDIR=bin # All files in folder 'bin' will be installed to \$PREFIX/bin 473 | SYSCONFDIR=myapp.conf # Installs myapp.conf to \$PREFIX/etc 474 | DATADIR="./lists ./templates" # Copies both directories to \$PREFIX/share/myapp/{lists,templates} 475 | 476 | EO_SCREEN 477 | exit 0 478 | } 479 | show_sample_full() { # 480 | # Prints a full empty template with comments 481 | # 482 | cat <<-EO_SCREEN 483 | #!/usr/bin/env bash 484 | # This configure.yassi was generated on $(date +'%F') using YASSI ($script_version) 485 | # Copyright (c) $(date +'%F') by ${USER_NAME:-$USER} <${USER_EMAIL:-$USER@$HOSTNAME}> 486 | # All rights reserved. 487 | # 488 | # This program is free software: you can redistribute it and/or modify it 489 | # under the terms of the GNU General Public License as published 490 | # by the Free Software Foundation, either version 3 of the License, or 491 | # (at your option) any later version. 492 | # 493 | # This program is distributed in the hope that it will be useful, 494 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 495 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 496 | # GNU General Public License for more details. 497 | # 498 | # You should have received a copy of the GNU General Public License 499 | # along with this program. If not, see 500 | # 501 | # 502 | # Project Info 503 | # -- This info is shown on the default ./configure --help screen. 504 | # 505 | APP_NAME= # Install name of the application, \$PREFIX/share/\$APP_NAME 506 | # APP_VER= # Optional, Show Versionnumber 507 | # APP_LIC=GPLv3+ # Optional, Show License 508 | # APP_TITLE="" # Optional, Show long title 509 | # APP_PRJ="" # Optional, Name the parent project 510 | # APP_HOMEPAGE="" # Optional, Website of the project 511 | # APP_DIR=/usr/local # Optional, Used as default PREFIX if none is passed 512 | # 513 | # Author & Package Maintainer Info 514 | # -- This info is shown on the default ./configure --help screen. 515 | # 516 | # AUTHOR_NAME="" # Optional, Name of author 517 | # AUTHOR_EMAIL="" # Optional, Email of author 518 | # AUTHOR_HOMEPAGE="" # Optional, Website of author 519 | # MAINTAINER_NAME="" # Optional, Name of author 520 | # MAINTAINER_EMAIL="" # Optional, Email of author 521 | # MAINTAINER_HOMEPAGE="" # Optional, Website of author 522 | # MAILLIST_NEWS="" # Optional, address of maillist to get news 523 | # MAILLIST_BUGS="" # Optional, address of maillist to send bugs to... 524 | # BUGTRACKER="" # Optional, adress to visit if no maillist is available but a bugtracker system 525 | # 526 | # YASSI Booleans 527 | # 528 | # doMakefile=false # Optional, Write a Makefile according to created scripts 529 | # doGNU=false # Optional, like doMakefile, but write additional TARGETs to the Makefile, 530 | # # if the according scripts are not created by the $CFG 531 | # doTUI=false # Optional, Install TUI (BETA TODO) 532 | # doRef=false # Optional, Install \${APP_NAME}_dirs.conf to \$SYSCONFDIR/\$APP_NAME.conf 533 | # doVer=false # Optional, Use \$APP_VER for the DATADIR (\$DATAROOTDIR/\$APP_NAME-\$APP_VER) 534 | # 535 | # Requirements 536 | # 537 | # 538 | # Requirements 539 | # 540 | # REQS[app]="bash which" # Detailed checks, MODE ('app') may be: app, make or opt. 541 | # REQS_ONE[0]="curl wget" # For each entry at least one of the commands must be found 542 | # DEPS="" # Install these *.yassi configure files before anything else, see more in ./configure --manpage 543 | # 544 | # Create documentions 545 | # 546 | # DOCS[info]= # Optional, Add *.texi files to the list and texi2any will convert them with ./make-doc-info 547 | # DOCS[html]= # See more in ./configure --manpage 548 | # DOCS[pdf]= # But also for: dvi and ps 549 | # 550 | # Default target dirs 551 | # 552 | # Basic 553 | BINDIR=bin # This still install all files into \$PREFIX/bin 554 | # SBINDIR= # Optional, see --help for its default path 555 | SYSCONFDIR="cfg/{a,b}.cfg" # This will install a.cfg and b.cfg to \$PREFIX/etc 556 | # DATAROOTDIR= # Optional, see --help for its default path 557 | DATADIR="./dir1 dir2 file1" # Copy ./dir1, content of 'dir2' and file1 to \$PREFIX/share/\$APP_NAME 558 | # COMPLDIR= 559 | # LOCALEDIR= 560 | # LOCALSTATEDIR= 561 | # SHAREDSTATEDIR= 562 | 563 | # GUI # --> See "./configure --help" for their default paths 564 | # APPDIR= # Optional, Install *.desktop files 565 | # ICONDIR= # These dirs have subfolders, which you must provide as well 566 | 567 | # # Docs 568 | DOCDIR="[RCI]* docs" # Installs all files with capital starting letters R, C or I, 569 | # and all content of 'docs' to \$PREFIX/share/doc/\$APP_NAME 570 | # INFODIR= # Either precompiled (recomeded!) or/and as DOCS[info]=file.texi generated. 571 | # HTMLDIR= # Like INFODIR, as well for pdfdir, dvidir, psdir. 572 | # PDFDIR= 573 | # DVIDIR= 574 | # PSDIR= 575 | MANDIR=./man1 # The offical target directory, contains subfolders per section 576 | # MAN1DIR=mans/*.1 # These numbered variables grant direct access to their respective manpage dir. 577 | # MAN8DIR= 578 | # 579 | # Advanced: Mini Installer 580 | # 581 | # DOWNLOAD_IF_MISSING="bin/script.sh" # If this file or dir is missing, try the provided download options 582 | # GIT="" # First choice to retrieve code from git to ./\$APP_NAME.src 583 | # SVN="" # Some still use this, goes also to ./\$APP_NAME.src 584 | # DOWNLOAD="" # Last resort to download a tarball, prefer curl over wget 585 | # DOWNLOAD_DIR="" # What is the name of the folder of the extracted tarball. (\$APP_NAME-{master,\$APP_VER} are automaticly reckognized) 586 | 587 | # 588 | # Advanced: Tarball (--tarball ; make dist) 589 | # 590 | # TARBALL="\${HOME}/\${APP_NAME}.tar.gz" # Where to save the tarball? Default: ../\$APP_NAME.tar.gz -- ../\${APP_NAME}-\${APP_VER}.tar.gz 591 | # TARBALL_DIR="\$HOME" # Let YASSI create the filename, but save it here 592 | # IGNORE[0]=".git" # Besides Makefile + make*, which files should be ignored for tarball? 593 | 594 | # 595 | # Advanced Tweakings 596 | # 597 | # MAKE_CREATES= # Optional, If this file is missing, make install wont start 598 | # MAKE[0]="python ./scripts/script.py" # Optional, Tasks to be done by ./make 599 | # PRIOR[0]="" # Optional, Tasks prior to installation (./make-install) 600 | # POST[0]="" # Optional, Tasks post to installation (./make-install) 601 | # UNINSTALL[0]="" # Optional, additional tasks to be done by ./make-uninstall, required to undo possible PRIOR or POST operations 602 | # CLEAN[0]="to-delete.file" # Optional, Tasks to be done by ./make-clean 603 | # DISTCLEAN[0]="" # Optional, Tasks to be done by ./make-distclean 604 | # Likewise for: MAINTAINER_CLEAN MOSTLYCLEAN INSTALLDIRS 605 | # 606 | # Custom Target Paths 607 | # 608 | # Example 609 | # DIR_DEMO='$DATAROOTDIR/demos/$APP_NAME' 610 | # DEMO_DIR=mydata/* 611 | 612 | EO_SCREEN 613 | exit 0 614 | } 615 | # Prints the full template but removes the comments 616 | show_sample_full_clean() { show_sample_full | sed s," #..*","",g;} 617 | # Functions 618 | # 619 | task_reference() { # INDEX 620 | # Prints the index reference used 621 | # 622 | ref_val="${FHS[${1,,}]}" 623 | echo "${1}=$ref_val" | $SED s,"//","/",g 624 | } 625 | task_tui() { # 626 | # This will install TUI prior to, but with $APP_NAME 627 | # 628 | local GIT="git://git.sv.gnu.org/tui.git" 629 | local DOWNLOAD="http://git.savannah.gnu.org/cgit/tui.git/snapshot/tui-master.tar.gz" 630 | local GIT="http://github.com/sri-arjuna/tui.git" 631 | get_it(){ 632 | ping -c1 8.8.8.8 2>/dev/null >&2 || \ 633 | { echo "$MSG_NO_INTERNET" ; exit 1 ; } 634 | if which git 2>/dev/zero 1>/dev/zero 635 | then if [ -d tui-master ] 636 | then cd tui-master 637 | git pull 638 | RET=$? 639 | else git clone "$GIT" tui-master 640 | RET=$? 641 | cd tui-master 642 | fi 643 | return $RET 644 | elif which curl 2>/dev/zero 1>/dev/zero 645 | then curl -o "${DOWNLOAD##*/}" "$DOWNLOAD" 646 | elif which wget 2>/dev/zero 1>/dev/zero 647 | then wget -O "${DOWNLOAD##*/}" "$DOWNLOAD" 648 | else echo "$MSG_NO_DL_APP" 649 | exit 1 650 | fi 651 | [ -f "${DOWNLOAD##*/}" ] && \ 652 | tar -axf "${DOWNLOAD##*/}" && \ 653 | cd tui-master && \ 654 | return 0 655 | exit 1 656 | } 657 | # TUI is found, no download/install required. 658 | $WHICH tui 2>/dev/null >&2 && return 0 659 | # TUI is not found, download it or exit with failure 660 | get_it || { echo "$MSG_NO_INTERNET" ; exit 1 ; } 661 | # Call proper installation depending on chroot/builddir 662 | [ -z "${DESTDIR:-${FHS[chroot]}}" ] && \ 663 | $PWD/configure --prefix=${FHS[prefix]} || \ 664 | ./configure -c $PWD/configure.yassi --prefix=${FHS[prefix]} --chroot=${FHS[chroot]} 665 | cd .. 666 | echo "(set -x;cd tui-master ; ./make)" >> ./make 667 | echo "(set -x;cd tui-master ; ./make-install-all)" >> ./make-install 668 | } 669 | task_docs() { # INFILE [TYPE=info] 670 | # Prints the texi2any command to create an info file 671 | # or another specified TYPE (dvi,html,pdf,ps) 672 | INFILE="$1" 673 | DOCTYPE="${2:-info}" 674 | OUTFILE=${INFILE/\.*/\.$DOCTYPE} 675 | 676 | case "${DOCTYPE,,}" in 677 | info) echo "texi2any -o \"$OUTFILE\" --no-split \"$INFILE\"" 678 | ;; 679 | *) echo "texi2any --$DOCTYPE -o \"$OUTFILE\" --no-split \"$INFILE\"" 680 | ;; 681 | esac 682 | } 683 | task_remover() { # ENTRY 684 | # Catches ENTRY and prints 'rm -f ENTRY' if it is a file/dir 685 | # Print the line as-is otherwise 686 | if [ -f "$1" ] 687 | then echo "rm -f \"$1\"" 688 | elif [ -d "$1" ] 689 | then echo "rm -fr \"$1\"" 690 | elif [ "rm" = "${1:0:2}" ] 691 | then case "$1" in 692 | "rm "*|"rmdir "*) 693 | echo "$1" ;; 694 | *) echo "rm -f $1" ;; 695 | esac 696 | else echo "rm -f $1" 697 | fi 698 | } 699 | task_executer() { # ENTRY 700 | # Catches ENTRY and prints 'sh ./ENTRY' 701 | # Executes it, or fails if it is a dir. 702 | if [ -d "$1" ] 703 | then echo "$(eval $MSG_CANNOT_EXE_DIR)" >&2 704 | exit 1 705 | elif [ -f "$1" ] 706 | then if [ -x "$1" ] 707 | then [ "/" = "${1:0:1}" ] && \ 708 | echo "\"$1\"" || echo "\"$PWD/$1\"" 709 | else [ "/" = "${1:0:1}" ] && \ 710 | echo "bash \"$1\"" || echo "bash \"$PWD/$1\"" 711 | fi 712 | else echo "$1" 713 | fi 714 | } 715 | task_clean() { 716 | # Remove the files that where created 717 | # from 'make' or make 'html' 718 | [ -f make-clean ] || return 719 | texi_convert() { echo "${1%\.texi}.$2";} 720 | echo "which texi2any 2>/dev/zero 1>/dev/zero || exit 0" >> make-clean 721 | for T in info html pdf dvi ps;do tData="${DOCS[$T]}" 722 | for item in $tData;do echo "rm -f $(texi_convert "$item" "$T")" >> make-clean ;done 723 | done 724 | } 725 | task_distclean() { 726 | # Remove all the files that where created by configure 727 | # 728 | for task in Makefile make* $REF 729 | do task_remover "$task" 730 | done 731 | } 732 | task_dist() { # 733 | # Packages the project dir without the items of IGNORE[@] 734 | # 735 | exclude_list=$(echo [mM]ake* *_dirs.conf) 736 | for ex in "${IGNORE[@]}";do exclude_list+=" $ex";done 737 | # Since we prepare the make-, configure is no longer required 738 | opt_exclude="" #"--exclude-ignore=configure" 739 | for item in $exclude_list;do opt_exclude+=" --exclude-ignore=$item";done 740 | 741 | tmp_p="${PWD:-$(pwd)}" 742 | tmp_dir="$(dirname $tmp_p)" 743 | this=${tmp_p/$tmp_dir} 744 | 745 | [ -z "$APP_VER" ] && \ 746 | VERSION="" || \ 747 | VERSION="-${APP_VER}" 748 | # This is just as a failsafe and fallback 749 | [ ! -z "$TARBALL_DIR" ] && TARBALL="" && \ 750 | ( [ -d "$TARBALL_DIR" ] || mkdir -p "$TARBALL_DIR" ) 751 | cd "${TARBALL_DIR:-..}" 752 | #if TARBALL has another path than TARBALL_DIR, that is okay this way 753 | tarball="${TARBALL:-${APP_NAME}$VERSION.tar.gz}" 754 | # Actually save this, 755 | tar -acf "$tarball" \ 756 | --hard-dereference \ 757 | $opt_exclude "${this/\/}" 758 | RET=$? 759 | [ 0 -eq $RET ] && \ 760 | echo "$MSG_TARBALL_GOOD ${tarball}!" || \ 761 | echo "$MSG_TARBALL_BAD ${tarball}!" 762 | cd "$tmp_p" 763 | unset ${!tmp_*} this 764 | return $RET 765 | } 766 | task_reqs() { # MODE 767 | # Checks for required commands 768 | # And prints according function to file: make 769 | #echo "TODO $FUNCNAME -- medium prio" >&2 770 | is_there() { which "$1" 2>&1 1>/dev/zero; } 771 | 772 | # First do optionals 773 | opts="" 774 | for o in "${REQS[opt]}";do is_there "$o" || opts+=" $o";done 775 | [ -z "$(echo $opts)" || (echo "$MSG_REQS_OPTS";printf '%s\n' $opts) 776 | 777 | # Continue with 'requires one of ...' 778 | C=0 ; fatal=0 779 | while [ $C -le ${#REQS_ONE[@]} ] 780 | [ -n "${REQS_ONE[$C]}" 781 | do 782 | found=0 783 | for req in ${REQS_ONE[$C]};do 784 | is_there $req && found=$(($found + 1)) 785 | done 786 | [ $found -eq 0 ] && fatal=$(( $fatal + 1)) && \ 787 | echo "${MSG_REQS_ONE} ${REQS_ONE[$C]}" 788 | ((C++)) 789 | done 790 | [ $fatal -gt 0 ] && exit 1 791 | 792 | # Get the absolute required ones 793 | [ -z "${REQS[app]}" ] && list="$REQS" || list="${REQS[app]} ${REQS[make]}" 794 | 795 | missing="" 796 | for req in ${REQS[app]};do which $req 2>/dev/zero 1>&2 || missing+=" $req" ;done 797 | if [ -z "$missing" ] 798 | then return 0 799 | else printf '%s\n' \ 800 | "$MSG_MISSING_CMDS" #"Sadly, you must figure out the package name yourself." 801 | printf '::-->> %s\n' \ 802 | ${missing} 803 | exit 1 804 | fi 805 | } 806 | task_download() { # 807 | # Downloads APP_NAME project according to provided options 808 | # 809 | doDL=false outdir="" 810 | [ -z "$DOWNLOAD_IF_MISSING" ] && return # Nothing todo if its empty 811 | [ -d "$DOWNLOAD_IF_MISSING" ] || doDL=true 812 | [ -f "$DOWNLOAD_IF_MISSING" ] && doDL=false || doDL=true 813 | $doDL || return # its there 814 | # Prefer git over svn over download 815 | if [ -n "$GIT" ] && $WHICH git 2>/dev/zero 1>/dev/zero 816 | then outdir="$APP_NAME.src" 817 | git clone "$GIT" "$outdir" 818 | elif [ -n "$SVN" ] && $WHICH git 2>/dev/zero 1>/dev/zero 819 | then outdir="$APP_NAME.src" 820 | svn checkout "$SVN" "$outdir" 821 | elif [ -n "$DOWNLOAD" ] 822 | then app="" 823 | if which curl 2>/dev/zero 1>/dev/zero 824 | then app=curl ; opt="-o" 825 | else app=wget ; opt="-O" # Hopefully 826 | fi 827 | [ -z "$app" ] && printf '%s\n' "$MSG_NO_DL_APP" && exit 1 828 | $app $opt "${DOWNLOAD##*/}" "$DOWNLOAD" 829 | tar -axf "${DOWNLOAD##*/}" 830 | if [ -d "${APP_NAME}" ] 831 | then outdir="${APP_NAME}" 832 | elif [ -d "${APP_NAME}-master" ] 833 | then outdir="${APP_NAME}-master" 834 | elif [ -d "${APP_NAME}-$APP_VER" ] 835 | then outdir="${APP_NAME}-$VER" 836 | else [ -z "$DOWNLOAD_DIR" && \ 837 | outdir=$($LS -dd $APP_NAME |$AWK '/^d/ {print $9}'|head -n1) \\ 838 | outdir="$DOWNLOAD_DIR" 839 | fi 840 | fi 841 | [ -e "$outdir" ] && printf '%s\n' "$MSG_NO_CODE" && exit 1 842 | cd "$outdir" 843 | export doDL 844 | } 845 | task_mkdir() { # INDEX 846 | # Print the code required to create a directory 847 | # Checking for '/usr-move' and creates symlink if required 848 | $GREP -q "create_dir=\"${FHS[${1,,}]}\"" make-install && return 849 | create_dir="${FHS[${1,,}]}" 850 | cat >> "make-install" <<-EO_SCREEN 851 | 852 | create_dir="$create_dir" 853 | if [ ! -d "\${CHROOT}\${create_dir%/*}" ] 854 | then mkdir -p "\${CHROOT}/usr" 855 | cd "\${CHROOT}/usr/.." 856 | [ -d "\$CHROOT/usr\${create_dir%/*}" ] && [ -n "\${create_dir%/*}" ] && \\ 857 | ln -sf "usr\${create_dir%/*}" "\${create_dir%/*}" 858 | cd "\$OLDPWD" 859 | fi 860 | [ -d "\${CHROOT}/\$create_dir" ] || \\ 861 | mkdir -p "\${CHROOT}/\$create_dir" || echo >/dev/zero 862 | EO_SCREEN 863 | } 864 | task_uninstall() { # INDEX CONTENT 865 | # Prints the remove commands 866 | # 867 | INDEX="$1" ; shift 868 | DEST="${CHROOT}${FHS[${INDEX,,}]}" 869 | 870 | for tr in ${@} 871 | do case "$INDEX" in 872 | SBINDIR|BINDIR|MANDIR|MAN[1-9]DIR) 873 | if [ -d "${tr}" ] 874 | then for e in "./$tr/"* 875 | do [ -d "$e" ] && \ 876 | echo "rm -fr \${CHROOT}${DEST/$CHROOT}/${e##*/}" || \ 877 | echo "rm -f \${CHROOT}${DEST/$CHROOT}/${e##*/}" 878 | done 879 | else echo "rm -f \${CHROOT}${DEST/$CHROOT}/${tr##*/}" 880 | fi 881 | ;; 882 | COMPLDIR) 883 | # Check if it is a single file or a dir with possible multiple files 884 | if [ -d "$tr" ] 885 | then for this_compl in "$tr/"* 886 | do tmp_compl="${this_compl/\$\{APP_NAME\}/$APP_NAME}" 887 | echo "rm -f \${CHROOT}${DEST/$CHROOT}/${tmp_compl##*/}" 888 | done 889 | else tr="${tr/\$\{APP_NAME\}/$APP_NAME}" 890 | echo "rm -f \${CHROOT}${DEST/$CHROOT}/${tr##*/}" 891 | fi 892 | ;; 893 | APPDIR|ICONDIR|LOCALEDIR) 894 | ( 895 | . ./$CFG 896 | for F in $(cd ${!INDEX}/ ; find -type f ) 897 | do 898 | [ ! -d "$F" ] && echo "rm -f \${CHROOT}${DEST/$CHROOT}/${F##/*}" 899 | done 900 | ) 901 | ;; 902 | *) [ -d "$tr" ] && \ 903 | echo "rm -fr \${CHROOT}${DEST/$CHROOT}/${tr##*/}" || \ 904 | echo "rm -f \${CHROOT}${DEST/$CHROOT}/${tr##*/}" 905 | ;; 906 | esac 907 | done 908 | return 0 909 | } 910 | get_dir() { source "$REF" ; tmp="${1^^}";echo "${!tmp}";unset tmp;} 911 | get_content() { source "$CFG" ; tmp="${1^^}";echo "${!tmp}";unset tmp;} 912 | task_install() { # INDEX CONTENT 913 | # Write the 'install' command for this INDEX and CONTENT 914 | # Copy all CONTENT of INDEX, preserve same output dir! 915 | INDEX="$1" ; shift ; ID=${INDEX^^} 916 | DEST="\${CHROOT}${FHS[${INDEX,,}]}" 917 | 918 | # This covers custom created target paths 919 | tPath="$(get_dir ${INDEX})" 920 | DEST="${DEST:-$tPath}" 921 | [ "${1,,}" = root* ] && [ -z "$DEST" ] && DEST="/" 922 | 923 | # Parse each 'variable' 924 | for item in "${@}" 925 | do # Something to do? 926 | tItem="$(eval echo $item)" 927 | #tui-title "$INDEX :: $item :: $tItem :: $@ " 928 | [ -n "$tItem" ] && \ 929 | task_mkdir "$INDEX" >> make-install || \ 930 | continue 931 | # Get proper string/-formating 932 | if [ "./" = "${item:0:2}" ] || [ -f "$item" ] 933 | then str="$item" 934 | elif [ -d "$item" ] 935 | then str="$item/*" 936 | else str="$tItem" 937 | fi 938 | # Install this the simple way 939 | echo "cp -ar ${str} \"$DEST\"" >> "make-install" 940 | done 941 | } 942 | load_fhs() { # 943 | # Assign default paths according to: http://www.pathname.com/fhs/ 944 | # The 'appdir', 'icondir' and the 'man[1-9]dir's are 'homebrew' and non-standard, so are root, bootdir, efidir, grubdir and systemddir 945 | for index in $list_index 946 | do tmp="${FHS[$index]}" ; etc_done=false 947 | if [ -z "$tmp" ] 948 | then case "$index" in 949 | prefix) tmp="${APP_DIR}" ;; 950 | sysconfdir) tmp_prefix="${FHS[prefix]}" 951 | case "$tmp_prefix" in 952 | "/"|"/usr") tmp="/etc" ;; 953 | *) tmp="${FHS[prefix]}/etc";; 954 | esac ; etc_done=true ;; 955 | # --- --- --- --- --- --- --- --- --- # 956 | # They dont have ending 'dir' because they are NOT standard! 957 | root) tmp="/" ;; 958 | boot) tmp="${FHS[rootdir]}/boot" ;; 959 | efi) tmp="${FHS[bootdir]}/efi" ;; 960 | grub) tmp="${FHS[bootdir]}/grub" ;; 961 | systemd) tmp="${FHS[sysconfdir]}/systemd";; 962 | # --- --- --- --- --- --- --- --- --- # 963 | "bindir") tmp="${FHS[prefix]}/bin" ;; 964 | "sbindir") tmp="${FHS[prefix]}/sbin" ;; 965 | datarootdir) tmp="${FHS[prefix]}/share" ;; 966 | appdir) tmp="${FHS[datarootdir]}/applications" ;; 967 | icondir) tmp="${FHS[datarootdir]}/icons" ;; 968 | datadir) tmp="${FHS[datarootdir]}/$APP_NAME" ;; 969 | infodir) tmp="${FHS[datarootdir]}/info" ;; 970 | mandir) tmp="${FHS[datarootdir]}/man" ;; 971 | man[0-9]dir) tmp="${FHS[mandir]}/${index:0:4}" ;; 972 | localedir) tmp="${FHS[datarootdir]}/locale" ;; 973 | docdir) tmp="${FHS[datarootdir]}/doc/$APP_NAME" ;; 974 | htmldir|dvidir|pdfdir|psdir) tmp="${FHS[docdir]}" ;; 975 | compldir) # Some systems have bash completion within the SYSCONFDIR 976 | if [ -d "${FHS[datarootdir]}/bash_completion/completions" ] 977 | then tmp="${FHS[datarootdir]}/bash_completion/completions" 978 | elif [ -d "${FHS[sysconfdir]}/bash_completion.d" ] 979 | then tmp="${FHS[sysconfdir]}/bash_completion.d" 980 | else # Use default as fallback 981 | tmp="${FHS[datarootdir]}/bash-completion/completions" 982 | fi ;; 983 | sharedstatedir) tmp="${FHS[prefix]}/com" ;; 984 | localstatedir) tmp="${FHS[prefix]}/var" ;; 985 | esac 986 | if [ "$index" = "prefix" ] && ! $etc_done 987 | then # Do special handling 988 | [ "~" = "${tmp:0:1}" ] && tmp="${tmp/~/$HOME}" 989 | if [ "${tmp:0:${#HOME}}" = "$HOME" ] 990 | then is_at_home=true 991 | install_prefix="" 992 | tmp="${tmp/~\/$HOME/$HOME}" 993 | else is_at_home=false 994 | fi 995 | fi 996 | FHS["$index"]="$tmp" 997 | fi 998 | done 999 | export FHS is_at_home 1000 | } 1001 | write_file_ref() { # 1002 | # Write the basic reference file 1003 | # 1004 | # Exit with error with $REF is not set 1005 | [ -z "$REF" ] && exit 1 ; >"$REF" 1006 | # Internal defaults 1007 | echo "PREFIX=${FHS[prefix]}">>"$REF" 1008 | for i in $list_variables;do [ -n "${!i}" ] && task_reference "${i^^}" >> "$REF";done 1009 | # Find user homebase 1010 | for that in / /Usr /Os /Sys /System /Var 1011 | do for this in Home User Users 1012 | do HOMEBASE="$that/$this" 1013 | [ -d "${HOMEBASE}" ] && break 2 1014 | [ -d "${HOMEBASE,,}" ] && HOMEBASE="${HOMEBASE,,}" && break 2 1015 | [ -d "${HOMEBASE^^}" ] && HOMEBASE="${HOMEBASE^^}" && break 2 1016 | done 1017 | done 1018 | [ -d "$HOMEBASE" ] || HOMEBASE=/home ## Using this as fallback 1019 | echo "HOMEBASE=$HOMEBASE" >> "$REF" 1020 | # Custom added dirs 1021 | for D in ${!DIR_*};do echo "$D=\"${!D}\" " >> "$REF";done 1022 | } 1023 | write_file_docs() { # 1024 | # Checks if texi2any is installed and exit if not 1025 | # Converts the texi files to given type 1026 | for type in info html dvi pdf ps;do 1027 | if [ -n "${DOCS[$type]}" ] 1028 | then printf '%s\n' \ 1029 | '! which texi2any 2>/dev/zero 1>/dev/zero && \' \ 1030 | " echo \"$MSG_NO_TEXI\" && \\" \ 1031 | ' exit 1' \ 1032 | >> make-doc-$type 1033 | for entry in ${DOCS[$type]};do 1034 | task_docs "$entry" "$type" >> make-doc-$type 1035 | done 1036 | fi 1037 | done 1038 | } 1039 | write_file_headers() { # 1040 | # Creates the ./make* files 1041 | # and writes the according script headers 1042 | # Basic files 1043 | touch make make-{install,uninstall,distclean} 1044 | $doGNU && touch make-clean make-dist 1045 | [ -n "$(echo ${DOCS[*]})" ] && touch make-install-all 1046 | [ -n "$(echo ${CHECK[*]})" ] && touch make-check 1047 | [ -n "$(echo ${CLEAN[*]})" ] && touch make-clean 1048 | [ -n "$(echo ${DISTCLEAN[*]})" ] && touch make-distclean 1049 | [ -n "$(echo ${INSTALLDIRS[*]})" ] && touch make-installdirs 1050 | [ -n "$(echo ${MOSTLYCLEAN[*]})" ] && touch make-mostlyclean 1051 | [ -n "$(echo ${MAINTAINER_CLEAN[*]})" ] && touch make-maintainer-clean 1052 | # Docs 1053 | for t in info html dvi pdf ps;do 1054 | [ -n "$(echo ${DOCS[$t]})" ] && touch make-doc-$t 1055 | done 1056 | # Write shebang and make the scripts executable 1057 | for m in ./make*;do 1058 | printf '%s\n' "#!/usr/bin/env bash" \ 1059 | "$($VERBOSE && printf '%s\n' 'set -x')" \ 1060 | "source $CFG" \ 1061 | "source $REF" \ 1062 | "CHROOT=\${DESTDIR:-$CHROOT}" \ 1063 | > "$m" 1064 | chmod +x "$m" 1065 | 1066 | # Write special content 1067 | case "$m" in 1068 | *install*) printf '%s\n' "source $REF || { echo \"$MSG_RERUN_CFG\" ; exit 1; }" "$tmp_var" >> "$m" 1069 | if [ "$m" = "make-install" ] && ! echo "$CHROOT/$PREFIX"| $GREP -q -e /home -e /Users -e /users 1070 | then printf '%s\n' "[ \${UID:-0} -ne 0 ] && \\" \ 1071 | printf '\t%s\n' "echo \"To ${m/*-} '${APP_TITLE:-APP_NAME}', root access is required.\" && \\" "exit 1" >> "$m" 1072 | fi 1073 | [ "./make-install" = "$m" ] && printf '%s\n' "$tmp_var" "[ -z \"\$CHROOT\" ] || mkdir -p \"\$CHROOT\"" >> "$m" 1074 | [ "./make-uninstall" = "$m" ] && printf '%s\n' "[ -n \"\$CHROOT\" ] || CHROOT=\"\"" >> "$m" 1075 | ;; 1076 | esac 1077 | done 1078 | # Write $REF handlers 1079 | if ${doRef:-false} 1080 | then printf '%s\n' "mkdir -p ${CHROOT}${FHS[sysconfdir]}" \ 1081 | "cp $REF ${CHROOT}${FHS[sysconfdir]}/$APP_NAME.conf" >> "make-install" 1082 | printf '%s\n' "rm -f ${CHROOT}${FHS[sysconfdir]}/$APP_NAME.conf" >> "make-uninstall" 1083 | fi 1084 | } 1085 | write_files_content() { # 1086 | # Write the actual content of the scripts 1087 | # 1088 | write_array() { # FILE ARRAY 1089 | # Expand passed ARRAY and write 1090 | # its content to passed FILE 1091 | C=0;F="$1" ; shift 1092 | while item="$(eval echo \${${1}[$C]})" 1093 | [ -n "$item" ] 1094 | do case "$F" in 1095 | *clean*|*uninst*) 1096 | task_remover "$item" >> "$F" ;; 1097 | *) task_executer "$item" >> "$F" ;; 1098 | esac 1099 | ((C++)) 1100 | done 1101 | } 1102 | write_file_install() { # 1103 | # Parse all variables and expand them 1104 | # 1105 | # Actualy write the make-{un,}install scripts 1106 | for index in $list_variables ${!DIR_*} 1107 | do # Expand index 1108 | case "$index" in 1109 | DIR_*) tmp1="${index/DIR_}_DIR" 1110 | tmp="${!tmp1}" ;; 1111 | *) tmp="${!index}" ;; 1112 | esac 1113 | task_install "$index" "$tmp" 1114 | task_uninstall "$index" "$tmp" >> make-uninstall 1115 | done 1116 | [ -n "$CHROOT" ] && echo "cp -a $REF make-uninstall \"\${CHROOT}\$DATADIR\"" >> "make-install" 1117 | } 1118 | # Actually write the content 1119 | for m in make*;do 1120 | case "$m" in 1121 | "make") write_array "$m" MAKE ;; 1122 | "make-install") [ -n "$MAKE_CREATES" ] && \ 1123 | echo "[ ! -f \"$MAKE_CREATES\" ] && echo 'Please run either \"./make\" or \"make\" first!' && exit 1" >> "$m" 1124 | write_array "$m" PRIOR 1125 | write_file_install 1126 | write_array "$m" POST ;; 1127 | "make-check") write_array "$m" CHECK ;; 1128 | "make-uninstall") 1129 | # These two are app specific and can be deleted as is 1130 | [ -n "$(get_dir datadir)" ] && echo "rm -fr \"\${CHROOT}$(get_dir datadir)\"" >> make-uninstall 1131 | [ -n "$(get_dir docdir)" ] && echo "rm -fr \"\${CHROOT}$(get_dir docdir)\"" >> make-uninstall 1132 | # Do manual removals too 1133 | write_array "$m" UNINSTALL ;; 1134 | "make-clean") 1135 | write_array "$m" CLEAN 1136 | task_clean >> "make-clean" ;; 1137 | "make-dist") echo "source $CFG" >> make-dist 1138 | LC_ALL=C type task_dist | ${GREP} -v "is a" >> make-dist 1139 | echo task_dist >> make-dist ;; 1140 | "make-distclean") 1141 | write_array "$m" DISTCLEAN 1142 | >> "make-distclean" 1143 | task_distclean >> "make-distclean";; 1144 | "make-mostlyclean") 1145 | write_array "$m" MOSTLYCLEAN ;; 1146 | "make-maintainer-clean") 1147 | write_array "$m" MAINTAINER_CLEAN ;; 1148 | "make-installdirs") 1149 | write_array "$m" INSTALLDIRS ;; 1150 | esac 1151 | done 1152 | } 1153 | write_file_closer() { # 1154 | # Saves the return code of the last command 1155 | # 1156 | # Now close the files 1157 | for m in ./make* 1158 | do $VERBOSE && verbose="set +x" || verbose="" 1159 | printf '%s\n' "RET=\$?" "$( [ -n "$verbose" ] && echo $verbose)" "exit \$RET" >> "$m" 1160 | done 1161 | 1162 | } 1163 | write_file_make() { # 1164 | # Checks for existing scripts and adds them to the makefile 1165 | # Create it either dynamic or add additional make targets 1166 | # 1167 | # Variables 1168 | # 1169 | # Clear / Init makefile 1170 | ($doMakeFile||$doGNU) || return 1171 | local M="./Makefile" 1172 | echo "# This Makefile was generated for ${APP_TITLE:-$APP_NAME} on $(date +'%F') using YASSI ($script_version)" >$M 1173 | # 1174 | # Function 1175 | # 1176 | regular_handling() { # 1177 | # Write the basic Makefile 1178 | # 1179 | for task in ./make* 1180 | do [ "task" = "all" ] && task=install-all 1181 | case "$task" in 1182 | ./make) printf '%s\n' "options:" " ./make" >> "$M" ;; 1183 | ./make-install-all) 1184 | if [ -f "$task" ];then 1185 | printf '%s\n' "./make" ./make-doc-* "DESTDIR=\${DESTDIR} ./make-install" >> "$task" 1186 | fi 1187 | [ -f "$task" ] && printf '%s\n' "${task/\.\/make-}:" " DESTDIR=\${DESTDIR} $task" >> "$M" 1188 | ;; 1189 | ./make-install) [ -f "$task" ] && printf '%s\n' "${task/*-}:" " DESTDIR=\${DESTDIR} ${task}" >> "$M" ;; 1190 | *-doc-*) [ -f "$task" ] && printf '%s\n' "${task/*-}:" " ${task}" >> "$M" ;; 1191 | *) [ -f "$task" ] && printf '%s\n' "${task/*-}:" " ${task}" >> "$M" ;; 1192 | esac 1193 | done 1194 | echo "PHONY: $(echo make-*|sed s,make\-,,g|sed s,doc\-,install\-,g)" >> "$M" 1195 | 1196 | } 1197 | # 1198 | # Action & Display 1199 | # 1200 | if $doGNU 1201 | then # Make the Makefile GNU compliant 1202 | regular_handling 1203 | todo="" 1204 | for m in mostlyclean maintainer-clean installdirs;do [ -f make-$m ] || todo+=" $m";done 1205 | for t in $todo;do echo "PHONY: $t" >> Makefile;echo "$t:" >> Makefile;done 1206 | else # Regular default handling 1207 | regular_handling 1208 | fi 1209 | } 1210 | # 1211 | # Get options 1212 | # 1213 | $DEBUG && set -x 1214 | [ -f "$CFG" ] && source "$CFG" # Overwrite YASSI defaults and load APP-defaults 1215 | GETOPT=$(getopt \ 1216 | --options "hc:t" \ 1217 | --longoptions "help,version,verbose,debug,conf:,manpage,makefile,sample,sample-full,sample-full-clean,chroot:,tarball,bindir:,sbindir:,prefix:,datarootdir:,datadir:,infodir:,mandir,man[1-9]dir:,localedir:,docdir:,compldir:,sharedstatedir:,localstatedir:,localedir:,root:,boot:,efi:,grub:,systemd:" \ 1218 | --name "${0##*/}" -- "${@}" 1219 | ) 1220 | eval set -- "$GETOPT" 1221 | while true 1222 | do case "$1" in 1223 | -h|--help) show_help ;; 1224 | --version) show_version ;; 1225 | --sample) show_sample ;; 1226 | --sample-full) show_sample_full ;; 1227 | --sample-full-clean) show_sample_full_clean ; exit 0 ;; 1228 | --bindir|--sbindir|--datarootdir|--datadir|\ 1229 | --infodir|--sysconfdir|--mandir,--man[1-9]dir|\ 1230 | --docdir|--htmldir|--dvidir|--pdfdir|--psdir|\ 1231 | --compldir|--sharedstatedir|--localstatedir|--localedir|\ 1232 | --root|--boot|--efi|--grub) 1233 | FHS["${1/--}"]="$2" 1234 | shift 2 ;; 1235 | --prefix) [ "~" = "${2:0:1}" ] && \ 1236 | tmp="${2/\~/$HOME}" || \ 1237 | tmp="${2}" 1238 | FHS["${1/--}"]="${tmp}" 1239 | shift 2 ;; 1240 | -t|--tarball) task_dist 1241 | exit $? ;; 1242 | -c|--conf) CFG="$2" 1243 | shift 2 ;; 1244 | --chroot) [ -z "$2" ] && continue 1245 | [ "~" = "${2:0:1}" ] && \ 1246 | CHROOT="${2/\~/$HOME}" || \ 1247 | CHROOT="${2}" 1248 | shift 2 ;; 1249 | --makefile) doMakefile=true 1250 | shift ;; 1251 | --manpage) if txt2man --help > /dev/zero 1252 | then show_manpage | txt2man \ 1253 | -t "configure 1" -r "YASSI $script_version" \ 1254 | -I "/usr/share/doc/appname" \ 1255 | -I "/etc/appname.conf" \ 1256 | -I "./make-" \ 1257 | -I "./configure" \ 1258 | -B "doMakefile" \ 1259 | -B "doTUI" \ 1260 | -B "doGNU" \ 1261 | -B "doRef" \ 1262 | > "$MANPAGE" 1263 | man "$MANPAGE" ; rm "$MANPAGE" 1264 | else show_manpage 1265 | fi 1266 | exit 0 ;; 1267 | --verbose) VERBOSE=true ;; 1268 | --debug) VERBOSE=true 1269 | DEBUG=true ;; 1270 | --) shift ; break ;; 1271 | esac 1272 | done 1273 | [ ! -f "$CFG" ] && echo "$MSG_NO_CONFIG" && exit 1 || source "$CFG" 1274 | [ -z "${APP_NAME/APP*NAME}" ] && echo "$MSG_NO_NAME" && exit 1 1275 | REF="./${APP_NAME}_dirs.conf" 1276 | # 1277 | # Prepare Environment 1278 | # 1279 | load_fhs 1280 | unset ${list_variables} ${!list_variables} 1281 | source "$CFG" 1282 | write_file_ref 1283 | # 1284 | # Prepare installation script 1285 | # 1286 | task_download 1287 | write_file_headers 1288 | $doTUI && task_tui 1289 | write_files_content 1290 | write_file_docs 1291 | write_file_make 1292 | write_file_closer 1293 | # 1294 | # Quit 1295 | # 1296 | RET=$? 1297 | $doDL && cd .. # Change to parent dir if "task_download" was activated 1298 | $DEBUG && set +x 1299 | export LC_ALL= 1300 | exit $RET 1301 | -------------------------------------------------------------------------------- /configure.yassi: -------------------------------------------------------------------------------- 1 | # 2 | # Project info 3 | # 4 | APP_NAME=vhs 5 | APP_TITLE="Video Handler Script" 6 | APP_VER="$(tmp=$(\grep _version= bin/vhs.sh);echo ${tmp/*=};tmp='')" 7 | APP_REQUIRES="git which awk grep sed ffmpeg" 8 | # 9 | # Bugs 10 | # 11 | BUGS=erat.simon@gmail.com 12 | BUGTRACKER="https://github.com/sri-arjuna/vhs/issues" 13 | # 14 | # Specials 15 | # 16 | doTUI=true 17 | # 18 | # Project files 19 | # 20 | BINDIR=bin/vhs 21 | DOCDIR="docs/ChangeLog docs/INSTALL.md docs/LICENSE docs/README.md" 22 | COMPLDIR=files/vhs_compl.bash 23 | #MAN1DIR=docs/vhs.1 24 | APPDIR=links 25 | ICONDIR=./icons/hicolor 26 | # 27 | # Tasks : Prior 28 | # 29 | PRIOR[0]="cp bin/vhs.sh bin/vhs" 30 | # 31 | # Tasks : Post 32 | # 33 | CLEAN[0]="rm bin/vhs" 34 | -------------------------------------------------------------------------------- /docs/ChangeLog: -------------------------------------------------------------------------------- 1 | 2015.12.03 - vhs - 2.7.5 2 | * Hotfix, ctrl+c now plays the next item from list 3 | 4 | 2015.11.27 - vhs - 2.7 5 | ---------------------- 6 | * vhs: Should no longer loop endless if playstatus tempfile is missing 7 | * vhs -C: Optimized config preview 8 | * vhs.conf: if FFSERVER_CONF=!/etc/ffserver.conf, indicates ffserver.conf was not found 9 | * vhs.conf: ip retrievel (vhs ip) uses now 'ip addr' rather than 'ifconfig' 10 | * presets: commented ntsc and pal out 11 | * links/*.desktop: Updated name= & categories= 12 | * ./configure: No longer removes existing applications or icons folder 13 | 14 | 15 | 2015.11.25 - vhs - 2.6c 16 | ----------------------- 17 | * Added free icons from: http://glypho.eu/free-icons 18 | * Added free icons from: http://www.mouserunner.net/Spheres_Icons_PrimaryCons 19 | 20 | 21 | 2015.11.24 - vhs - 2.6b 22 | ----------------------- 23 | * Updated YASSI 24 | * Added .desktop file 25 | 26 | 27 | 2015.10.09 - vhs - 2.6a 28 | ----------------------- 29 | * Initial Changelog, long overdue 30 | * Fixed: 'Hotkeys' when playing audio file 31 | -------------------------------------------------------------------------------- /docs/INSTALL.md: -------------------------------------------------------------------------------- 1 | VHS - Installation 2 | ================== 3 | 4 | 5 | The actual installation 6 | ----------------------- 7 | 8 | __Minimalistic:__ 9 | Place the script in $HOME/bin and remove the __.sh__. 10 | 11 | __Recomended:__ 12 | The files are quite easy to be placed. 13 | 14 | At least the most essential one, which is the script itself, vhs.sh. 15 | You can place it within any available $PATH, such as /bin, /usr/bin, /usr/local/bin, $HOME/bin or $HOME/.local/bin. 16 | 17 | The manpage should be placed with your distros official manpage directories. 18 | On Fedora that is in /usr/share/man/man1. 19 | 20 | Now the most tricky file is the file for the bash completion. 21 | That is only recomended if the shell you use is bash. 22 | 23 | Anyway, on Fedora, you'd place it in /etc/bash_completion.d/ 24 | 25 | __Best:__ 26 | Is to use the rpm repositry so you get all the updates automaticly. 27 | See: http://sea.fedorapeople.org/sea-devel.repo 28 | Please that file in /etc/yum.repos.d/ 29 | 30 | First start 31 | ----------- 32 | 33 | Upon first start, it will check for TUI (Text User Interface) and install it if required. 34 | For this task it expected git or wget to be installed on your system. 35 | 36 | Then it will write 5 files into $HOME/.config/vhs 37 | *) container 38 | *) presets 39 | *) vhs.conf 40 | *) urls.{play,stream} 41 | 42 | __container__ provides a table of recomended codecs according to their container/file extension. 43 | For example it takes ac3 & x265 for an mp4 container. 44 | If your preference is different, you can change it within there. 45 | Once that is implemented, if you build ffmpeg using vhs, or otherwise get your hands on a ffmpeg supporting h265, 46 | you can use my custom containers mp5 and mkv5, both preserving their original file extension, but using x265 instead of x264. 47 | 48 | __presets__ provies a table with most suggested video resolutions and recomended bitrates according to their resolution. 49 | All of the presets (first column 'quick access') are thought to use the lowest possible bitrate for the highest possible video quality. 50 | The a-PRESETs are supposed to be used for animes or cartoons (as in 'drawn' not 'rendered'), not animated movies. 51 | The yt-PRESETs are using the 'highest' bitrates, but giving a technicly lossless file, at maximum filesize. 52 | 53 | __vhs.conf__ contains all the defaul values you never want to pass everytime, because its 'your' default. 54 | This goes from default audio or video container, to your top most important stream source or target, 55 | or the 2 default languages you want to presrve for video encoding, or if you want to downcode dts to stereo or not. 56 | Please use __vhs -C__ and use the configuration screen. 57 | 58 | __urls.{play,stream}__ contains the URLs which already been used to play or stream a stream. 59 | It is recomended to use your most used URLs first, and place them on top of the file, so any below comment block gives you an easy divider for removable urls. -------------------------------------------------------------------------------- /docs/LICENSE: -------------------------------------------------------------------------------- 1 | GNU LESSER GENERAL PUBLIC LICENSE 2 | Version 2.1, February 1999 3 | 4 | Copyright (C) 1991, 1999 Free Software Foundation, Inc. 5 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 6 | Everyone is permitted to copy and distribute verbatim copies 7 | of this license document, but changing it is not allowed. 8 | 9 | (This is the first released version of the Lesser GPL. It also counts 10 | as the successor of the GNU Library Public License, version 2, hence 11 | the version number 2.1.) 12 | 13 | Preamble 14 | 15 | The licenses for most software are designed to take away your 16 | freedom to share and change it. By contrast, the GNU General Public 17 | Licenses are intended to guarantee your freedom to share and change 18 | free software--to make sure the software is free for all its users. 19 | 20 | This license, the Lesser General Public License, applies to some 21 | specially designated software packages--typically libraries--of the 22 | Free Software Foundation and other authors who decide to use it. You 23 | can use it too, but we suggest you first think carefully about whether 24 | this license or the ordinary General Public License is the better 25 | strategy to use in any particular case, based on the explanations below. 26 | 27 | When we speak of free software, we are referring to freedom of use, 28 | not price. Our General Public Licenses are designed to make sure that 29 | you have the freedom to distribute copies of free software (and charge 30 | for this service if you wish); that you receive source code or can get 31 | it if you want it; that you can change the software and use pieces of 32 | it in new free programs; and that you are informed that you can do 33 | these things. 34 | 35 | To protect your rights, we need to make restrictions that forbid 36 | distributors to deny you these rights or to ask you to surrender these 37 | rights. These restrictions translate to certain responsibilities for 38 | you if you distribute copies of the library or if you modify it. 39 | 40 | For example, if you distribute copies of the library, whether gratis 41 | or for a fee, you must give the recipients all the rights that we gave 42 | you. You must make sure that they, too, receive or can get the source 43 | code. If you link other code with the library, you must provide 44 | complete object files to the recipients, so that they can relink them 45 | with the library after making changes to the library and recompiling 46 | it. And you must show them these terms so they know their rights. 47 | 48 | We protect your rights with a two-step method: (1) we copyright the 49 | library, and (2) we offer you this license, which gives you legal 50 | permission to copy, distribute and/or modify the library. 51 | 52 | To protect each distributor, we want to make it very clear that 53 | there is no warranty for the free library. Also, if the library is 54 | modified by someone else and passed on, the recipients should know 55 | that what they have is not the original version, so that the original 56 | author's reputation will not be affected by problems that might be 57 | introduced by others. 58 | 59 | Finally, software patents pose a constant threat to the existence of 60 | any free program. We wish to make sure that a company cannot 61 | effectively restrict the users of a free program by obtaining a 62 | restrictive license from a patent holder. Therefore, we insist that 63 | any patent license obtained for a version of the library must be 64 | consistent with the full freedom of use specified in this license. 65 | 66 | Most GNU software, including some libraries, is covered by the 67 | ordinary GNU General Public License. This license, the GNU Lesser 68 | General Public License, applies to certain designated libraries, and 69 | is quite different from the ordinary General Public License. We use 70 | this license for certain libraries in order to permit linking those 71 | libraries into non-free programs. 72 | 73 | When a program is linked with a library, whether statically or using 74 | a shared library, the combination of the two is legally speaking a 75 | combined work, a derivative of the original library. The ordinary 76 | General Public License therefore permits such linking only if the 77 | entire combination fits its criteria of freedom. The Lesser General 78 | Public License permits more lax criteria for linking other code with 79 | the library. 80 | 81 | We call this license the "Lesser" General Public License because it 82 | does Less to protect the user's freedom than the ordinary General 83 | Public License. It also provides other free software developers Less 84 | of an advantage over competing non-free programs. These disadvantages 85 | are the reason we use the ordinary General Public License for many 86 | libraries. However, the Lesser license provides advantages in certain 87 | special circumstances. 88 | 89 | For example, on rare occasions, there may be a special need to 90 | encourage the widest possible use of a certain library, so that it becomes 91 | a de-facto standard. To achieve this, non-free programs must be 92 | allowed to use the library. A more frequent case is that a free 93 | library does the same job as widely used non-free libraries. In this 94 | case, there is little to gain by limiting the free library to free 95 | software only, so we use the Lesser General Public License. 96 | 97 | In other cases, permission to use a particular library in non-free 98 | programs enables a greater number of people to use a large body of 99 | free software. For example, permission to use the GNU C Library in 100 | non-free programs enables many more people to use the whole GNU 101 | operating system, as well as its variant, the GNU/Linux operating 102 | system. 103 | 104 | Although the Lesser General Public License is Less protective of the 105 | users' freedom, it does ensure that the user of a program that is 106 | linked with the Library has the freedom and the wherewithal to run 107 | that program using a modified version of the Library. 108 | 109 | The precise terms and conditions for copying, distribution and 110 | modification follow. Pay close attention to the difference between a 111 | "work based on the library" and a "work that uses the library". The 112 | former contains code derived from the library, whereas the latter must 113 | be combined with the library in order to run. 114 | 115 | GNU LESSER GENERAL PUBLIC LICENSE 116 | TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 117 | 118 | 0. This License Agreement applies to any software library or other 119 | program which contains a notice placed by the copyright holder or 120 | other authorized party saying it may be distributed under the terms of 121 | this Lesser General Public License (also called "this License"). 122 | Each licensee is addressed as "you". 123 | 124 | A "library" means a collection of software functions and/or data 125 | prepared so as to be conveniently linked with application programs 126 | (which use some of those functions and data) to form executables. 127 | 128 | The "Library", below, refers to any such software library or work 129 | which has been distributed under these terms. A "work based on the 130 | Library" means either the Library or any derivative work under 131 | copyright law: that is to say, a work containing the Library or a 132 | portion of it, either verbatim or with modifications and/or translated 133 | straightforwardly into another language. (Hereinafter, translation is 134 | included without limitation in the term "modification".) 135 | 136 | "Source code" for a work means the preferred form of the work for 137 | making modifications to it. For a library, complete source code means 138 | all the source code for all modules it contains, plus any associated 139 | interface definition files, plus the scripts used to control compilation 140 | and installation of the library. 141 | 142 | Activities other than copying, distribution and modification are not 143 | covered by this License; they are outside its scope. The act of 144 | running a program using the Library is not restricted, and output from 145 | such a program is covered only if its contents constitute a work based 146 | on the Library (independent of the use of the Library in a tool for 147 | writing it). Whether that is true depends on what the Library does 148 | and what the program that uses the Library does. 149 | 150 | 1. You may copy and distribute verbatim copies of the Library's 151 | complete source code as you receive it, in any medium, provided that 152 | you conspicuously and appropriately publish on each copy an 153 | appropriate copyright notice and disclaimer of warranty; keep intact 154 | all the notices that refer to this License and to the absence of any 155 | warranty; and distribute a copy of this License along with the 156 | Library. 157 | 158 | You may charge a fee for the physical act of transferring a copy, 159 | and you may at your option offer warranty protection in exchange for a 160 | fee. 161 | 162 | 2. You may modify your copy or copies of the Library or any portion 163 | of it, thus forming a work based on the Library, and copy and 164 | distribute such modifications or work under the terms of Section 1 165 | above, provided that you also meet all of these conditions: 166 | 167 | a) The modified work must itself be a software library. 168 | 169 | b) You must cause the files modified to carry prominent notices 170 | stating that you changed the files and the date of any change. 171 | 172 | c) You must cause the whole of the work to be licensed at no 173 | charge to all third parties under the terms of this License. 174 | 175 | d) If a facility in the modified Library refers to a function or a 176 | table of data to be supplied by an application program that uses 177 | the facility, other than as an argument passed when the facility 178 | is invoked, then you must make a good faith effort to ensure that, 179 | in the event an application does not supply such function or 180 | table, the facility still operates, and performs whatever part of 181 | its purpose remains meaningful. 182 | 183 | (For example, a function in a library to compute square roots has 184 | a purpose that is entirely well-defined independent of the 185 | application. Therefore, Subsection 2d requires that any 186 | application-supplied function or table used by this function must 187 | be optional: if the application does not supply it, the square 188 | root function must still compute square roots.) 189 | 190 | These requirements apply to the modified work as a whole. If 191 | identifiable sections of that work are not derived from the Library, 192 | and can be reasonably considered independent and separate works in 193 | themselves, then this License, and its terms, do not apply to those 194 | sections when you distribute them as separate works. But when you 195 | distribute the same sections as part of a whole which is a work based 196 | on the Library, the distribution of the whole must be on the terms of 197 | this License, whose permissions for other licensees extend to the 198 | entire whole, and thus to each and every part regardless of who wrote 199 | it. 200 | 201 | Thus, it is not the intent of this section to claim rights or contest 202 | your rights to work written entirely by you; rather, the intent is to 203 | exercise the right to control the distribution of derivative or 204 | collective works based on the Library. 205 | 206 | In addition, mere aggregation of another work not based on the Library 207 | with the Library (or with a work based on the Library) on a volume of 208 | a storage or distribution medium does not bring the other work under 209 | the scope of this License. 210 | 211 | 3. You may opt to apply the terms of the ordinary GNU General Public 212 | License instead of this License to a given copy of the Library. To do 213 | this, you must alter all the notices that refer to this License, so 214 | that they refer to the ordinary GNU General Public License, version 2, 215 | instead of to this License. (If a newer version than version 2 of the 216 | ordinary GNU General Public License has appeared, then you can specify 217 | that version instead if you wish.) Do not make any other change in 218 | these notices. 219 | 220 | Once this change is made in a given copy, it is irreversible for 221 | that copy, so the ordinary GNU General Public License applies to all 222 | subsequent copies and derivative works made from that copy. 223 | 224 | This option is useful when you wish to copy part of the code of 225 | the Library into a program that is not a library. 226 | 227 | 4. You may copy and distribute the Library (or a portion or 228 | derivative of it, under Section 2) in object code or executable form 229 | under the terms of Sections 1 and 2 above provided that you accompany 230 | it with the complete corresponding machine-readable source code, which 231 | must be distributed under the terms of Sections 1 and 2 above on a 232 | medium customarily used for software interchange. 233 | 234 | If distribution of object code is made by offering access to copy 235 | from a designated place, then offering equivalent access to copy the 236 | source code from the same place satisfies the requirement to 237 | distribute the source code, even though third parties are not 238 | compelled to copy the source along with the object code. 239 | 240 | 5. A program that contains no derivative of any portion of the 241 | Library, but is designed to work with the Library by being compiled or 242 | linked with it, is called a "work that uses the Library". Such a 243 | work, in isolation, is not a derivative work of the Library, and 244 | therefore falls outside the scope of this License. 245 | 246 | However, linking a "work that uses the Library" with the Library 247 | creates an executable that is a derivative of the Library (because it 248 | contains portions of the Library), rather than a "work that uses the 249 | library". The executable is therefore covered by this License. 250 | Section 6 states terms for distribution of such executables. 251 | 252 | When a "work that uses the Library" uses material from a header file 253 | that is part of the Library, the object code for the work may be a 254 | derivative work of the Library even though the source code is not. 255 | Whether this is true is especially significant if the work can be 256 | linked without the Library, or if the work is itself a library. The 257 | threshold for this to be true is not precisely defined by law. 258 | 259 | If such an object file uses only numerical parameters, data 260 | structure layouts and accessors, and small macros and small inline 261 | functions (ten lines or less in length), then the use of the object 262 | file is unrestricted, regardless of whether it is legally a derivative 263 | work. (Executables containing this object code plus portions of the 264 | Library will still fall under Section 6.) 265 | 266 | Otherwise, if the work is a derivative of the Library, you may 267 | distribute the object code for the work under the terms of Section 6. 268 | Any executables containing that work also fall under Section 6, 269 | whether or not they are linked directly with the Library itself. 270 | 271 | 6. As an exception to the Sections above, you may also combine or 272 | link a "work that uses the Library" with the Library to produce a 273 | work containing portions of the Library, and distribute that work 274 | under terms of your choice, provided that the terms permit 275 | modification of the work for the customer's own use and reverse 276 | engineering for debugging such modifications. 277 | 278 | You must give prominent notice with each copy of the work that the 279 | Library is used in it and that the Library and its use are covered by 280 | this License. You must supply a copy of this License. If the work 281 | during execution displays copyright notices, you must include the 282 | copyright notice for the Library among them, as well as a reference 283 | directing the user to the copy of this License. Also, you must do one 284 | of these things: 285 | 286 | a) Accompany the work with the complete corresponding 287 | machine-readable source code for the Library including whatever 288 | changes were used in the work (which must be distributed under 289 | Sections 1 and 2 above); and, if the work is an executable linked 290 | with the Library, with the complete machine-readable "work that 291 | uses the Library", as object code and/or source code, so that the 292 | user can modify the Library and then relink to produce a modified 293 | executable containing the modified Library. (It is understood 294 | that the user who changes the contents of definitions files in the 295 | Library will not necessarily be able to recompile the application 296 | to use the modified definitions.) 297 | 298 | b) Use a suitable shared library mechanism for linking with the 299 | Library. A suitable mechanism is one that (1) uses at run time a 300 | copy of the library already present on the user's computer system, 301 | rather than copying library functions into the executable, and (2) 302 | will operate properly with a modified version of the library, if 303 | the user installs one, as long as the modified version is 304 | interface-compatible with the version that the work was made with. 305 | 306 | c) Accompany the work with a written offer, valid for at 307 | least three years, to give the same user the materials 308 | specified in Subsection 6a, above, for a charge no more 309 | than the cost of performing this distribution. 310 | 311 | d) If distribution of the work is made by offering access to copy 312 | from a designated place, offer equivalent access to copy the above 313 | specified materials from the same place. 314 | 315 | e) Verify that the user has already received a copy of these 316 | materials or that you have already sent this user a copy. 317 | 318 | For an executable, the required form of the "work that uses the 319 | Library" must include any data and utility programs needed for 320 | reproducing the executable from it. However, as a special exception, 321 | the materials to be distributed need not include anything that is 322 | normally distributed (in either source or binary form) with the major 323 | components (compiler, kernel, and so on) of the operating system on 324 | which the executable runs, unless that component itself accompanies 325 | the executable. 326 | 327 | It may happen that this requirement contradicts the license 328 | restrictions of other proprietary libraries that do not normally 329 | accompany the operating system. Such a contradiction means you cannot 330 | use both them and the Library together in an executable that you 331 | distribute. 332 | 333 | 7. You may place library facilities that are a work based on the 334 | Library side-by-side in a single library together with other library 335 | facilities not covered by this License, and distribute such a combined 336 | library, provided that the separate distribution of the work based on 337 | the Library and of the other library facilities is otherwise 338 | permitted, and provided that you do these two things: 339 | 340 | a) Accompany the combined library with a copy of the same work 341 | based on the Library, uncombined with any other library 342 | facilities. This must be distributed under the terms of the 343 | Sections above. 344 | 345 | b) Give prominent notice with the combined library of the fact 346 | that part of it is a work based on the Library, and explaining 347 | where to find the accompanying uncombined form of the same work. 348 | 349 | 8. You may not copy, modify, sublicense, link with, or distribute 350 | the Library except as expressly provided under this License. Any 351 | attempt otherwise to copy, modify, sublicense, link with, or 352 | distribute the Library is void, and will automatically terminate your 353 | rights under this License. However, parties who have received copies, 354 | or rights, from you under this License will not have their licenses 355 | terminated so long as such parties remain in full compliance. 356 | 357 | 9. You are not required to accept this License, since you have not 358 | signed it. However, nothing else grants you permission to modify or 359 | distribute the Library or its derivative works. These actions are 360 | prohibited by law if you do not accept this License. Therefore, by 361 | modifying or distributing the Library (or any work based on the 362 | Library), you indicate your acceptance of this License to do so, and 363 | all its terms and conditions for copying, distributing or modifying 364 | the Library or works based on it. 365 | 366 | 10. Each time you redistribute the Library (or any work based on the 367 | Library), the recipient automatically receives a license from the 368 | original licensor to copy, distribute, link with or modify the Library 369 | subject to these terms and conditions. You may not impose any further 370 | restrictions on the recipients' exercise of the rights granted herein. 371 | You are not responsible for enforcing compliance by third parties with 372 | this License. 373 | 374 | 11. If, as a consequence of a court judgment or allegation of patent 375 | infringement or for any other reason (not limited to patent issues), 376 | conditions are imposed on you (whether by court order, agreement or 377 | otherwise) that contradict the conditions of this License, they do not 378 | excuse you from the conditions of this License. If you cannot 379 | distribute so as to satisfy simultaneously your obligations under this 380 | License and any other pertinent obligations, then as a consequence you 381 | may not distribute the Library at all. For example, if a patent 382 | license would not permit royalty-free redistribution of the Library by 383 | all those who receive copies directly or indirectly through you, then 384 | the only way you could satisfy both it and this License would be to 385 | refrain entirely from distribution of the Library. 386 | 387 | If any portion of this section is held invalid or unenforceable under any 388 | particular circumstance, the balance of the section is intended to apply, 389 | and the section as a whole is intended to apply in other circumstances. 390 | 391 | It is not the purpose of this section to induce you to infringe any 392 | patents or other property right claims or to contest validity of any 393 | such claims; this section has the sole purpose of protecting the 394 | integrity of the free software distribution system which is 395 | implemented by public license practices. Many people have made 396 | generous contributions to the wide range of software distributed 397 | through that system in reliance on consistent application of that 398 | system; it is up to the author/donor to decide if he or she is willing 399 | to distribute software through any other system and a licensee cannot 400 | impose that choice. 401 | 402 | This section is intended to make thoroughly clear what is believed to 403 | be a consequence of the rest of this License. 404 | 405 | 12. If the distribution and/or use of the Library is restricted in 406 | certain countries either by patents or by copyrighted interfaces, the 407 | original copyright holder who places the Library under this License may add 408 | an explicit geographical distribution limitation excluding those countries, 409 | so that distribution is permitted only in or among countries not thus 410 | excluded. In such case, this License incorporates the limitation as if 411 | written in the body of this License. 412 | 413 | 13. The Free Software Foundation may publish revised and/or new 414 | versions of the Lesser General Public License from time to time. 415 | Such new versions will be similar in spirit to the present version, 416 | but may differ in detail to address new problems or concerns. 417 | 418 | Each version is given a distinguishing version number. If the Library 419 | specifies a version number of this License which applies to it and 420 | "any later version", you have the option of following the terms and 421 | conditions either of that version or of any later version published by 422 | the Free Software Foundation. If the Library does not specify a 423 | license version number, you may choose any version ever published by 424 | the Free Software Foundation. 425 | 426 | 14. If you wish to incorporate parts of the Library into other free 427 | programs whose distribution conditions are incompatible with these, 428 | write to the author to ask for permission. For software which is 429 | copyrighted by the Free Software Foundation, write to the Free 430 | Software Foundation; we sometimes make exceptions for this. Our 431 | decision will be guided by the two goals of preserving the free status 432 | of all derivatives of our free software and of promoting the sharing 433 | and reuse of software generally. 434 | 435 | NO WARRANTY 436 | 437 | 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO 438 | WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. 439 | EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR 440 | OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY 441 | KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE 442 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 443 | PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE 444 | LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME 445 | THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 446 | 447 | 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN 448 | WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY 449 | AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU 450 | FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR 451 | CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE 452 | LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING 453 | RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A 454 | FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF 455 | SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH 456 | DAMAGES. 457 | 458 | END OF TERMS AND CONDITIONS 459 | 460 | How to Apply These Terms to Your New Libraries 461 | 462 | If you develop a new library, and you want it to be of the greatest 463 | possible use to the public, we recommend making it free software that 464 | everyone can redistribute and change. You can do so by permitting 465 | redistribution under these terms (or, alternatively, under the terms of the 466 | ordinary General Public License). 467 | 468 | To apply these terms, attach the following notices to the library. It is 469 | safest to attach them to the start of each source file to most effectively 470 | convey the exclusion of warranty; and each file should have at least the 471 | "copyright" line and a pointer to where the full notice is found. 472 | 473 | {description} 474 | Copyright (C) {year} {fullname} 475 | 476 | This library is free software; you can redistribute it and/or 477 | modify it under the terms of the GNU Lesser General Public 478 | License as published by the Free Software Foundation; either 479 | version 2.1 of the License, or (at your option) any later version. 480 | 481 | This library is distributed in the hope that it will be useful, 482 | but WITHOUT ANY WARRANTY; without even the implied warranty of 483 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 484 | Lesser General Public License for more details. 485 | 486 | You should have received a copy of the GNU Lesser General Public 487 | License along with this library; if not, write to the Free Software 488 | Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 489 | USA 490 | 491 | Also add information on how to contact you by electronic and paper mail. 492 | 493 | You should also get your employer (if you work as a programmer) or your 494 | school, if any, to sign a "copyright disclaimer" for the library, if 495 | necessary. Here is a sample; alter the names: 496 | 497 | Yoyodyne, Inc., hereby disclaims all copyright interest in the 498 | library `Frob' (a library for tweaking knobs) written by James Random 499 | Hacker. 500 | 501 | {signature of Ty Coon}, 1 April 1990 502 | Ty Coon, President of Vice 503 | 504 | That's all there is to it! -------------------------------------------------------------------------------- /docs/README.md: -------------------------------------------------------------------------------- 1 | VHS 2 | === 3 | 4 | Video Handler Script by sea, using [ffmpeg](http://ffmpeg.org) and [TUI](https://github.com/sri-arjuna/tui) 5 | 6 | Is it an audio extractor? 7 | Is it a stream caster? 8 | Is it a webradio player? 9 | Is it a video converter? 10 | Is it a video player? 11 | Yes, and more! 12 | 13 | 14 | Tabele of Content 15 | ----------------- 16 | * Intro 17 | * What it was... 18 | * What does it do? 19 | * Tools 20 | * Examples : Command length 21 | * Examples : Usage 22 | * Installation 23 | 24 | Intro 25 | ----- 26 | 27 | I'm a lazy guy, and eventhough i love the power of the console, one cannot remember/know all of the options and arguments of every tool there is. 28 | This said, i wanted to make my use of ffmpeg a little easier. 29 | 30 | What started as a simple script to mass-encode videos to save discspace, became a quite powerfull tool around ffmpeg. 31 | It was never supposed to be, but now it is my favorite web radio player :D 32 | 33 | Rather than typing a complex line of a single command, with the change of a letter, you can record from your webcam, your desktop or combine the both in a guide video. 34 | Encoding files, automaticly increases a naming number, so no file gets overwritten. 35 | 36 | Even for dvd encoding, for which it requires __vobcopy__ to be installed, in best case scenario, it reads the dvd its name, and uses that automaticly for the output name. 37 | 38 | 39 | What it was... 40 | -------------- 41 | 42 | Initialy, all i wanted was to have a script i could throw video files at, 43 | and it would encode them: 44 | * to my favorite codec 45 | * with my favorite resolution 46 | * at my favorite bitrates 47 | 48 | At first i became quote busy just accomplishing that single task, and at some point, figured ffmpeg can encode vob files too. 49 | So i then tried to include that, while trying that, figured ffmpeg could record from webcam, record the desktop and do streaming tasks too. 50 | 51 | 52 | What it became... 53 | ----------------- 54 | Well, at that point i had to do a partial rewrite of VHS to accomplish all the new tasks, which i certainly like. 55 | By now, for my needs it replaces: 56 | * ogmrip (dvd-ripper) 57 | * {gtk|qt-}recordMyDesktop (screenrecording) 58 | * Rythmbox (which i just used to listen webradio) 59 | * totem/vlc (to play videos/music - music even in multiuser.stage) 60 | 61 | So if you are aiming for an OS with as less possible packages/space usage, VHS is the way to go! 62 | While these named packages themself just require like ~20 mb, their dependencies grow quickly to aprox around 150mb pulling a quite amount of libs with them. 63 | 64 | 65 | What does it do? 66 | ---------------- 67 | All the features below can be quick access'ed by simply passing 1 option to vhs, and if required the input files of concern. 68 | * Make ffmpeg silent, as it expects the commands to work properly 69 | * Encode files to save space. 70 | * Rearange audio streams 71 | * Extract time segments or just samples (1min) 72 | * Extract audio / subtitle 73 | * Add audio or subtitle stream 74 | * Add another video stream as pip (there are presets for orientation) 75 | * Join/concat audio or video files 76 | * Enable, Remove or rearange subtitles 77 | * Stream/Record Webcam 78 | * Stream/Record Desktop 79 | * Stream/Record Guide (the two above, webcam as pip) 80 | * Streamserver, Audio or Video 81 | * Streamplayer, Audio or Video 82 | * Make a backup of your DVD 83 | 84 | 85 | Tools 86 | ----- 87 | Recently i've added some handy tools. 88 | 89 | __vhs calc__ ___[cd|dvd|br #files ~#min]___ 90 | 91 | __vhs calc__ Would start the tool, and ask you for the storage device, the amount of files, and their average playtime. 92 | __vhs calc dvd 32 20__ Does pass all that information on the call and just prints the result. 93 | 94 | __vhs ip__ Simply prints your external (wan) and internal (lan) IP adresses. 95 | 96 | IN-PLANNING __vhs build-ffmpeg [CHROOT]__ Will pull in all source code and compile ffmpeg pulling in as many possible features as possible. 97 | CHROOT by default will be $HOME/.local, during compilation, the PREFIX will then be $CHROOT/usr -> $HOME/.local/usr. 98 | 99 | 100 | Examples : Command length 101 | ------------------------- 102 | 103 | So for lazy people like me, i usualy just call the first line, rather than the second... 104 | 105 | Using subtitles and use 'full' preset Quality *-Q RES* 106 | 107 | vhs -tQ fhd inputfile 108 | ffmpeg -i "inputfile" -strict -2 -map 0:0 -b:v 1664K -vf scale=1920x1080 -c:v libx264 -minrate 3328K -maxrate 3328K -bufsize 1664K -b:a 256K -ac 2 -c:a ac3 -c:s ssa -map 0:3 -map 0:1 "outputfile" 109 | 110 | 111 | Or to record whats going on on the desktop 112 | 113 | vhs -S 114 | ffmpeg -f x11grab -video_size 1920x1080 -i :0 -f alsa -i default -strict -2 -f mp4 "outputfile" 115 | 116 | Or even take the desktop as background, and the webcam as a pip-overlay (orient- and sizeable): 117 | 118 | vhs -Gp br480 119 | ffmpeg -f v4l2 -s 1280x720 -framerate 25 -i /dev/video0 -f x11grab -video_size 1920x1080 -framerate 25 -i :0 -f alsa -i default -filter_complex '[0:v:0] scale=480:-1 [a] ; [1:v:0][a]overlay=1440:main_h-overlay_h-0' -c:v libx264 -crf 23 -preset veryfast -c:a ac3 -q:a 4 -strict -2 "/home/sea/mm/vid/guide-out.8.mkv" 120 | 121 | 122 | Examples : Usage 123 | ---------------- 124 | 125 | vhs [/path/to/]file # Encodes a specific file 126 | vhs * # Encodes all files in current directory 127 | vhs -b a128 -b v256 files # Encode a video with given bitrates in kbytes 128 | vhs -B files # Encode a video with default bitrates (vhs.conf) 129 | vhs -c vlibx265 -c alibfaac files # Encode a file with given codecs 130 | vhs -e XY files # Encode a video with container XY rather than favorite from vhs.conf 131 | vhs -w files ... # Encode a video and move info flags in front (web/streaming) 132 | vhs -v files ... # Encode a video and (ffmpeg) be verbose (good to see why it failed) 133 | vhs -y files ... # Copy streams - dont encode 134 | vhs -U files ... # Upstream passed files, to favorite upstream ID (urls.stream) 135 | vhs -SU # Upstream desktop, to favorite (default) upstream ID 136 | vhs -vPU # Play videostream from your most favorite (default) playstream id (vhs.conf) 137 | vhs -vPP # Play videostream from one of the prevously played streams (urls.play) 138 | vhs -Pu adress # Play audio stream from adress (urls.play) 139 | 140 | 141 | Debuging: 142 | --------- 143 | 144 | There are times where the default settings, generated command, does not work. 145 | If that happens, you might want to change to verbose mode (-v) to get the error message produced by ffmpeg. 146 | There is also a chance to modify the generated command before it gets executed by passing _-A_. 147 | 148 | If you still want more output, there you go: 149 | 150 | # Script itself beeing verbose (not '-x', but still debug)) 151 | vhs -V[options] [filename] 152 | 153 | # ffmpeg beeing verbose 154 | vhs -v[options] [filename] 155 | 156 | # To report a bug, please use the output of these two (with the first one modified) lines: 157 | vhs -vV[youroptions] ["inputfile"] 158 | tail ~/.config/vhs/vhs.log 159 | 160 | 161 | Installation: 162 | ------------- 163 | 164 | su 165 | cd /usr/src 166 | git clone https://github.com/sri-arjuna/vhs.git 167 | cd vhs 168 | 169 | ./configure --prefix=/usr 170 | ./make-install 171 | 172 | To uninstall, it is quite the same: 173 | 174 | su 175 | cd /usr/src/vhs 176 | ./make-uninstall 177 | cd .. 178 | rm -fr vhs 179 | -------------------------------------------------------------------------------- /docs/vhs.1: -------------------------------------------------------------------------------- 1 | .ig 2 | vhs - Video Handler Script 3 | Copyright (C) März 07 by Simon Arjuna Erat (sea) - erat.simon@gmail.com 4 | .. .................................................... 5 | .TH "vhs" 1 "2015-03-07" "Simon Arjuna Erat (sea)" "Video Handler Script, using ffmpeg" 6 | 7 | 8 | 9 | .SH NAME 10 | vhs (1.3.3) 11 | 12 | 13 | 14 | .SH SYNOPSIS 15 | \fBvhs\fP 16 | .OP options 17 | .RI "[input files ...]" 18 | .br 19 | 20 | 21 | 22 | .SH DESCRIPTION 23 | VHS, the Video Handler Script is a wrapper script for FFMPEG. It aims to ease repeating tasks to one's personal favorite settings. 24 | .br 25 | Only the container and language settings apply to each and every call of VHS, all other default values must be enabled/set/changed by the options passed. 26 | .br 27 | To configure the default values used by VHS, please pass 28 | .B vhs -C 29 | to the use the configuration menu, or edit the file directly. See its place in the 30 | .B vhs -h 31 | output. 32 | .br 33 | VHS is ment to simplify these tasks: 34 | .RS 3 35 | .B 1. 36 | Convert to another container / video format 37 | .br 38 | .B 2. 39 | Reduce Video filesize 40 | .br 41 | .B 3. 42 | Screenrecording 43 | .br 44 | .B 4. 45 | Webcam recording 46 | .br 47 | .B 5. 48 | Guide recording (screen with webcam as pip) 49 | .br 50 | .B 6. 51 | Creating Video-DVD backups 52 | .br 53 | .B 7. 54 | Create Videofiles to be played on smartphones 55 | .br 56 | .B 8. 57 | Extract audio/subtitle stream/s 58 | .br 59 | .B 9. 60 | Add audio-/subtitle stream 61 | .RE 62 | 63 | 64 | 65 | .SH OPTIONS 66 | .OP "-2" 67 | .RS 4 68 | Use 2-pass encoding for every output video. 69 | .RE 70 | 71 | .OP "-a FILE" 72 | .RS 4 73 | Add passed FILE. 74 | .br 75 | Most prefered to add another audio stream or supply subtitles. 76 | .RE 77 | 78 | .OP "-A" 79 | .RS 4 80 | Advanced mode. 81 | .br 82 | Opens a text editor to edit the generated command before its execution. 83 | .RE 84 | 85 | .OP "-b [av]NUM" 86 | .RS 4 87 | Use either 'a' or 'v' to define if the kilobitrate NUM is used for audio or video. 88 | .RE 89 | 90 | .OP "-B" 91 | .RS 4 92 | Use the default bitrates for both audio and video from the default configuration. 93 | .br 94 | See: $HOME/.config/vhs/vhs.conf 95 | .RE 96 | 97 | .OP "-c [atv]NAME" 98 | .RS 4 99 | Set the codec used for audio, subtitle or video to NAME. 100 | .RE 101 | 102 | .OP "-C" 103 | .RS 4 104 | Opens the configuration menu. 105 | .RE 106 | 107 | .OP "-d RES" 108 | .RS 4 109 | Dimension. 110 | .br 111 | Sets the outputvideo-width according to RES, but keeps aspect ratio: "'RES:-1'" 112 | .RE 113 | 114 | .OP "-D" 115 | .RS 4 116 | Encodes a DVD. 117 | .RE 118 | 119 | .OP "-e CONTAINER" 120 | .RS 4 121 | Saves the output as CONTAINER. 122 | .br 123 | Where CONTAINER can be one of: 124 | .br 125 | .I aac ac3 avi dts flac flv mkv mp3 mp4 mpeg ogg ogv theora vorbis wav webm wma wmv xvid 126 | .RE 127 | 128 | .OP "-f FPS" 129 | .RS 4 130 | Forces to use "'FPS'" fps. 131 | .RE 132 | 133 | .OP "-F" 134 | .RS 4 135 | Force to use the default (25) FPS rate. 136 | .RE 137 | 138 | .OP "-G" 139 | .RS 4 140 | Records the full desktop and uses the webcam for PiP (picture in picture). 141 | .br 142 | See the PiP option for more details. 143 | .RE 144 | 145 | .OP "-i" 146 | .RS 4 147 | For every passed file it prints its name and lists its available streams. 148 | .RE 149 | 150 | .OP "-I ID" 151 | .RS 4 152 | Where ID is a valid number of an audio stream of the current inputfile. 153 | .br 154 | Pass this for any ID wanted, or use quotes to pass multiple stream IDs at once. 155 | .RE 156 | 157 | .OP "-j" 158 | .RS 4 159 | Copy mjpeg (video-icon-image). 160 | .br 161 | Also used to copy other attachments such as fonts. 162 | .RE 163 | 164 | .OP "-K" 165 | .RS 4 166 | Opens a dialog to select which VHS background job/task shall be killed. 167 | .br 168 | Note that all encoding, recording and saving are done in background by default, to limit the visible output. 169 | .RE 170 | 171 | .OP "-l LNG" 172 | .RS 4 173 | If you want to include more than the default languages, use this to add/include as many languages you want. 174 | .br 175 | You can either add each language by its own, or list them within quotes. 176 | .RE 177 | 178 | .OP "-L" 179 | .RS 4 180 | See the logfile. 181 | .RE 182 | 183 | .OP "-p LOCATION[NUM]" 184 | .RS 4 185 | Where LOCATION is one of: 186 | .br 187 | .I tl, tc, tr, br, bc, bl, cl, cc, cr 188 | .br 189 | Optional one could add, without space, the number of the pip width, default is 320. 190 | .RE 191 | 192 | .OP "-q RES" 193 | .RS 4 194 | Encodeds the video to RES settings, preserves aspect ratio, but might produces border. 195 | .br 196 | Where RES is one of the labels of the presets. 197 | .br 198 | Same as: 199 | .B vhs -Q vga -d vga inputvideo 200 | .RE 201 | 202 | .OP "-Q RES" 203 | .RS 4 204 | Encodeds the video to RES settings, might become streched. 205 | .br 206 | Where RES is one of the labels of the presets. 207 | .RE 208 | 209 | .OP "-r RATE" 210 | .RS 4 211 | Use audio frequency rate RATE. 212 | .br 213 | This is usualy one of the three values: 44100, 48000 or 96000. 214 | .RE 215 | 216 | .OP "-R" 217 | .RS 4 218 | Use default audio frequency rate. 219 | .br 220 | See: $HOME/.config/vhs/vhs.conf 221 | .RE 222 | 223 | .OP "-S" 224 | .RS 4 225 | Saving the screen stream, using internal microphon for audio. 226 | .RE 227 | 228 | .OP "-t" 229 | .RS 4 230 | Enables the saving of subtitles. 231 | .br 232 | Beside your two favorite langauges, only languages provided will be saved. 233 | .br 234 | See 235 | .B -l LNG 236 | for more details. 237 | .RE 238 | 239 | .OP "-T TIME" 240 | .RS 4 241 | Sets the timeout between multiple video encodings. 242 | .br 243 | TIME can be any positive integer number, followed by either 's' for second, 'm' for minute or 'h' for hour. 244 | .br 245 | As in: 246 | .B vhs -T 5m * 247 | .RE 248 | 249 | .OP "-v" 250 | .RS 4 251 | Verbose mode (classic), shows the default output of ffmpeg. 252 | .RE 253 | 254 | .OP "-V" 255 | .RS 4 256 | Verbose mode (tui), shows more detailed information of vhs. 257 | .RE 258 | 259 | .OP "-w" 260 | .RS 4 261 | Web-Optimized, moves the video info block to front of the file. 262 | .RE 263 | 264 | .OP "-W" 265 | .RS 4 266 | Records a video using your webcam. 267 | .br 268 | Set the default resolution of the recording quality in the configuration menu. 269 | .B (-C) 270 | .br 271 | VHS will read out the properties of your webcam and lets you choose among reckognized modes. 272 | .RE 273 | 274 | .OP "-x" 275 | .RS 4 276 | Clean the logfile, overwrite with an empty logfile. 277 | .RE 278 | 279 | .OP "-X" 280 | .RS 4 281 | Remove all custom VHS settings and start new. 282 | .RE 283 | 284 | .OP "-y" 285 | .RS 4 286 | Simply copies ALL streams from input to output file. Fake encoding. 287 | .RE 288 | 289 | .OP "-z 1:23[-1:04:45[.15]" 290 | .RS 4 291 | Encodes 1 minute from given start time, or until provided end-time-mark. 292 | .RE 293 | 294 | 295 | .SH EXAMPLES 296 | At all times, without any required arguments, the output file will be as configured in the config file (default: mkv). 297 | .br 298 | You can change to any container you want, for a one-time-use, by passing 299 | .B "-e webm" 300 | so it would encode 'this' video to webm. 301 | .br 302 | If you change the container/extension to an audio format, it will output an audiofile only. 303 | .br 304 | At each call, you'll be presented an invoked call of 305 | .B vhs -i inputfile 306 | to show the file its streams. 307 | 308 | .IP "vhs filename" 309 | Will encode 'filename' according to your configured favorite settings 310 | 311 | .IP "vhs -e mp3 -I 1 -z 3:41.15-1:16:21.007 InputVideo.webm" 312 | This will extract the audio stream #1 from InputVideo.webm starting at 3 minutes 41 seconds and 150 milisecs and stops at 1 hour 16 minutes 21 seconds and 7 miliseconds, saving it as mp3. 313 | 314 | .IP "vhs -Dq qvga" 315 | Use this to prepare a DVD for your smartphone. 316 | 317 | .IP "vhs -Dtl jpn" 318 | This will encode the DVD/BR/LD in your drive, including subtitles and add japanese to the list of langauges, both, subtitle and audio. 319 | .br 320 | Note that you can configure vhs to use only one, or two langauges by default for all your output files. 321 | 322 | .IP "vhs -SQ yt-1080" 323 | Will record your screen and save the file at youtube bitrates as 1920x1080 video. 324 | .br 325 | Note that if your desktop/screen resolution is smaller, you have no benefit but a larger file. 326 | 327 | .IP "vhs -Wq yt-720" 328 | This will require your computer to have a webcam connected or internaly enabled, and will save the output video at youtube presets for HD Ready videos, preserving the aspect ratio of your webcam (eg: 640:-1) 329 | .br 330 | If you just want to do your personal video log, it could be reduced to: 331 | .B "vhs -W" 332 | 333 | 334 | 335 | .SH FREQUENTLY ASKED QUESTIONS (FAQ) 336 | .B 1. "When i want to save a video with subtitles it keeps failing." 337 | .br 338 | Try to just copy the subtitle codec by passing 339 | .B -c tcopy 340 | 341 | .br 342 | .B 2. "I have many files to encode, and it keeps asking me to select which language to choose for each file." 343 | .br 344 | Assuming the desired language is always on the same stream id, you could use: 345 | .B vhs -I 1 inputvideo 346 | .br 347 | If you want to include multiple audio streams, and want to avoid beeing asked for each video, you could use either one of: 348 | .br 349 | * 350 | .B vhs -I "'3 4'" inputvideo 351 | .br 352 | * 353 | .B vhs -I 3 -I 4 inputvideo 354 | .br 355 | 356 | .B 3. "After saving subtitles with a video, the font looks diffrent." 357 | .br 358 | Have you made sure the attachments were used, using the 359 | .B -j 360 | toggle? 361 | 362 | 363 | 364 | 365 | .SH SEE ALSO 366 | .B ffmpeg 367 | (1), 368 | .B tui 369 | (1), 370 | .B vobcopy 371 | (1) 372 | 373 | 374 | 375 | .SH LICENSE 376 | GNU General Public License (GPL) 377 | .br 378 | http://www.gnu.org/licenses/gpl.html 379 | 380 | 381 | 382 | .SH CONTACT 383 | erat.simon@gmail.com 384 | .br 385 | http://linux-scripter.blogspot.com 386 | 387 | 388 | 389 | .SH BUG REPORTS 390 | Please visit "https://github.com/sri-arjuna/vhs/issues" to report bugs or other feedback 391 | -------------------------------------------------------------------------------- /files/build-rpm-vhs.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # ------------------------------------------------------------------------ 3 | # 4 | # Copyright (c) 2014 by Simon Arjuna Erat (sea) 5 | # All rights reserved. 6 | # 7 | # This program is free software: you can redistribute it and/or modify it 8 | # under the terms of the GNU Lesser General Public License as published 9 | # by the Free Software Foundation, either version 3 of the License, or 10 | # (at your option) any later version. 11 | # 12 | # This program is distributed in the hope that it will be useful, 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | # GNU Lesser General Public License for more details. 16 | # 17 | # You should have received a copy of the GNU Lesser General Public License 18 | # along with this program. If not, see 19 | # 20 | # ------------------------------------------------------------------------ 21 | # 22 | # Builds an rpm package for VHS 23 | # 24 | # 25 | # 26 | # Variables 27 | # 28 | . $HOME/.config/fas/fas.conf 29 | app=vhs 30 | target=noarch 31 | [[ -z $1 ]] && \ 32 | dir_out="$FAS_REVIEW/$app" || \ 33 | dir_out="$1" 34 | ext=tar.gz 35 | # If this is not found, retrieve code from git 36 | CHECK_FOR=$app.sh 37 | HUB_USER=sri-arjuna 38 | GIT=https://github.com/$HUB_USER/$app.git 39 | #build_link=/usr/bin/rpm-build-$app 40 | # Get script & spec homedir 41 | [[ "." = "$(basename $0)" ]] && \ 42 | home="$(pwd)" || \ 43 | home="$(dirname $0)" 44 | oPWD=$(pwd) 45 | # 46 | # Prepare 47 | # 48 | cd "$home" 49 | [[ -d $HOME/rpmbuild ]] && rpmdev-wipetree 50 | [[ -d "$dir_out" ]] || mkdir -p "$dir_out" 51 | rpmdev-setuptree > /dev/zero 52 | [[ -f "$CHECK_FOR" ]] || ( git clone $GIT ../$app ) #; cd ../$app ) 53 | # 54 | # Version & tarball name 55 | # 56 | VER=$(grep -i "Version:" "$app.spec"|awk '{print $2}') 57 | TARBALL=$app-$VER.$ext #$(basename $(grep -i "Source0:" "$app.spec"|grep -v ^"#"|awk '{print $2}')) 58 | # 59 | # Place file in rpmbuild and $dir_out 60 | # 61 | cp $app.spec $HOME/rpmbuild/SPECS 62 | cp $app.spec "$dir_out" 63 | [[ -d ../$app ]] || (mkdir ../$app;cp -r * ../$app ) 64 | tar -acf $dir_out/$TARBALL ../$app 65 | ln -sf $dir_out/$TARBALL $HOME/rpmbuild/SOURCES/$TARBALL 66 | # 67 | # Build 68 | # 69 | rpmbuild -ba $app.spec --target=$target|| exit 70 | # 71 | # Get packages 72 | # 73 | cd "$HOME"/rpmbuild 74 | raw=$(find | grep $app | grep rpm) 75 | mv $raw "$dir_out" 76 | 77 | cd "$dir_out" 78 | pwd 79 | ls $dir_out/ | grep $app 80 | # 81 | # Clean up 82 | # 83 | rpmdev-wipetree 84 | rm -fr $HOME/rpmbuild 85 | cd "$oPWD" 86 | -------------------------------------------------------------------------------- /files/vhs-desc: -------------------------------------------------------------------------------- 1 | Video Helper Script / VHS 2 | Be adviced that this script is ment to simply encode a video to some default container/extension and using its default codecs. 3 | It is also ment to require at least a one time setup - review of default values, for the aim of a prefered default output format. 4 | 5 | 6 | If no arguments but a video file is submited, it will be using the original video bitrates to encode to the default container. 7 | If the source container is the same as the default container, it will be named like VIDEO.0.CONTAINER, where 0 be increased if it already exists. 8 | 9 | 10 | Eventhough i first wanted to ease the achievment of FOSS encoded videos on my NAS, my TV doesnt support them. 11 | Therefor it is using Matroska as default, understand that you must have the required codecs installed from http://repo.rpmfusion.org or similar. 12 | 13 | 14 | Also since my prefered 'quality' is HD Ready (1280*720), the default bitrates are set accordingly. 15 | If you like this default bitrates that may be used using '-B', you can change them per call using: '-b v2048' for video or '-b a512' for audio bitrates. 16 | In the same way you could change the used codecs by passing: '-c vbmp -c awavpack' 17 | 18 | 19 | If you want to encode a video to another than your defaul container, you may do so by passing: '-e mp4' 20 | Please understand that as of now only 4 containers/extensions are supported:: webm ogg mkv mp4 21 | Allthough there are more container files in the folder, the use of the unused is still in planing. 22 | 23 | 24 | sea's preferences / suggestions: 25 | -------------------------------------- 26 | Kind: ~Resolution: Audio: Video: 27 | VHS 576*360 128k 256k 28 | CLIP 640*480 128k 384k 29 | DVD 720*576 192k 512k 30 | HDR 1280*720 192k 768k 31 | FHD 1920*1080 256k 1024k 32 | (for very small video files at good quality to be played on a: Full HD TV with internal Stereo boxes) 33 | (note that for the output to be of good quality, the source file must be good quality too!) 34 | 35 | 36 | 37 | 38 | 001-015 39 | drwxrwxrwx. 1 root root 8.0K 6. Aug 15:01 016-030 40 | drwxrwxrwx. 1 root root 8.0K 6. Aug 15:51 031-045 41 | drwxrwxrwx. 1 root root 8.0K 6. Aug 16:42 046-060 42 | drwxrwxrwx. 1 root root 8.0K 6. Aug 17:33 061-075 43 | drwxrwxrwx. 1 root root 8.0K 6. Aug 18:24 076-090 44 | 45 | 46 | 001* 031* 046* 47 | 046* 061* 076* 48 | 091* 106* 121* 136* 49 | 50 | VALS="001* 031* 046*" 51 | for D in $VALS;do cd "$(pwd)/"$(ls -d $D); vhs -t 45 -b a128 -b v256 *; cd ..; sleep 60; done 52 | 53 | # for D in *;do cd $D; vhs -t 45 -b a128 -b v256 *; cd ..; sleep 60; done 54 | -------------------------------------------------------------------------------- /files/vhs.spec: -------------------------------------------------------------------------------- 1 | Name: vhs 2 | Version: 2.6 3 | Release: 1%{?dist} 4 | Summary: Video Handler Script, using ffmpeg 5 | 6 | License: GPLv3 7 | URL: https://github.com/sri-arjuna/vhs 8 | Source0: %{name}-%{version}.tar.gz 9 | 10 | BuildArch: noarch 11 | Requires: tui 12 | Requires: ffmpeg 13 | Requires: mkvtoolnix 14 | Requires: v4l-utils 15 | Requires: vobcopy 16 | # gstreamer1 gstreamer1-plugins-{good,bad-free,ugly,base} gstreamer1-plugins-{base-tools,good-extras,bad-freeworld} faac 17 | # 18 | 19 | # Not yet there, need to write handler for these, 20 | # if i'm going to implement (need) all this 21 | #Requires: ogmtools 22 | #Requires: oggvideotools 23 | #Requires: theora-tools 24 | #Requires: vorbis-tools 25 | #Requires: speex-tools 26 | #Requires: swftools 27 | #Requires: mjpegtools 28 | 29 | %description 30 | A Script to handle many different multimedia tasks. 31 | * Re-encode existing videos 32 | * Capture web cam 33 | * Capture desktop 34 | * Capture webcam as PiP over desktop 35 | * Extract audio stream from video files 36 | * Include audio-, subtitle streams 37 | * Include PiP Video 38 | * Include Logoimage (Top Left fixed) 39 | * Encode DVD 40 | * Streaming / server 41 | 42 | %prep 43 | %setup -q -c %{name}-%{version} 44 | 45 | %build 46 | # Nothing to do 47 | cd %{name} 48 | ./configure --prefix=/usr --sysconfdir=%{_sysconfdir} --compldir=%{_sysconfdir}/bash_completion.d --chroot=$RPM_BUILD_ROOT 49 | 50 | %install 51 | rm -rf $RPM_BUILD_ROOT 52 | cd %{name} 53 | 54 | mkdir -p %{buildroot}%{_bindir}/ \ 55 | %{buildroot}%{_datarootdir}/%{name} \ 56 | %{buildroot}%{_mandir}/man1 \ 57 | %{buildroot}%{_sysconfdir}/bash_completion.d/ 58 | #rm -fr %{name}/.git 59 | #mv %{name}/files/vhs.sh %{buildroot}%{_bindir}/vhs 60 | #mv %{name}/files/vhs.1 %{buildroot}%{_mandir}/man1 61 | #mv %{name}/files/%{name}_compl.bash %{buildroot}%{_sysconfdir}/bash_completion.d/ 62 | #mv %{name}/docs/[ILR]* %{buildroot}%{_datarootdir}/%{name} 63 | ./make-install 64 | 65 | %files 66 | %doc %{_docdir}/%{name}/* 67 | ##{_datarootdir}/bash_completion/%{name}_compl.bash 68 | %{_sysconfdir}/bash_completion.d/%{name}_compl.bash 69 | %{_mandir}/man1/%{name}*.1.gz 70 | %{_bindir}/vhs 71 | 72 | %changelog 73 | * Mon Sep 21 2015 Simon A. Erat 2.6 74 | - Version update 75 | 76 | * Sun Jun 21 2015 Simon A. Erat 2.5 77 | - Update: Screenrecording can now record just a Zone range (-Z args) 78 | - Updated: vhs works with the new tuirc. 79 | 80 | * Mon Jun 1 2015 Simon A. Erat 2.2.2 81 | - Fixed: Some files (audio streams) could not be identfied 82 | - on systems with non-english locales. 83 | - Updated: Playmode now shows progressbar for files 84 | - Changed: Several stream checks got messed up because of PlayStatus 85 | 86 | * Sun May 17 2015 Simon A. Erat 2.2 87 | - Changed: Some temp file variable names 88 | - Fixed: Outputfile name when exporting audio 89 | - Fixed: When encoding videos, progressbar should match now 90 | - Updated: Selection of playstreams should now match terminal width 91 | 92 | * Thu Apr 09 2015 Simon A. Erat 2.1 93 | - Added: Bit Calculator, vhs calc 94 | - Added: Ip lister, vhs ip 95 | - Changed: Rearanged project files 96 | - Changed: README.md 97 | - Added: INSTALL.md & install.sh 98 | - Fixed: Audio extraction using the passed codec again 99 | 100 | 101 | * Sun Mar 29 2015 Simon A. Erat 2.0 102 | - Added: Stream Play 103 | - Added: Stream Server, Webcam, Screen, Guide, Video 104 | - Added: History re-select for Stream Play/Serve individualy 105 | - Updated: Now can encode multiple files to audio 106 | 107 | * Fri Mar 27 2015 Simon A. Erat 1.3.5 108 | - Updated: corrected filesize calculation 109 | - Updated: during verbose ffmpeg progress bar is no longer shown 110 | - Updated: Now can change volume 111 | - Updated: Now can merge/join/append video files. 112 | - Updated: Now uses a single file to handle all containers 113 | 114 | * Wed Mar 25 2015 Simon A. Erat 1.3.4 115 | - Updated: Encoding videos show now a progress bar 116 | 117 | * Tue Mar 10 2015 Simon A. Erat 1.3.4 118 | - Updated: DVD: Encoding no longer stops after vobcopy, ty Robert. 119 | - Fixed: DVD: Audio selection menu, tried to include stream 'done' 120 | - Updated: DVD: Vobcopy offers alternative copy ways, 121 | - only use if default fails! 122 | - Updated: DVD: Vobcopy using specific title works now. 123 | - Updated: presets 124 | - -now calculates the expected 1 min filesize 125 | - -when adding ntsc & pal, helpoutput gets cut 126 | - Updated: Removed some commented out lines 127 | 128 | * Sat Mar 07 2015 Simon A. Erat 1.3.3 129 | - Updated: Encoded-by information is no longer in the description 130 | - Updated: To copy (only) subtitle codecs, use: '-c tcopy' 131 | - previous it was 'scopy' 132 | - Fixed: Issue with reading attachmet ids 133 | - Updated: The '-j' toggle now includes ALL attachments (Fonts, etc) 134 | - Added: Finaly added a manpage. 135 | 136 | * Thu Feb 26 2015 Simon A. Erat 1.3.2 137 | - Updated: Bash completition reads now the qualtiy from file 138 | - Updated: Screenrecording now takes quality argument 139 | 140 | * Tue Feb 17 2015 Simon A. Erat 1.3.1 141 | - Updated: Default preset video bitrates increased 142 | - This should improve first time experience drasticly 143 | - for the visual oriented enduser 144 | - Updated: Japan is pushing 8k, vhs is prepared 145 | - Fixed: Overwrote existing XDG_VIDEOS_DIR variable 146 | - Added: Anime and Youtube presets 147 | 148 | * Wed Feb 11 2015 Simon A. Erat 1.3 149 | - Updated: Presets are now stored in a file 150 | - Updated: bash completion for dynamic readout 151 | - Updated: Guide-, Screen- and Webcam videos 152 | - are now stored in $XDG_VIDEOS_DIR (~/Videos) 153 | - Fixed: Failure on ISO streams 154 | - Fixed: Audio selection if none could be recognized 155 | 156 | * Thu Jan 08 2015 Simon A. Erat 1.2.3 157 | - Using now vobcopy to copy vob files from dvd 158 | - Partly implemented tui-select 159 | 160 | * Mon Dec 08 2014 Simon A. Erat 1.1.1 161 | - Updated bash completition 162 | - Fixed a tempdir path issue 163 | 164 | * Sat Nov 29 2014 Simon A. Erat 1.1.0 165 | - Added bash completition 166 | 167 | * Sat Nov 15 2014 Simon A. Erat 1.0.9 168 | - Fixed tui-value-* errors 169 | - Added '-A' toggle to edit command before executing 170 | - new old bug: webm... idk why... 171 | 172 | * Tue Nov 04 2014 Simon A. Erat 1.0.7 173 | - Reducded -Q dvd from v768 to v640 174 | - Re-sadded 2pass encoding: -2 175 | - Fixed small typos 176 | 177 | * Tue Nov 04 2014 Simon A. Erat 1.0.6 178 | - Increased -Q dvd from v640 to v768 179 | 180 | * Fri Oct 24 2014 Simon A. Erat 1.0.5 181 | - Updated description 182 | 183 | * Mon Oct 20 2014 Simon A. Erat 1.0.4 184 | - Initial package 185 | -------------------------------------------------------------------------------- /files/vhs_compl.bash: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # bash completition for Video Handler Script (VHS) 3 | # file: /etc/bash_completion.d/vhs_compl.bash 4 | # 2014.11.29 by sea 5 | # --------------------------------- 6 | function _vhs_module() 7 | { 8 | # 9 | # Variables 10 | # 11 | local cur prev OPTS DIR audio_codecs video_codecs sub_codecs 12 | COMPREPLY=() 13 | cur="${COMP_WORDS[COMP_CWORD]}" 14 | prev="${COMP_WORDS[COMP_CWORD-1]}" 15 | OPTS="-2 -a -A -b -B -c -C -d -D -e -f -F -G -i -I -j -J -K -l -L -p -q -Q -r -R -S -t -T -v -V -x -X -y -z" 16 | CONTAINER="$HOME/.config/vhs/container" 17 | containers=$(grep -v "#" $CONTAINER|awk '{print $1}') 18 | #echo $containers ; return 19 | langs="ara bul chi cze dan eng fin fre ger hin hun ice nor pol rum spa srp slo slv swe tur" 20 | audio_rates="a96 a128 a192 a256 a384 a512 a768 a1024" 21 | video_rates="v256 v384 v512 v768 v1024 v1280 v1664 v1792 v2048 v3072 v4096" 22 | pip="tl tc tr cl cc cr bl bc br" 23 | presets="$(grep -v "#" $HOME/.config/vhs/presets|awk '{print $1}'|sed s,scrn,,)" 24 | # 25 | # Fill codec lists 26 | # 27 | source ~/.config/vhs/vhs.list 28 | for a in $codecs_audio;do audio_codecs+=" a$a";done 29 | for v in $codecs_video;do video_codecs+=" v$v";done 30 | for s in $codecs_subtitle;do sub_codecs+=" t$s";done 31 | # 32 | # Action 33 | # 34 | # This completes the custom entries from $DIR 35 | # But only use this, if 'prev' was one using entries from $DIR 36 | # This list is dynamicly (automaticly) updated 37 | case $prev in 38 | -[2aABFiJRtvVy) 39 | # Continue file-read for any non-optarg option 40 | # Or options that require a file as argument 41 | COMPREPLY=( $(compgen -f -- $cur) ) 42 | return 0 43 | ;; 44 | -b) 45 | case "$cur" in 46 | a*) COMPREPLY=( $( compgen -W "$(echo $audio_rates|grep ${cur:1}*)" -- "$cur" ) ) 47 | return 0 48 | ;; 49 | v*) COMPREPLY=( $( compgen -W "$(echo $video_rates|grep ${cur:1}*)" -- "$cur" ) ) 50 | return 0 51 | ;; 52 | esac 53 | ;; 54 | -c) 55 | case "$cur" in 56 | a*) 57 | COMPREPLY=( $( compgen -W "$audio_codecs" -- "$cur" ) ) 58 | return 0 59 | ;; 60 | v*) COMPREPLY=( $( compgen -W "$video_codecs" -- "$cur" ) ) 61 | return 0 62 | ;; 63 | t*) COMPREPLY=( $( compgen -W "$sub_codecs" -- "$cur" ) ) 64 | return 0 65 | ;; 66 | "") COMPREPLY=( $( compgen -W "a t v" -- "$cur" ) ) 67 | return 0 68 | ;; 69 | esac 70 | ;; 71 | -e) if [ -z "$cur" ] 72 | then COMPREPLY=( $( compgen -W "$(echo $containers)" -- "$cur" ) ) 73 | else COMPREPLY=( $( compgen -W "$(echo $containers|grep $cur)" -- "$cur" ) ) 74 | fi 75 | return 0 76 | ;; 77 | -l) if [ -z "$cur" ] 78 | then COMPREPLY=( $( compgen -W "$(echo $langs)" -- "$cur" ) ) 79 | else COMPREPLY=( $( compgen -W "$(echo $langs|grep $cur)" -- "$cur" ) ) 80 | fi 81 | return 0 82 | ;; 83 | -p) if [ ! -z "$cur" ] 84 | then case "${cur:0:2}" in 85 | [tcb][lcr]) 86 | COMPREPLY=( $( compgen -W "$(echo ${cur:0:2}240 ${cur:0:2}360 ${cur:0:2}480 ${cur:0:2}512 ${cur:0:2}640 ${cur:0:2}720|grep $cur*)" -- "$cur" ) ) 87 | return 0 88 | ;; 89 | *) 90 | COMPREPLY=( $( compgen -W "$(echo $pip|grep $cur)" -- "$cur" ) ) 91 | return 0 92 | ;; 93 | esac 94 | else COMPREPLY=( $( compgen -W "tl tc tr cl cc cr bl bc br" -- "$cur" ) ) 95 | return 0 96 | fi 97 | ;; 98 | -[qQ]) if [ -z "$cur" ] 99 | then COMPREPLY=( $( compgen -W "$(echo $presets)" -- "$cur" ) ) 100 | else COMPREPLY=( $( compgen -W "$(echo $presets|grep $cur)" -- "$cur" ) ) 101 | fi 102 | return 0 103 | ;; 104 | esac 105 | 106 | # This completes the word you are currently writing 107 | # These need manual maintainance 108 | case "$cur" in 109 | -*) COMPREPLY=( $(compgen -W "${OPTS[*]}" -- $cur) ) 110 | return 0 111 | ;; 112 | [atv]*) case "$prev" in 113 | -c) 114 | case "$cur" in 115 | a*) COMPREPLY=( $( compgen -W "$(echo $audio_codecs|grep $cur*)" -- "$cur" ) ) 116 | return 0 117 | ;; 118 | v*) COMPREPLY=( $( compgen -W "$(echo $codecs_video|grep ${cur:1}*)" -- "$cur" ) ) 119 | return 0 120 | ;; 121 | t*) COMPREPLY=( $( compgen -W "$(echo $sub_codecs|grep $cur*)" -- "$cur" ) ) 122 | return 0 123 | ;; 124 | esac 125 | ;; 126 | -[aiJ]|*) 127 | COMPREPLY=( $(compgen -f -- $cur) ) 128 | return 0 129 | ;; 130 | esac 131 | ;; 132 | esac 133 | 134 | # This shows a list of words applying to your last argument 135 | # These need manual maintainance 136 | case "$prev" in 137 | -a|-i) 138 | COMPREPLY=( $(compgen -f -- $cur) ) 139 | return 0 140 | ;; 141 | #vhs|vhs.sh) 142 | # COMPREPLY=( $(compgen -W "calc ip build-ffmpeg" -f -- $cur) ) 143 | # return 0 144 | # ;; 145 | -b) COMPREPLY=( $(compgen -W "a v" -- $cur) ) 146 | return 0 147 | ;; 148 | -c) COMPREPLY=( $(compgen -W "a v t" -- $cur) ) 149 | return 0 150 | ;; 151 | -d) COMPREPLY=( $( compgen -W "todo +0.5db 50% 200%" -- "$cur" ) ) 152 | return 0 153 | ;; 154 | -e) COMPREPLY=( $( compgen -W "$(echo $containers | grep $cur*)" -- "$cur" ) ) 155 | return 0 156 | ;; 157 | -f) COMPREPLY=( $( compgen -W "23.9 24 25 26 29 29.9 33 48 50 60 75 100" -- "$cur" ) ) 158 | return 0 159 | ;; 160 | -l) COMPREPLY=( $(compgen -W "$(echo $langs)" -- $cur) ) 161 | return 0 162 | ;; 163 | -p) COMPREPLY=( $(compgen -W "bl br bc cl cr cc tl tr tc" -- $cur) ) 164 | return 0 165 | ;; 166 | -q|-Q) COMPREPLY=( $( compgen -W "$presets" -- "$cur" ) ) 167 | return 0 168 | ;; 169 | -r) COMPREPLY=( $(compgen -W "41000 44000 96000" -- $cur) ) 170 | return 0 171 | ;; 172 | -z) COMPREPLY=( $( compgen -W "0:01-1:23:45.99" -- "$cur" ) ) 173 | return 0 174 | ;; 175 | -h) return 0 176 | ;; 177 | esac 178 | } 179 | # Actualy make it available to the shell 180 | # Cover with and without extension 181 | complete -F _vhs_module vhs 182 | complete -F _vhs_module vhs.sh -------------------------------------------------------------------------------- /icons/hicolor/128x128/apps/vhs-audio.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sri-arjuna/vhs/e48d26da23fdcc543136e5342270768c33c5b146/icons/hicolor/128x128/apps/vhs-audio.png -------------------------------------------------------------------------------- /icons/hicolor/128x128/apps/vhs-config.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sri-arjuna/vhs/e48d26da23fdcc543136e5342270768c33c5b146/icons/hicolor/128x128/apps/vhs-config.png -------------------------------------------------------------------------------- /icons/hicolor/128x128/apps/vhs-guide.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sri-arjuna/vhs/e48d26da23fdcc543136e5342270768c33c5b146/icons/hicolor/128x128/apps/vhs-guide.png -------------------------------------------------------------------------------- /icons/hicolor/128x128/apps/vhs-help.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sri-arjuna/vhs/e48d26da23fdcc543136e5342270768c33c5b146/icons/hicolor/128x128/apps/vhs-help.png -------------------------------------------------------------------------------- /icons/hicolor/128x128/apps/vhs-kill.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sri-arjuna/vhs/e48d26da23fdcc543136e5342270768c33c5b146/icons/hicolor/128x128/apps/vhs-kill.png -------------------------------------------------------------------------------- /icons/hicolor/128x128/apps/vhs-screen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sri-arjuna/vhs/e48d26da23fdcc543136e5342270768c33c5b146/icons/hicolor/128x128/apps/vhs-screen.png -------------------------------------------------------------------------------- /icons/hicolor/128x128/apps/vhs-videos.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sri-arjuna/vhs/e48d26da23fdcc543136e5342270768c33c5b146/icons/hicolor/128x128/apps/vhs-videos.png -------------------------------------------------------------------------------- /icons/hicolor/128x128/apps/vhs-webcam.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sri-arjuna/vhs/e48d26da23fdcc543136e5342270768c33c5b146/icons/hicolor/128x128/apps/vhs-webcam.png -------------------------------------------------------------------------------- /icons/hicolor/128x128/apps/vhs-webradio.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sri-arjuna/vhs/e48d26da23fdcc543136e5342270768c33c5b146/icons/hicolor/128x128/apps/vhs-webradio.png -------------------------------------------------------------------------------- /icons/hicolor/16x16/apps/vhs-audio.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sri-arjuna/vhs/e48d26da23fdcc543136e5342270768c33c5b146/icons/hicolor/16x16/apps/vhs-audio.png -------------------------------------------------------------------------------- /icons/hicolor/16x16/apps/vhs-config.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sri-arjuna/vhs/e48d26da23fdcc543136e5342270768c33c5b146/icons/hicolor/16x16/apps/vhs-config.png -------------------------------------------------------------------------------- /icons/hicolor/16x16/apps/vhs-guide.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sri-arjuna/vhs/e48d26da23fdcc543136e5342270768c33c5b146/icons/hicolor/16x16/apps/vhs-guide.png -------------------------------------------------------------------------------- /icons/hicolor/16x16/apps/vhs-help.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sri-arjuna/vhs/e48d26da23fdcc543136e5342270768c33c5b146/icons/hicolor/16x16/apps/vhs-help.png -------------------------------------------------------------------------------- /icons/hicolor/16x16/apps/vhs-kill.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sri-arjuna/vhs/e48d26da23fdcc543136e5342270768c33c5b146/icons/hicolor/16x16/apps/vhs-kill.png -------------------------------------------------------------------------------- /icons/hicolor/16x16/apps/vhs-screen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sri-arjuna/vhs/e48d26da23fdcc543136e5342270768c33c5b146/icons/hicolor/16x16/apps/vhs-screen.png -------------------------------------------------------------------------------- /icons/hicolor/16x16/apps/vhs-videos.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sri-arjuna/vhs/e48d26da23fdcc543136e5342270768c33c5b146/icons/hicolor/16x16/apps/vhs-videos.png -------------------------------------------------------------------------------- /icons/hicolor/16x16/apps/vhs-webcam.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sri-arjuna/vhs/e48d26da23fdcc543136e5342270768c33c5b146/icons/hicolor/16x16/apps/vhs-webcam.png -------------------------------------------------------------------------------- /icons/hicolor/16x16/apps/vhs-webradio.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sri-arjuna/vhs/e48d26da23fdcc543136e5342270768c33c5b146/icons/hicolor/16x16/apps/vhs-webradio.png -------------------------------------------------------------------------------- /icons/hicolor/32x32/apps/vhs-audio.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sri-arjuna/vhs/e48d26da23fdcc543136e5342270768c33c5b146/icons/hicolor/32x32/apps/vhs-audio.png -------------------------------------------------------------------------------- /icons/hicolor/32x32/apps/vhs-config.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sri-arjuna/vhs/e48d26da23fdcc543136e5342270768c33c5b146/icons/hicolor/32x32/apps/vhs-config.png -------------------------------------------------------------------------------- /icons/hicolor/32x32/apps/vhs-guide.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sri-arjuna/vhs/e48d26da23fdcc543136e5342270768c33c5b146/icons/hicolor/32x32/apps/vhs-guide.png -------------------------------------------------------------------------------- /icons/hicolor/32x32/apps/vhs-help.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sri-arjuna/vhs/e48d26da23fdcc543136e5342270768c33c5b146/icons/hicolor/32x32/apps/vhs-help.png -------------------------------------------------------------------------------- /icons/hicolor/32x32/apps/vhs-kill.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sri-arjuna/vhs/e48d26da23fdcc543136e5342270768c33c5b146/icons/hicolor/32x32/apps/vhs-kill.png -------------------------------------------------------------------------------- /icons/hicolor/32x32/apps/vhs-screen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sri-arjuna/vhs/e48d26da23fdcc543136e5342270768c33c5b146/icons/hicolor/32x32/apps/vhs-screen.png -------------------------------------------------------------------------------- /icons/hicolor/32x32/apps/vhs-videos.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sri-arjuna/vhs/e48d26da23fdcc543136e5342270768c33c5b146/icons/hicolor/32x32/apps/vhs-videos.png -------------------------------------------------------------------------------- /icons/hicolor/32x32/apps/vhs-webcam.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sri-arjuna/vhs/e48d26da23fdcc543136e5342270768c33c5b146/icons/hicolor/32x32/apps/vhs-webcam.png -------------------------------------------------------------------------------- /icons/hicolor/32x32/apps/vhs-webradio.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sri-arjuna/vhs/e48d26da23fdcc543136e5342270768c33c5b146/icons/hicolor/32x32/apps/vhs-webradio.png -------------------------------------------------------------------------------- /icons/hicolor/64x64/apps/vhs-audio.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sri-arjuna/vhs/e48d26da23fdcc543136e5342270768c33c5b146/icons/hicolor/64x64/apps/vhs-audio.png -------------------------------------------------------------------------------- /icons/hicolor/64x64/apps/vhs-config.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sri-arjuna/vhs/e48d26da23fdcc543136e5342270768c33c5b146/icons/hicolor/64x64/apps/vhs-config.png -------------------------------------------------------------------------------- /icons/hicolor/64x64/apps/vhs-guide.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sri-arjuna/vhs/e48d26da23fdcc543136e5342270768c33c5b146/icons/hicolor/64x64/apps/vhs-guide.png -------------------------------------------------------------------------------- /icons/hicolor/64x64/apps/vhs-help.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sri-arjuna/vhs/e48d26da23fdcc543136e5342270768c33c5b146/icons/hicolor/64x64/apps/vhs-help.png -------------------------------------------------------------------------------- /icons/hicolor/64x64/apps/vhs-kill.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sri-arjuna/vhs/e48d26da23fdcc543136e5342270768c33c5b146/icons/hicolor/64x64/apps/vhs-kill.png -------------------------------------------------------------------------------- /icons/hicolor/64x64/apps/vhs-screen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sri-arjuna/vhs/e48d26da23fdcc543136e5342270768c33c5b146/icons/hicolor/64x64/apps/vhs-screen.png -------------------------------------------------------------------------------- /icons/hicolor/64x64/apps/vhs-videos.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sri-arjuna/vhs/e48d26da23fdcc543136e5342270768c33c5b146/icons/hicolor/64x64/apps/vhs-videos.png -------------------------------------------------------------------------------- /icons/hicolor/64x64/apps/vhs-webcam.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sri-arjuna/vhs/e48d26da23fdcc543136e5342270768c33c5b146/icons/hicolor/64x64/apps/vhs-webcam.png -------------------------------------------------------------------------------- /icons/hicolor/64x64/apps/vhs-webradio.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sri-arjuna/vhs/e48d26da23fdcc543136e5342270768c33c5b146/icons/hicolor/64x64/apps/vhs-webradio.png -------------------------------------------------------------------------------- /links/vhs-audio.desktop: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Version=1.0 3 | Encoding=UTF-8 4 | Type=Application 5 | Name=VHS - Play Audio 6 | Comment=Video Handler Script (Audio handler) 7 | Exec=vhs -P %F 8 | Icon=vhs-audio 9 | Terminal=true 10 | Categories=AudioVideo;Player;Multimedia 11 | MimeType=audio/3gpp;audio/3gpp2;audio/AMR;audio/DAT12;audio/DVI4;audio/DV;audio/GSM;audio/mpa;audio/ac3;audio/amr;audio/asc;audio/dls;audio/dvi4;audio/flac;audio/gsm;audio/midi;audio/mobile-xmf;audio/mp4a;audio/mpa;audio/ogg;audio/mpeg;audio/red;audio/rtx;audio/speex;audio/vnd.dolby.heaac.1;audio/vnd.dobly.heaac.2;audio/vnd.dobly.mlp;audio/vnd.dts;audio/vnd.dvb.file;audio/vorbis;audio/x-aac;audio/x-aiff;audio/x-caf;audio/x-flac;audio/x-gsm;audio/x-ms-wax;audio/x-ms-wma;audio/x-realaudio;audio/x-wav;audio/xm 12 | Keywords=Player;Audio; 13 | 14 | -------------------------------------------------------------------------------- /links/vhs-config.desktop: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Version=1.0 3 | Encoding=UTF-8 4 | Type=Application 5 | Name=VHS - Configuration 6 | Comment=Video Handler Script (config) 7 | Exec=vhs -C 8 | Icon=vhs-config 9 | Terminal=true 10 | ##Categories=AudioVideo;Player;Recorder;Multimedia 11 | Categories=Application;Settings;Multimedia; 12 | MimeType=audio/3gpp;audio/3gpp2;audio/AMR;audio/DAT12;audio/DVI4;audio/DV;audio/GSM;audio/mpa;audio/ac3;audio/amr;audio/asc;audio/dls;alpudio/dvi4;audio/flac;audio/gsm;audio/midi;audio/mobile-xmf;audio/mp4a;audio/mpa;audio/ogg;audio/mpeg;audio/red;audio/rtx;audio/speex;audio/vnd.dolby.heaac.1;audio/vnd.dobly.heaac.2;audio/vnd.dobly.mlp;audio/vnd.dts;audio/vnd.dvb.file;audio/vorbis;audio/x-aac;audio/x-aiff;audio/x-caf;audio/x-flac;audio/x-gsm;audio/x-ms-wax;audio/x-ms-wma;audio/x-realaudio;audio/x-wav;audio/xm 13 | Keywords=Player;Audio; 14 | 15 | -------------------------------------------------------------------------------- /links/vhs-guide.desktop: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Version=1.0 3 | Encoding=UTF-8 4 | Type=Application 5 | Name=VHS - Record Guide (Screen + Webcam) 6 | Comment=Video Handler Script (Guide recorder) 7 | Exec=vhs -G 8 | Icon=vhs-guide 9 | Terminal=true 10 | Categories=AudioVideo;Recorder;Multimedia 11 | MimeType=audio/3gpp;audio/3gpp2;audio/AMR;audio/DAT12;audio/DVI4;audio/DV;audio/GSM;audio/mpa;audio/ac3;audio/amr;audio/asc;audio/dls;audio/dvi4;audio/flac;audio/gsm;audio/midi;audio/mobile-xmf;audio/mp4a;audio/mpa;audio/ogg;audio/mpeg;audio/red;audio/rtx;audio/speex;audio/vnd.dolby.heaac.1;audio/vnd.dobly.heaac.2;audio/vnd.dobly.mlp;audio/vnd.dts;audio/vnd.dvb.file;audio/vorbis;audio/x-aac;audio/x-aiff;audio/x-caf;audio/x-flac;audio/x-gsm;audio/x-ms-wax;audio/x-ms-wma;audio/x-realaudio;audio/x-wav;audio/xm 12 | Keywords=Player;Audio; 13 | 14 | -------------------------------------------------------------------------------- /links/vhs-help.desktop: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Version=1.0 3 | Encoding=UTF-8 4 | Type=Application 5 | Name=VHS - Helpscreen 6 | Comment=Video Handler Script (Help) 7 | #Exec=(vhs -h ; tui-press) 8 | Exec=man vhs 9 | Icon=vhs-help 10 | Terminal=true 11 | Categories=Help;Manual;AudioVideo;Player;Recorder;Multimedia 12 | MimeType=audio/3gpp;audio/3gpp2;audio/AMR;audio/DAT12;audio/DVI4;audio/DV;audio/GSM;audio/mpa;audio/ac3;audio/amr;audio/asc;audio/dls;alpudio/dvi4;audio/flac;audio/gsm;audio/midi;audio/mobile-xmf;audio/mp4a;audio/mpa;audio/ogg;audio/mpeg;audio/red;audio/rtx;audio/speex;audio/vnd.dolby.heaac.1;audio/vnd.dobly.heaac.2;audio/vnd.dobly.mlp;audio/vnd.dts;audio/vnd.dvb.file;audio/vorbis;audio/x-aac;audio/x-aiff;audio/x-caf;audio/x-flac;audio/x-gsm;audio/x-ms-wax;audio/x-ms-wma;audio/x-realaudio;audio/x-wav;audio/xm 13 | Keywords=Player;Audio; 14 | 15 | -------------------------------------------------------------------------------- /links/vhs-killer.desktop: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Version=1.0 3 | Encoding=UTF-8 4 | Type=Application 5 | Name=VHS - Task-Killer 6 | Comment=Video Handler Script (Task-killer) 7 | Exec=vhs -K 8 | Icon=vhs-kill 9 | Terminal=true 10 | Categories=Application;AudioVideo;Player;Recorder;Multimedia 11 | MimeType=audio/3gpp;audio/3gpp2;audio/AMR;audio/DAT12;audio/DVI4;audio/DV;audio/GSM;audio/mpa;audio/ac3;audio/amr;audio/asc;audio/dls;audio/dvi4;audio/flac;audio/gsm;audio/midi;audio/mobile-xmf;audio/mp4a;audio/mpa;audio/ogg;audio/mpeg;audio/red;audio/rtx;audio/speex;audio/vnd.dolby.heaac.1;audio/vnd.dobly.heaac.2;audio/vnd.dobly.mlp;audio/vnd.dts;audio/vnd.dvb.file;audio/vorbis;audio/x-aac;audio/x-aiff;audio/x-caf;audio/x-flac;audio/x-gsm;audio/x-ms-wax;audio/x-ms-wma;audio/x-realaudio;audio/x-wav;audio/xm 12 | Keywords=Player;Audio; 13 | 14 | -------------------------------------------------------------------------------- /links/vhs-screen.desktop: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Version=1.0 3 | Encoding=UTF-8 4 | Type=Application 5 | Name=VHS - Record from Screen 6 | Comment=Video Handler Script (Screen recorder) 7 | Exec=vhs -S 8 | Icon=vhs-screen 9 | Terminal=true 10 | Categories=AudioVideo;Recorder;Multimedia 11 | MimeType=audio/3gpp;audio/3gpp2;audio/AMR;audio/DAT12;audio/DVI4;audio/DV;audio/GSM;audio/mpa;audio/ac3;audio/amr;audio/asc;audio/dls;audio/dvi4;audio/flac;audio/gsm;audio/midi;audio/mobile-xmf;audio/mp4a;audio/mpa;audio/ogg;audio/mpeg;audio/red;audio/rtx;audio/speex;audio/vnd.dolby.heaac.1;audio/vnd.dobly.heaac.2;audio/vnd.dobly.mlp;audio/vnd.dts;audio/vnd.dvb.file;audio/vorbis;audio/x-aac;audio/x-aiff;audio/x-caf;audio/x-flac;audio/x-gsm;audio/x-ms-wax;audio/x-ms-wma;audio/x-realaudio;audio/x-wav;audio/xm 12 | Keywords=Player;Audio; 13 | 14 | -------------------------------------------------------------------------------- /links/vhs-video.desktop: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Version=1.0 3 | Encoding=UTF-8 4 | Type=Application 5 | Name=VHS - Play Videos 6 | Comment=Video Handler Script (GUI Video Handler) 7 | Exec=vhs -vP %F 8 | Icon=vhs-videos 9 | Terminal=true 10 | Categories=AudioVideo;Player;Multimedia 11 | MimeType=video/mp4;video/mpg4;video/mpeg;video/mpv;video/ogg;video/webm;video/x-flv;video/m4v;video/x-mmatroska;video/x-ms-asf;video/x-ms-vob;video/x-ms-wmv;video/x-msvideo;video/vnd.mts;video/vnd.vivo;video/vnd.dece.hd;video/vnd.dece.mobile;video/vnd.dece.mp4;video/vnd.video;audio/3gpp;audio/3gpp2;audio/AMR;audio/DAT12;audio/DVI4;audio/DV;audio/GSM;audio/mpa;audio/ac3;audio/amr;audio/asc;audio/dls;audio/dvi4;audio/flac;audio/gsm;audio/midi;audio/mobile-xmf;audio/mp4a;audio/mpa;audio/ogg;audio/mpeg;audio/red;audio/rtx;audio/speex;audio/vnd.dolby.heaac.1;audio/vnd.dobly.heaac.2;audio/vnd.dobly.mlp;audio/vnd.dts;audio/vnd.dvb.file;audio/vorbis;audio/x-aac;audio/x-aiff;audio/x-caf;audio/x-flac;audio/x-gsm;audio/x-ms-wax;audio/x-ms-wma;audio/x-realaudio;audio/x-wav;audio/xm 12 | Keywords=Player;Capture;DVD;Audio;Video;Server;Broadcast; 13 | 14 | -------------------------------------------------------------------------------- /links/vhs-webcam.desktop: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Version=1.0 3 | Encoding=UTF-8 4 | Type=Application 5 | Name=VHS - Record from Webcam 6 | Comment=Video Handler Script (Webcam recorder) 7 | Exec=vhs -W 8 | Icon=vhs-webcam 9 | Terminal=true 10 | Categories=Recorder;AudioVideo;Multimedia 11 | MimeType=audio/3gpp;audio/3gpp2;audio/AMR;audio/DAT12;audio/DVI4;audio/DV;audio/GSM;audio/mpa;audio/ac3;audio/amr;audio/asc;audio/dls;audio/dvi4;audio/flac;audio/gsm;audio/midi;audio/mobile-xmf;audio/mp4a;audio/mpa;audio/ogg;audio/mpeg;audio/red;audio/rtx;audio/speex;audio/vnd.dolby.heaac.1;audio/vnd.dobly.heaac.2;audio/vnd.dobly.mlp;audio/vnd.dts;audio/vnd.dvb.file;audio/vorbis;audio/x-aac;audio/x-aiff;audio/x-caf;audio/x-flac;audio/x-gsm;audio/x-ms-wax;audio/x-ms-wma;audio/x-realaudio;audio/x-wav;audio/xm 12 | Keywords=Player;Audio; 13 | 14 | -------------------------------------------------------------------------------- /links/vhs-webradio.desktop: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Version=1.0 3 | Encoding=UTF-8 4 | Type=Application 5 | Name=VHS - Play URL 6 | Comment=Video Handler Script (Internet Radio) 7 | Exec=vhs -PP 8 | Icon=vhs-webradio 9 | Terminal=true 10 | Categories=Multimedia;AudioVideo;Player;Internet 11 | MimeType=audio/3gpp;audio/3gpp2;audio/AMR;audio/DAT12;audio/DVI4;audio/DV;audio/GSM;audio/mpa;audio/ac3;audio/amr;audio/asc;audio/dls;alpudio/dvi4;audio/flac;audio/gsm;audio/midi;audio/mobile-xmf;audio/mp4a;audio/mpa;audio/ogg;audio/mpeg;audio/red;audio/rtx;audio/speex;audio/vnd.dolby.heaac.1;audio/vnd.dobly.heaac.2;audio/vnd.dobly.mlp;audio/vnd.dts;audio/vnd.dvb.file;audio/vorbis;audio/x-aac;audio/x-aiff;audio/x-caf;audio/x-flac;audio/x-gsm;audio/x-ms-wax;audio/x-ms-wma;audio/x-realaudio;audio/x-wav;audio/xm 12 | Keywords=Player;Audio; 13 | 14 | -------------------------------------------------------------------------------- /screenshots/example-stream-play-history.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sri-arjuna/vhs/e48d26da23fdcc543136e5342270768c33c5b146/screenshots/example-stream-play-history.jpg -------------------------------------------------------------------------------- /screenshots/example-with-2pass-and-join.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sri-arjuna/vhs/e48d26da23fdcc543136e5342270768c33c5b146/screenshots/example-with-2pass-and-join.png -------------------------------------------------------------------------------- /screenshots/example-with-progressbar.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sri-arjuna/vhs/e48d26da23fdcc543136e5342270768c33c5b146/screenshots/example-with-progressbar.jpg --------------------------------------------------------------------------------