Projects
Multimedia
tovid
Sign Up
Log In
Username
Password
We truncated the diff of some files because they were too big. If you want to see the full diff for every file,
click here
.
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
Expand all
Collapse all
Changes of Revision 9
View file
tovid.changes
Changed
@@ -1,4 +1,17 @@ ------------------------------------------------------------------- +Fri May 24 13:24:31 UTC 2019 - Luigi Baldoni <aloisio@gmx.com> + +- Update to version 0.35.2 + * Fixed set_chapters not having exec bit set + * Fixed grep for libav filters + * Some python3 fixes + * Fixed scope problem that only showed up on freebsd for some + reason. + * Fixed imagemagick spumux buttons for IM-6.9.1-x. + * Make ffmpeg the default encoder when both ffmpeg and avconv + are present. + +------------------------------------------------------------------- Mon Apr 6 19:29:20 UTC 2015 - aloisio@gmx.com - Version 0.35.0
View file
tovid.spec
Changed
@@ -1,6 +1,7 @@ -# vim: set ts=4 sw=4 et: # -# Copyright (c) 2015 Luigi Baldoni <aloisio@gmx.com> +# spec file for package tovid +# +# Copyright (c) 2015-2019 Luigi Baldoni <aloisio@gmx.com> # Copyright (c) 2005-2010 oc2pus # # All modifications and additions to the file contributed by third parties @@ -12,24 +13,24 @@ # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. -# Please submit bugfixes or comments to packman@links2linux.de +# Please submit bugfixes or comments via https://bugs.links2linux.org/ +# -%{!?python_sitelib: %global python_sitelib %(python -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")} -%{!?python_sitearch: %global python_sitearch %(python -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")} Name: tovid -Version: 0.35.0 +Version: 0.35.2 Release: 0 Summary: Video conversion and DVD authoring tools -License: GPL-2.0+ +License: GPL-2.0-or-later Group: Productivity/Multimedia/Video/Editors and Convertors -Url: http://tovid.wikia.com/wiki/Tovid_Wiki -Source: https://github.com/tovid-suite/tovid/releases/download/v0.35.0/tovid-%{version}.tar.gz +URL: http://tovid.wikia.com/wiki/Tovid_Wiki +Source: https://github.com/tovid-suite/tovid/releases/download/%{version}/tovid-%{version}.tar.gz BuildRequires: hicolor-icon-theme BuildRequires: python-devel BuildRequires: python-setuptools BuildRequires: txt2tags BuildRequires: update-desktop-files +Requires: /usr/bin/mkisofs Requires: ImageMagick >= 6.0 Requires: MPlayer Requires: bc @@ -39,7 +40,6 @@ Requires: ffmpeg Requires: lsdvd Requires: mjpegtools -Requires: /usr/bin/mkisofs Requires: normalize Requires: python-base >= %{py_ver} Requires: python-tk @@ -48,11 +48,7 @@ Requires: tk Recommends: libdvdcss2 Recommends: transcode -BuildRoot: %{_tmppath}/%{name}-%{version}-build -%py_requires -%if 0%{?suse_version} > 1110 BuildArch: noarch -%endif %description tovid is a suite of utilities designed to make DVD @@ -64,6 +60,14 @@ %prep %setup -q +# fix shebang +sed -i 's|^#!.*|#!%{_bindir}/bash|' \ + src/idvid src/makedvd src/makempg \ + src/todisc src/todisc-fade-routine \ + src/tovid-init.in +sed -i 's|^#!.*|#!%{_bindir}/python|' \ + src/set_chapters src/titleset-wizard \ + src/todiscgui src/tovid-stats %build python setup.py build @@ -82,8 +86,8 @@ done %files -%defattr(-,root,root) -%doc AUTHORS ChangeLog COPYING README +%license COPYING +%doc AUTHORS ChangeLog README %{_bindir}/tovid %{python_sitelib}/libtovid %{python_sitelib}/tovid-%{version}* @@ -93,6 +97,6 @@ %{_datadir}/icons/*/*/apps/tovid.png %{_datadir}/icons/*/*/apps/titleset-wizard.png %{_datadir}/icons/*/scalable/apps/*.svg -%doc %{_mandir}/man1/tovid.1%{ext_man} +%{_mandir}/man1/tovid.1%{?ext_man} %changelog
View file
tovid-0.35.0.tar.gz/docs/src/en/tovid.html
Deleted
@@ -1,1918 +0,0 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> -<HTML> -<HEAD> -<META NAME="generator" CONTENT="http://txt2tags.org"> -<TITLE>tovid manual</TITLE> -</HEAD><BODY BGCOLOR="white" TEXT="black"> -<CENTER> -<H1>tovid manual</H1> -</CENTER> - -<P></P> -<HR NOSHADE SIZE=1> -<P></P> - - <UL> - <LI><A HREF="#toc1">Name</A> - <LI><A HREF="#toc2">Description</A> - <LI><A HREF="#toc3">Usage</A> - <LI><A HREF="#toc4">Configuration</A> - <LI><A HREF="#toc5">Command:gui</A> - <LI><A HREF="#toc6">Usage</A> - <LI><A HREF="#toc7">Command:titlesets</A> - <LI><A HREF="#toc8">Command:disc</A> - <UL> - <LI><A HREF="#toc9">Usage</A> - <LI><A HREF="#toc10">General Options</A> - <LI><A HREF="#toc11">Menu style</A> - <LI><A HREF="#toc12">Thumbnail style</A> - <LI><A HREF="#toc13">Slideshows</A> - <LI><A HREF="#toc14">Burning the disc</A> - <LI><A HREF="#toc15">Advanced usage</A> - <LI><A HREF="#toc16">Menu Style</A> - <LI><A HREF="#toc17">Thumbnail Style</A> - <LI><A HREF="#toc18">Dvdauthor options</A> - <LI><A HREF="#toc19">Usage notes</A> - </UL> - <LI><A HREF="#toc20">Command:mpg</A> - <UL> - <LI><A HREF="#toc21">Usage</A> - <LI><A HREF="#toc22">Basic options</A> - <LI><A HREF="#toc23">Advanced options</A> - </UL> - <LI><A HREF="#toc24">Command:id</A> - <UL> - <LI><A HREF="#toc25">Usage</A> - <LI><A HREF="#toc26">Options</A> - <LI><A HREF="#toc27">Examples</A> - </UL> - <LI><A HREF="#toc28">Command:dvd</A> - <UL> - <LI><A HREF="#toc29">Usage</A> - <LI><A HREF="#toc30">Options</A> - </UL> - <LI><A HREF="#toc31">Command:chapters</A> - <UL> - <LI><A HREF="#toc32">Examples</A> - </UL> - <LI><A HREF="#toc33">CONTACT</A> - </UL> - -<P></P> -<HR NOSHADE SIZE=1> -<P></P> - -<A NAME="toc1"></A> -<H1>Name</H1> - -<P> -tovid: Make DVDs from video files -</P> - -<A NAME="toc2"></A> -<H1>Description</H1> - -<P> -<B>tovid</B> is a command-line tool for creating DVDs. It can encode your video -files to DVD-compliant MPEG format, generate simple or complex DVD menus, -author and burn a ready-to-watch DVD, with just a few shell commands. A -graphical interface is also provided to make the process even easier. -</P> -<P> -<B>NOTE</B>: As of tovid 0.35, the legacy scripts <B>makemenu</B> and <B>makexml</B> -have been removed and no longer appear in this manpage. -All of their functions and more can be done with the 'tovid disc' command, -(todisc script). See <B>Command:disc</B> and the <A HREF="http://tovid.wikia.com">wiki</A> -for more info. -</P> -<P> -Also note that as of tovid 0.32, this is the only manual page provided by tovid. -There is now a single executable frontend to all functionality in the suite, so -if you were expecting to find manpages for <B>todisc</B>, <B>idvid</B>, <B>makempg</B> -and their kin, they can all be found in the <B>tovid</B> manpage you are reading now. -And yes, this makes for a pretty large manual page. If you are viewing this -manpage from the command-line <B>man</B> utility, which normally pages through the -<B>less</B> utility, you can skip to a section by searching with the <B>/</B> key, -followed by a <B>^</B> to match the given section name. For example, to skip to -the <B>mpg</B> command, type <B>/^Command:mpg</B>. See <B>man less</B> for more on how -to navigate. -</P> - -<A NAME="toc3"></A> -<H1>Usage</H1> - -<P> -<B>tovid</B> <I>COMMAND</I> [<I>OPTIONS</I>] -</P> -<P> -Where <I>COMMAND</I> is one of the following: -</P> -<P> - Main Commands -</P> - -<DL> -<DT><B>disc</B></DT><DD> - Encode, make menus, author, burn. (was <B>todisc</B>. See <B>Command:disc</B>) -<DT><B>gui</B></DT><DD> - Start the tovid GUI (was <B>todiscgui</B>. See <B>Command:gui</B>) -<DT><B>titlesets</B></DT><DD> - A GUI wizard for multiple titlesets. (new: See <B>Command:titlesets</B>) -</DL> - -<P> - Helper Commands -</P> - -<DL> -<DT><B>mpg</B></DT><DD> - Encode videos to MPEG format (was <B>tovid</B>. See <B>Command:mpg</B>) -<DT><B>dvd</B></DT><DD> - Author and/or burn a DVD (was <B>makedvd</B>. See <B>Command:dvd</B>) -<DT><B>id</B></DT><DD> - Identify one or more video files (was <B>idvid</B>. See <B>Command:id</B>) -<DT><B>chapters</B></DT><DD> - A GUI using mplayer for setting chapter points. It will return a string of - chapter points to the terminal, in a format recognized by 'tovid disc' - (todisc) or by 'tovid gui', for the <B>-chapters</B> option. -</DL> - -<P> -The <I>OPTIONS</I> differ for each command; run <B>tovid <command></B> with no -further arguments to get help on a command, and what options it expects. -</P> - -<A NAME="toc4"></A> -<H1>Configuration</H1> - -<P> -Two configuration files are created the first time you run tovid: -</P> - -<DL> -<DT><B>~/.tovid/preferences</B></DT><DD> - Defines working directory for all scripts. - You can define the output directory for makempg here. - The 'ffmpeg' executable can be set here: ffmpeg or avconv (TOVID_FFMPEG) -<DT><B>~/.tovid/tovid.ini</B></DT><DD> - Includes command-line options that should be passed to the various - <B>tovid</B> sub-commands. Note: each sub-command has its own section, - starting with the line [sub-command], for example: - -<PRE> - [disc] - ; -no-warn - -static - -no-ask -</PRE> - -</DL> - -<P> -Edit these files if you wish to change your configuration. -</P> -<P> -The following environment variables are also honoured: -</P> - -<PRE> - TOVID_HOME (directory containing preferences: ~/.tovid) - TOVID_WORKING_DIR (working directory for all scripts). - TOVID_OUTPUT_DIR (output directory for the makempg script). - TOVID_FFMPEG_CMD (the 'ffmpeg' executable to use: ffmpeg or avconv) -</PRE> - -<P> -These will override 'TOVID_HOME', 'WORKING_DIR', 'OUTPUT_DIR', -and 'TOVID_FFMPEG' if set in ~/.tovid/preferences. -</P> - -<A NAME="toc5"></A> -<H1>Command:gui</H1> - -<A NAME="toc6"></A> -<H1>Usage</H1> - -<P> -<B>tovid gui</B> [<I>OPTIONS</I>] -</P> -<P>
View file
tovid-0.35.0.tar.gz/docs/src/en/tovid.wiki
Deleted
@@ -1,1663 +0,0 @@ -'''tovid manual''' - - - - ----- - -__TOC__ - ----- - - -== Name == - -tovid: Make DVDs from video files - -== Description == - -'''tovid''' is a command-line tool for creating DVDs. It can encode your video -files to DVD-compliant MPEG format, generate simple or complex DVD menus, -author and burn a ready-to-watch DVD, with just a few shell commands. A -graphical interface is also provided to make the process even easier. - -'''NOTE''': As of tovid 0.35, the legacy scripts '''makemenu''' and '''makexml''' -have been removed and no longer appear in this manpage. -All of their functions and more can be done with the 'tovid disc' command, -(todisc script). See '''Command:disc''' and the [http://tovid.wikia.com wiki] -for more info. - -Also note that as of tovid 0.32, this is the only manual page provided by tovid. -There is now a single executable frontend to all functionality in the suite, so -if you were expecting to find manpages for '''todisc''', '''idvid''', '''makempg''' -and their kin, they can all be found in the '''tovid''' manpage you are reading now. -And yes, this makes for a pretty large manual page. If you are viewing this -manpage from the command-line '''man''' utility, which normally pages through the -'''less''' utility, you can skip to a section by searching with the '''/''' key, -followed by a '''^''' to match the given section name. For example, to skip to -the '''mpg''' command, type '''/^Command:mpg'''. See '''man less''' for more on how -to navigate. - -== Usage == - -'''tovid''' ''COMMAND'' [''OPTIONS''] - -Where ''COMMAND'' is one of the following: - - Main Commands - -; '''disc''' -: Encode, make menus, author, burn. (was '''todisc'''. See '''Command:disc''') -; '''gui''' -: Start the tovid GUI (was '''todiscgui'''. See '''Command:gui''') -; '''titlesets''' -: A GUI wizard for multiple titlesets. (new: See '''Command:titlesets''') - - Helper Commands - -; '''mpg''' -: Encode videos to MPEG format (was '''tovid'''. See '''Command:mpg''') -; '''dvd''' -: Author and/or burn a DVD (was '''makedvd'''. See '''Command:dvd''') -; '''id''' -: Identify one or more video files (was '''idvid'''. See '''Command:id''') -; '''chapters''' -: A GUI using mplayer for setting chapter points. It will return a string of -: chapter points to the terminal, in a format recognized by 'tovid disc' -: (todisc) or by 'tovid gui', for the '''-chapters''' option. - -The ''OPTIONS'' differ for each command; run '''tovid <command>''' with no -further arguments to get help on a command, and what options it expects. - -== Configuration == - -Two configuration files are created the first time you run tovid: - -; '''~/.tovid/preferences''' -: Defines working directory for all scripts. -: You can define the output directory for makempg here. -: The 'ffmpeg' executable can be set here: ffmpeg or avconv (TOVID_FFMPEG) -; '''~/.tovid/tovid.ini''' -: Includes command-line options that should be passed to the various -: '''tovid''' sub-commands. Note: each sub-command has its own section, -: starting with the line [sub-command], for example: -<pre> - [disc] - ; -no-warn - -static - -no-ask -</pre> - - -Edit these files if you wish to change your configuration. - -The following environment variables are also honoured: - -<pre> - TOVID_HOME (directory containing preferences: ~/.tovid) - TOVID_WORKING_DIR (working directory for all scripts). - TOVID_OUTPUT_DIR (output directory for the makempg script). - TOVID_FFMPEG_CMD (the 'ffmpeg' executable to use: ffmpeg or avconv) -</pre> - -These will override 'TOVID_HOME', 'WORKING_DIR', 'OUTPUT_DIR', -and 'TOVID_FFMPEG' if set in ~/.tovid/preferences. - -== Command:gui == - -== Usage == - -'''tovid gui''' [''OPTIONS''] - -'''tovid gui''' starts the graphical user interface (GUI) for tovid. This is -the easiest way to start creating DVDs with tovid. The optional arguments -''OPTIONS'' are any option used by todisc ('tovid disc') which will save -entering it manually, OR the full path to a saved script from the GUI. -You can also combine these, but the script must be the FIRST option -directly after '''tovid gui''' . (This option to save the contents of your -project allows you to use it as a bash script later, or to reload the -project to continue working with it at another time.) - -'''tovid gui''' will also take the option '''--position''', which denotes the -screen position that the GUI will start at, in the form '+X+Y', similar to -this part of the Xorg -geometry string. - -All help is integrated in the form of tooltips. You can also see -**Command:disc ** for more detail about the options. Note: if you wish to use -a GUI to make multiple titlesets on the same DVD use '''*tovid titlesets*''', -which is a wizard that uses the the 'tovid gui. See '''*Command:titlesets*'''. - -Please note that although the interface may seem complex with so many options, -you can create a fully functional DVD with only a few options on the opening -tab of the GUI (select video files and an output name). - -== Command:titlesets == - -'''tovid titlesets''' will assist in making a DVD with multiple titlesets. It can -be started without any options, or you can feed it the path to a saved titleset -script as an option. The option to save a script is also useful as the resulting -script can be run later from a terminal. - -== Command:disc == - -'''tovid disc''' creates a DVD file-system with optional menus, from a list of -multimedia video files and their titles. As todisc can function as a master -script, calling other scripts as it needs them, it is the easiest command line -program for creating a DVD from start to finish, including automatically -converting non-compliant videos and prompting to burn at completion. It can do -animated menus, static thumbnail menus, text-only menus, or author with no menu. -In addition, it can do slideshows, using images as input, and even combine -slideshows with videos. It supports sub-menus for chapter breaks, -configurable menu style, animated backgrounds and transparency effects. -From simple (no menu) to complex (switched menus and titlesets), you should -be able to do what you want with 'tovid disc'. - -=== Usage === - -<pre> - tovid disc [OPTIONS] \ - -files <file list> -titles <title list> - -out mydvd -</pre> - -For example: - -<pre> - $ tovid disc -files File1.mpg File2.mpg File3.mpg \ - -titles "Episode 1" "Episode 2" "Episode 3" \ - -out Season_one -</pre> - -The number of '''-files''' and '''-titles''' must be equal, though if you do not -include any titles '''tovid disc''' will use the basename of the included files -as titles. If you are doing a slideshow or multiple slideshows, use -'''-slides''' rather than '''-files''' for passing in the images. You may use --files and -slides more than once to create an ordering in a mixed -slideshows/videos menu. See Slideshows part of Usage section, below. - -If the input files are not mpeg, you will have the option to auto-encode them. - -General Options - -'''At present there are 2 display arrangements or "templates":''' - -; A. (Default) -: Thumbs will be centred, and as large as space restraints allow. -: -; B. '''-showcase''' IMAGE|VIDEO -: Produces an arrangement with small buttons on -: the side and the showcase image/video in the centre. If no IMAGE or VIDEO -: argument is supplied, the central thumb will be omitted. -: -: Note: '''-textmenu''', '''-quick-menu''' and '''-switched-menus''' are all types -: of showcase style menus. See descriptions under '''Menu style''' section. - -The '''-titles''' arguments should be double or single quoted, or have the spaces -backslash-escaped. Special characters (like ", !, *, &, ?) may need to be -backslash-escaped. To include a quoted string within a title, backslash-escape -the quotes. These titles are used for labelling thumbnails on the main menu, -and for the submenu title for that video. ( see also '''-submenu-titles''' )
View file
tovid-0.35.0.tar.gz/PKG-INFO -> tovid-0.35.2.tar.gz/PKG-INFO
Changed
@@ -1,6 +1,6 @@ Metadata-Version: 1.1 Name: tovid -Version: 0.35.0 +Version: 0.35.2 Summary: A suite of tools for making video DVDs Home-page: http://tovid.wikia.com/ Author: grepper
View file
tovid-0.35.2.tar.gz/docs/scripts
Added
+(directory)
View file
tovid-0.35.2.tar.gz/docs/scripts/txt2tags
Added
@@ -0,0 +1,5987 @@ +#!/usr/bin/env python +# txt2tags - generic text conversion tool ---> READY TO PYTHON 3! +# http://txt2tags.org +# +# Copyright 2001-2010 Aurelio Jargas +# +# License: http://www.gnu.org/licenses/gpl-2.0.txt +# Subversion: http://svn.txt2tags.org +# Bug tracker: http://bugs.txt2tags.org +# +######################################################################## +# +# BORING CODE EXPLANATION AHEAD +# +# Just read it if you wish to understand how the txt2tags code works. +# +######################################################################## +# +# The code that [1] parses the marked text is separated from the +# code that [2] insert the target tags. +# +# [1] made by: def convert() +# [2] made by: class BlockMaster +# +# The structures of the marked text are identified and its contents are +# extracted into a data holder (Python lists and dictionaries). +# +# When parsing the source file, the blocks (para, lists, quote, table) +# are opened with BlockMaster, right when found. Then its contents, +# which spans on several lines, are feeded into a special holder on the +# BlockMaster instance. Just when the block is closed, the target tags +# are inserted for the full block as a whole, in one pass. This way, we +# have a better control on blocks. Much better than the previous line by +# line approach. +# +# In other words, whenever inside a block, the parser *holds* the tag +# insertion process, waiting until the full block is read. That was +# needed primary to close paragraphs for the XHTML target, but +# proved to be a very good adding, improving many other processing. +# +# ------------------------------------------------------------------- +# +# These important classes are all documented: +# CommandLine, SourceDocument, ConfigMaster, ConfigLines. +# +# There is a RAW Config format and all kind of configuration is first +# converted to this format. Then a generic method parses it. +# +# These functions get information about the input file(s) and take +# care of the init processing: +# get_infiles_config(), process_source_file() and convert_this_files() +# +######################################################################## + +#XXX Python coding warning +# Avoid common mistakes: +# - do NOT use newlist=list instead newlist=list[:] +# - do NOT use newdic=dic instead newdic=dic.copy() +# - do NOT use dic[key] instead dic.get(key) +# - do NOT use del dic[key] without has_key() before + +#XXX Smart Image Align don't work if the image is a link +# Can't fix that because the image is expanded together with the +# link, at the linkbank filling moment. Only the image is passed +# to parse_images(), not the full line, so it is always 'middle'. + +#XXX Paragraph separation not valid inside Quote +# Quote will not have <p></p> inside, instead will close and open +# again the <blockquote>. This really sux in CSS, when defining a +# different background color. Still don't know how to fix it. + +#XXX TODO (maybe) +# New mark or macro which expands to an anchor full title. +# It is necessary to parse the full document in this order: +# DONE 1st scan: HEAD: get all settings, including %!includeconf +# DONE 2nd scan: BODY: expand includes & apply %!preproc +# 3rd scan: BODY: read titles and compose TOC info +# 4th scan: BODY: full parsing, expanding [#anchor] 1st +# Steps 2 and 3 can be made together, with no tag adding. +# Two complete body scans will be *slow*, don't know if it worths. +# One solution may be add the titles as postproc rules + + +############################################################################## + +# User config (1=ON, 0=OFF) + +USE_I18N = 1 # use gettext for i18ned messages? (default is 1) +COLOR_DEBUG = 1 # show debug messages in colors? (default is 1) +BG_LIGHT = 0 # your terminal background color is light (default is 0) +HTML_LOWER = 0 # use lowercased HTML tags instead upper? (default is 0) + +############################################################################## + + +# These are all the core Python modules used by txt2tags (KISS!) +import re, os, sys, time, getopt + +# The CSV module is new in Python version 2.3 +try: + import csv +except ImportError: + csv = None + +# Program information +my_url = 'http://txt2tags.org' +my_name = 'txt2tags' +my_email = 'verde@aurelio.net' +my_version = '2.6' + +# i18n - just use if available +if USE_I18N: + try: + import gettext + # If your locale dir is different, change it here + cat = gettext.Catalog('txt2tags',localedir='/usr/share/locale/') + _ = cat.gettext + except: + _ = lambda x:x +else: + _ = lambda x:x + +# FLAGS : the conversion related flags , may be used in %!options +# OPTIONS : the conversion related options, may be used in %!options +# ACTIONS : the other behavior modifiers, valid on command line only +# MACROS : the valid macros with their default values for formatting +# SETTINGS: global miscellaneous settings, valid on RC file only +# NO_TARGET: actions that don't require a target specification +# NO_MULTI_INPUT: actions that don't accept more than one input file +# CONFIG_KEYWORDS: the valid %!key:val keywords +# +# FLAGS and OPTIONS are configs that affect the converted document. +# They usually have also a --no-<option> to turn them OFF. +# +# ACTIONS are needed because when doing multiple input files, strange +# behavior would be found, as use command line interface for the +# first file and gui for the second. There is no --no-<action>. +# --version and --help inside %!options are also odd +# +TARGETS = sorted( 'html xhtml sgml dbk tex lout man mgp wiki gwiki doku pmw moin pm6 txt art adoc creole'.split() ) + +FLAGS = {'headers' :1 , 'enum-title' :0 , 'mask-email' :0 , + 'toc-only' :0 , 'toc' :0 , 'rc' :1 , + 'css-sugar' :0 , 'css-suggar' :0 , 'css-inside' :0 , + 'quiet' :0 , 'slides' :0 } +OPTIONS = {'target' :'', 'toc-level' :3 , 'style' :'', + 'infile' :'', 'outfile' :'', 'encoding' :'', + 'config-file':'', 'split' :0 , 'lang' :'', + 'width' :0 , 'height' :0 , 'art-chars' :'', + 'show-config-value':''} +ACTIONS = {'help' :0 , 'version' :0 , 'gui' :0 , + 'verbose' :0 , 'debug' :0 , 'dump-config':0 , + 'dump-source':0 , 'targets' :0} +MACROS = {'date' : '%Y%m%d', 'infile': '%f', + 'mtime': '%Y%m%d', 'outfile': '%f'} +SETTINGS = {} # for future use +NO_TARGET = ['help', 'version', 'gui', 'toc-only', 'dump-config', 'dump-source', 'targets'] +NO_MULTI_INPUT = ['gui','dump-config','dump-source'] +CONFIG_KEYWORDS = [ + 'target', 'encoding', 'style', 'options', 'preproc','postproc', + 'guicolors'] + +TARGET_NAMES = { + 'html' : _('HTML page'), + 'xhtml' : _('XHTML page'), + 'sgml' : _('SGML document'), + 'dbk' : _('DocBook document'), + 'tex' : _('LaTeX document'), + 'lout' : _('Lout document'), + 'man' : _('UNIX Manual page'), + 'mgp' : _('MagicPoint presentation'), + 'wiki' : _('Wikipedia page'), + 'gwiki' : _('Google Wiki page'), + 'doku' : _('DokuWiki page'), + 'pmw' : _('PmWiki page'), + 'moin' : _('MoinMoin page'), + 'pm6' : _('PageMaker document'), + 'txt' : _('Plain Text'), + 'art' : _('ASCII Art text'), + 'adoc' : _('AsciiDoc document'), + 'creole' : _('Creole 1.0 document') +} + +DEBUG = 0 # do not edit here, please use --debug +VERBOSE = 0 # do not edit here, please use -v, -vv or -vvv +QUIET = 0 # do not edit here, please use --quiet +GUI = 0 # do not edit here, please use --gui +AUTOTOC = 1 # do not edit here, please use --no-toc or %%toc + +DFT_TEXT_WIDTH = 72 # do not edit here, please use --width +DFT_SLIDE_WIDTH = 80 # do not edit here, please use --width +DFT_SLIDE_HEIGHT = 25 # do not edit here, please use --height + +# ASCII Art config +AA_KEYS = 'corner border side bar1 bar2 level2 level3 level4 level5'.split() +AA_VALUES = '+-|-==-^"' # do not edit here, please use --art-chars +AA = dict(zip(AA_KEYS, AA_VALUES)) +AA_COUNT = 0 +AA_TITLE = ''
View file
tovid-0.35.0.tar.gz/libtovid/metagui/gui.py -> tovid-0.35.2.tar.gz/libtovid/metagui/gui.py
Changed
@@ -95,7 +95,9 @@ """ text = self.stdin_text.get() # Write the entered text to the command's stdin pipe - self.command.proc.stdin.write(text + '\n') + #self.command.proc.stdin.write(text + '\n') + # python 3 compatibility + self.command.proc.stdin.write(bytearray(text + "\n", "ascii")) self.command.proc.stdin.flush() # Show what was typed in the log window self.write(text)
View file
tovid-0.35.0.tar.gz/setup.py -> tovid-0.35.2.tar.gz/setup.py
Changed
@@ -44,7 +44,7 @@ # Current SVN version number #_tovid_version = svn_version() # Official release number -_tovid_version = '0.35.0' +_tovid_version = '0.35.2' import os @@ -148,11 +148,18 @@ def run(self): """Build the tovid manual page. """ + # For python 3 txt2tags needs an unofficial script + import sys + if (sys.version_info > (3, 0)): + txt2tags = 'docs/scripts/txt2tags' + else: + txt2tags = 'txt2tags' + # Build only if target does not exist, or if source is newer than target mod = os.path.getmtime if not os.path.exists(self.target) or (mod(self.source) > mod(self.target)): print("Rebuilding tovid manual page") - command = 'txt2tags -t man -i "%s" -o "%s"' % (self.source, self.target) + command = '%s -t man -i "%s" -o "%s"' % (txt2tags, self.source, self.target) os.system(command) else: print("Manual page already built, not building again")
View file
tovid-0.35.0.tar.gz/src/idvid -> tovid-0.35.2.tar.gz/src/idvid
Changed
@@ -455,11 +455,11 @@ if $USE_NAVLOG; then if egrep -qi 'mpeg$|mpg$|vob$' <<< "${INFILE##*.}"; then ID_VIDEO_FRAMES=$(awk 'END{print NR}' "$NAV_LOG" ) - V_DUR=$(bc <<< "$ID_VIDEO_FRAMES / $ID_VIDEO_FPS") + V_DUR=$( ${bC} <<< "$ID_VIDEO_FRAMES / $ID_VIDEO_FPS") V_DURATION=${V_DUR%%.*} # final value is integer ( seconds ) else V_DURATION=$(awk '($2==1) { field = $NF }; END{ print field/1000 }' "$NAV_LOG") - ID_VIDEO_FRAMES=$(bc <<< "$V_DURATION * $ID_VIDEO_FPS") + ID_VIDEO_FRAMES=$( ${bC} <<< "$V_DURATION * $ID_VIDEO_FPS") ID_VIDEO_FRAMES=${ID_VIDEO_FRAMES%%.*} # final value is in seconds V_DURATION=${V_DURATION%%.*} # integer @@ -531,7 +531,7 @@ # infer bitrate from file size and duration v_size=$(( $(du -m "$INFILE" | awk '{ print $1 }') * 8192 )) if (( ${V_DURATION%.*} )); then - ID_VIDEO_BITRATE=$(bc -l <<< "$v_size / $V_DURATION") + ID_VIDEO_BITRATE=$( ${bC} -l <<< "$v_size / $V_DURATION") ID_VIDEO_BITRATE=$(( v_size / V_DURATION ))000 #echo -e "Probed video bitrate not available, infering from file size and duration\n" fi @@ -545,7 +545,7 @@ if test_is_number $vid_frames && ((vid_frames)); then (( $ID_VIDEO_FRAMES == 0 )) && ID_VIDEO_FRAMES=$vid_frames elif (( ${V_DURATION%.*} )) && (( ${ID_VIDEO_FPS/./} )); then - VIDEO_FRAMES=$(bc -l <<< "$V_DURATION * $ID_VIDEO_FPS") + VIDEO_FRAMES=$( ${bC} -l <<< "$V_DURATION * $ID_VIDEO_FPS") if (( $ID_VIDEO_FRAMES == 0 )); then ID_VIDEO_FRAMES=${VIDEO_FRAMES%.*} #echo -e "Probed frame count not available, infering from duration and framerate\n" @@ -622,7 +622,7 @@ echo "V_ASPECT_WIDTH=$V_ASPECT_WIDTH" echo "ID_VIDEO_FRAMES=$ID_VIDEO_FRAMES" elif $TABULAR; then - FILE_SIZE=$(du -Dh "$INFILE" | awk '{print $1}') + FILE_SIZE=$(du -Hh "$INFILE" | awk '{print $1}') echo "$INFILE||$FILE_SIZE||${ID_VIDEO_WIDTH}x${ID_VIDEO_HEIGHT}||$ID_VIDEO_FPS||$ID_VIDEO_BITRATE||$ID_AUDIO_BITRATE" >> "$TABLE" else echo $SEPARATOR
View file
tovid-0.35.0.tar.gz/src/makedvd -> tovid-0.35.2.tar.gz/src/makedvd
Changed
@@ -142,7 +142,7 @@ else DISC_CAPACITY=0 fi - DISC_CAPACITY=$(echo "$DISC_CAPACITY / 1024 / 1024" | bc) + DISC_CAPACITY=$(echo "$DISC_CAPACITY / 1024 / 1024" | ${bC} ) # Define usable DVDs HAVE_DVD_RW=$(verify "$DISC_TYPE" set "DVD-RW DVD+RW") @@ -308,12 +308,13 @@ DISC_SUM=0 while test $i -le $NUM_VOBS; do VOB=$(echo "$VOB_LIST" | awk -F ':' '{ print $'$i' }') - VOB_SIZE=$(du -D -B M "$VOB" | awk -F ' ' '{print $1}' | tr -d M) + VOB_SIZE=$(du -H -m "$VOB" | awk '{print $1}') DISC_SUM=$(expr $VOB_SIZE \+ $DISC_SUM) i=$(expr $i \+ 1) done OUTDIR=$(readlink -f "$OUT_DIR") - AVAIL_SPACE=$(df -B M -P "${OUTDIR%/*}" | awk 'NR != 1 {print $4;}' | tr -d M) + AVAIL_SPACE=$(df -P "$OUT_DIR" | awk 'NR==1 {sub("-blocks", "", $2); blocksize=$2} \ + NR!=1 {print int($4/1024*blocksize/1024)}') if test $DISC_SUM -gt $AVAIL_SPACE; then echo $SEPARATOR
View file
tovid-0.35.0.tar.gz/src/makempg -> tovid-0.35.2.tar.gz/src/makempg
Changed
@@ -336,7 +336,7 @@ # based on original file size $SLICE && VIDEO_DURATION=$CLIP_LENGTH || VIDEO_DURATION=$V_DURATION if test "$VIDEO_DURATION" = "0"; then - CUR_SIZE=$(du -Dck "$IN_FILE" | awk 'END{print $1}') + CUR_SIZE=$(du -Hck "$IN_FILE" | awk 'END{print $1}') NEED_SPACE=$(expr $CUR_SIZE \* 2) # Estimate space based as kbps * duration else @@ -757,13 +757,13 @@ test -n "$AVG_BITRATE" && AVG_BITRATE=$(expr $AVG_BITRATE \/ 1000) test -n "$PEAK_BITRATE" && PEAK_BITRATE=$(expr $PEAK_BITRATE \/ 1000) KB_PER_MIN=$(expr $FINAL_SIZE \* 60 \/ $V_DURATION \+ 1) - ENC_TIME_RATIO=$(echo "scale = 2; $SCRIPT_TOT_TIME / $V_DURATION" | bc) + ENC_TIME_RATIO=$(echo "scale = 2; $SCRIPT_TOT_TIME / $V_DURATION" | ${bC} ) if $USE_FFMPEG; then BACKEND="$FFmpeg" else BACKEND="mpeg2enc" fi - + [[ $CPU_SPEED ]] && MHZ=MHz || MHZ= # Final statistics string (pretty-printed) FINAL_STATS_PRETTY=`cat << EOF ---------------------------------------- @@ -775,7 +775,7 @@ Target bitrate: $VID_BITRATE kbits/sec Average bitrate: $AVG_BITRATE kbits/sec Peak bitrate: $PEAK_BITRATE kbits/sec - Took $HHMMSS to encode on $CPU_MODEL $CPU_SPEED mhz + Took $HHMMSS to encode on $CPU_MODEL $CPU_SPEED $MHZ ----------------------------------------- EOF` @@ -1116,13 +1116,13 @@ ((${CLIP_SEEK%.*} > 0)) && [[ -z $ASYNC ]] && ASYNC1="-async 1" if [[ "$CLIP_ENDTIME" ]]; then [[ "$CLIP_ENDTIME" = *:* ]] && CLIP_ENDTIME=$(unformat_time $CLIP_ENDTIME) - CLIP_LENGTH=$(echo "$CLIP_ENDTIME - $CLIP_SEEK" | bc) + CLIP_LENGTH=$(echo "$CLIP_ENDTIME - $CLIP_SEEK" | ${bC} ) [[ ${CLIP_LENGTH%.*} -eq 0 ]] && CLIP_LENGTH=1 FF_LENGTH="-t $CLIP_LENGTH" fi CLIP_SEEK="-ss $CLIP_SEEK" fi -# FRAMES=$(echo "scale = 2; $ID_VIDEO_FPS * $CLIP_ENDTIME" | bc) +# FRAMES=$(echo "scale = 2; $ID_VIDEO_FPS * $CLIP_ENDTIME" | ${bC} ) # MP_FRAMES="-frames ${FRAMES%.*}" @@ -1133,7 +1133,7 @@ yecho "Probing video for information. This may take several minutes..." # Get an MD5sum of the input file for statistics - IN_FILE_MD5=$(md5sum "$IN_FILE" | awk '{print $1}') + IN_FILE_MD5=$($md5sum "$IN_FILE" | awk '{print $1}') # Assume nothing is compliant unless idvid says so # (these will be overridden by idvid for compliant A/V) @@ -1257,7 +1257,7 @@ # When the audio is already compliant and the bitrate is known we # can calculate a more accurate size. if $AUDIO_OK && test "$ID_AUDIO_BITRATE" != "0"; then - AUD_BITRATE=$(echo "scale = 0; $ID_AUDIO_BITRATE / 1000" | bc) + AUD_BITRATE=$(echo "scale = 0; $ID_AUDIO_BITRATE / 1000" | ${bC} ) fi AUDIO_SIZE=$(bc_math "$AUD_BITRATE * $LENGTH / (8 *1024)") VIDEO_SIZE=$(bc_math "$AUD_VID_SIZE - $AUDIO_SIZE") @@ -1665,7 +1665,7 @@ errors=$( $FFmpeg -i "$IN_FILE" -t 1 \ -vf scale=w=720:h=352,pad=width=720:height=480:x=0:y=64,setdar=16/9 \ -f null -y /dev/null 2>&1) -if grep -qE "Error.*\(width\|height\|setdar\|w=\|h=\)" <<< "$errors"; then +if grep -qE "Error.*(width|height|setdar|w=|h=)" <<< "$errors"; then ff_legacy=1 fi @@ -2190,8 +2190,8 @@ # ****************************************************************************** if ! $FAKE; then - AUDIO_SIZE=$(du -c -b "$AUDIO_STREAM" | awk 'END{print $1}') - VIDEO_SIZE=$(du -c -b "$VIDEO_STREAM" | awk 'END{print $1}') + AUDIO_SIZE=$(ls -lnR "$AUDIO_STREAM" | awk 'END{print $5}') + VIDEO_SIZE=$(ls -lnR "$VIDEO_STREAM" | awk 'END{print $5}') # Total size of streams so far (in MBytes) STREAM_SIZE=$(expr \( $AUDIO_SIZE \+ $VIDEO_SIZE \) \/ 1000000) # If it exceeds disc size, add '%d' field to allow mplex to split output
View file
tovid-0.35.0.tar.gz/src/todisc -> tovid-0.35.2.tar.gz/src/todisc
Changed
@@ -80,7 +80,6 @@ # check if symlink in /tmp exists and use time stamped link if so WORK_DIR="/tmp/todisc-work" - LOG_FILE=$(readlink -f todisc.log) OUT_DIRECTORY="" TV_STANDARD=ntsc @@ -332,6 +331,7 @@ # Usage: continue_in [SECONDS] continue_in() { + local count LAST yecho "" (($1)) && LAST=$1 || LAST=5 for ((i=LAST; i>=0; i--)); do @@ -456,19 +456,19 @@ # last 2 args are optional: defaults 'video' and the whole stream. stream_length() { - local end="" + local end="" local stream_type=video local ff_opts="-an -vcodec copy" [[ -n $2 ]] && stream_type=$2 [[ -n $3 ]] && end="-t $3" - sed_var="{s/^.*time= *\([^ ]*\).*/\1/p}" + sed_var="{s/^.*time= *\([^ ]*\).*/\1/p;}" stream_name=$stream_type if [[ $stream_type = 'audio' ]]; then ff_opts="-vn -acodec copy" # workaround for avconv which is broken atm wrt getting m2v framerate right # overload stream_type to have another meaning, elif [[ $stream_type = 'm2v' ]]; then - sed_var="{s/^.*frame= *\([^ ]*\).*/\1/p}" + sed_var="{s/^.*frame= *\([^ ]*\).*/\1/p;}" stream_name=video fi print2log "Using $FFmpeg to get accurate $stream_name length of $1" @@ -598,9 +598,11 @@ # usage: bc_math "expression" [int] bc_math() { + local val=$1 + #val=${val//$'\n'/} OLC_ALL=$LC_ALL LC_ALL=C - bc_out=$(bc <<< "scale=3;$1" 2>/dev/null) + bc_out=$( ${bC} <<< "scale=3;$val" 2>/dev/null) if [[ -n $2 && $2 = "int" ]]; then echo ${bc_out%.*} else @@ -967,7 +969,7 @@ video_type=$3 yecho "" yecho "$VIDEO_IN is not compliant - re-encoding \ - $(bc <<< "$VIDEO_IN_SEEK + ${MENU_LEN[MENU_NUM-1]}" 2>/dev/null) + $( ${bC} <<< "$VIDEO_IN_SEEK + ${MENU_LEN[MENU_NUM-1]}" 2>/dev/null) second slice to DVD compliant file" yecho "This is not strictly necessary and will reduce quality, but it may" yecho "help with sync problems if using the same file for audio and video." @@ -984,7 +986,7 @@ yecho "Converting files to $TGT_CAPS format with 'makempg'" continue_in 5 makempg $NO_ASK -in "$VIDEO_IN" \ - -slice 0-$(bc <<< "$VIDEO_IN_SEEK + ${MENU_LEN[MENU_NUM-1]}" 2>/dev/null) \ + -slice 0-$( ${bC} <<< "$VIDEO_IN_SEEK + ${MENU_LEN[MENU_NUM-1]}" 2>/dev/null) \ -${TV_STANDARD} -${TARGET} -in "$VIDEO_IN" \ -out "${VIDEO_IN}.enc" "${TOVID_OPTS[@]}" # See if output file exists @@ -1039,7 +1041,7 @@ done else for len in ${GROUP_VIDEO_LENGTHS[@]}; do - adjusted_length=$( bc <<< "scale=3; $len + $remainder" 2>/dev/null) + adjusted_length=$( ${bC} <<< "scale=3; $len + $remainder" 2>/dev/null) num_chapters=$( bc_math "$adjusted_length / $chapter_length" int ) if (( num_chapters > 0)); then chapt_len_array=( $( for ((t=0; t<num_chapters; t++)); do @@ -1050,7 +1052,7 @@ chapter_points=$( running_total <<< ${chapt_len_array[@]} ) # remove trailing space chapter_points=$(sed 's/[ \t]*$//' <<< $chapter_points) - remainder=$( bc <<< "$adjusted_length % $chapter_length" \ + remainder=$( ${bC} <<< "$adjusted_length % $chapter_length" \ 2>/dev/null) (( ${nochapt[index]} )) && local group_chapters[x++]=0 || local group_chapters[x++]=$chapter_points @@ -1353,7 +1355,7 @@ MENUTITLES=( "${menutitles[@]}" ) # some vars for vmgm menu, depending on presence of -static or -quick-nav # how many titlesets do we have ? - for i in "$@"; do [[ $i == -end-titleset ]] && ((count++)); done + for i in "$@"; do [[ $i == -end-titleset ]] && ((tscount++)); done VMGM_PAUSE=$PAUSE_TIME grep -q -- -static <<< "${VMGM_OPTS[@]}" && VMGM_PAUSE="inf" for i in ${!VMGM_OPTS[@]}; do @@ -1422,7 +1424,7 @@ fi) $(if $QUICK_NAV; then echo -e " <button name=\"ActionLeft\">" - echo -e " g5=${ALLTITLES[count-1]}; g3=$count; button=1024;" + echo -e " g5=${ALLTITLES[tscount-1]}; g3=$tscount; button=1024;" echo -e " jump vmgm menu entry title;</button>" echo -e " <button name=\"ActionRight\">" echo -e " g5=1; g3=1; button=1024;" @@ -1485,7 +1487,7 @@ done unset vmgmtitles get_menu_titles "${VMGM_OPTS[@]}" - if [[ -n ${VMGM_OPTS[@]} ]] && ((${#vmgmtitles[@]} != count)); then + if [[ -n ${VMGM_OPTS[@]} ]] && ((${#vmgmtitles[@]} != tscount)); then usage_error "Number of titleset titles must equal the number of titlesets. ( -vmgm ... -titles 'Title 1' 'Title 2' -end-vmgm )" fi @@ -1499,14 +1501,14 @@ yecho "One title for each titleset you are making." yecho "Any other appropriate todisc options for the vmgm menu \ can be specified as well." - if [[ ${#MENUTITLES[@]} -eq $count ]]; then + if [[ ${#MENUTITLES[@]} -eq $tscount ]]; then yecho "Since -menu-title was supplied for each titleset: \ these titleset titles will be used:" for t in "${MENUTITLES[@]}"; do echo "\"$t\""; done VMGM_OPTS=(-titles "${MENUTITLES[@]}") else VMGM_OPTS[0]="-titles" - for ((menu=1; menu<=count; menu++)); do + for ((menu=1; menu<=tscount; menu++)); do VMGM_OPTS[menu]="Titleset $menu" done fi @@ -1517,7 +1519,7 @@ else unset vmgmtitles get_menu_titles "${VMGM_OPTS[@]}" - if ((${#vmgmtitles[@]} != 0)) && ((${#vmgmtitles[@]} != count)); then + if ((${#vmgmtitles[@]} != 0)) && ((${#vmgmtitles[@]} != tscount)); then usage_error "Number of titleset titles must equal the number of titlesets." fi @@ -1546,7 +1548,7 @@ shift done titleset_cmd=( todisc -titleset-mode -basedir "$WORK_DIR" \ - -title_count "$num_titles" -tset_num ${count}-${tset} \ + -title_count "$num_titles" -tset_num ${tscount}-${tset} \ "${GEN_OPTS[@]}" $NO_CONFIRM_BACKUP "${TITLESET_OPTS[@]}" \ $vmgm_playall ) yecho @@ -1659,14 +1661,14 @@ clr1="$colr1" fi - mk_rtn_cmd=(convert -size 100x80 xc:none \ + mk_rtn_cmd=(convert +antialias -size 100x80 xc:none \ -strokewidth 1 -stroke "$colr2" -fill "$clr1" \ -draw 'rectangle 0,0 70,62' \ -fill "$colr2" -stroke none \ -draw "polyline 40,10 40,50 10,30 40,10" \ -draw "polyline 60,10 60,50 30,30 60,10" \ -fill "$colr2" -draw "rectangle 6,10 10,50" \ - -resize 30% -trim +repage +antialias "$outbutton") + -resize 30% -trim +repage "$outbutton") print2log "Running ${mk_rtn_cmd[@]}" "${mk_rtn_cmd[@]}" mogrify -channel A -threshold 50% "$outbutton" @@ -1698,6 +1700,7 @@ play_btn_dim=$(get_image_dim "$outbutton") play_btn_width=$(awk -Fx '{print $1}' <<< $play_btn_dim ) play_btn_height=$(awk -Fx '{print $2}' <<< $play_btn_dim ) + mogrify -channel A -threshold 50% "$outbutton" } check_menufile() @@ -2115,16 +2118,16 @@ index=$2 outppm="$WORK_DIR/animenu/$(printf %06d%s $index .ppm)" if [[ $fade_type = "crossfade" ]]; then - value=$(bc -l <<< "scale=2; ($fade_slide + 1) * $fade_incr") >&2 + value=$( ${bC} -l <<< "scale=2; ($fade_slide + 1) * $fade_incr") >&2 fade_cmd=(composite -blend $value -depth 8 "$overlay_ppm" \ "$base_ppm" "$outppm") elif [[ $fade_type = "fadein" ]]; then - value=$(bc -l <<< "scale=2; $fade_slide * $fade_incr") >&2 + value=$( ${bC} -l <<< "scale=2; $fade_slide * $fade_incr") >&2 fade_cmd=(composite -depth 8 "$base_ppm" "$WORK_DIR/black.ppm" \ -blend ${value}% "$outppm") elif [[ $fade_type = "fadeout" ]]; then - value=$(bc -l <<< "scale=2;100 - (($fade_slide + 1) * $fade_incr)") >&2 - (( $(bc <<< "$value < 0") == 1 )) && value=0 + value=$( ${bC} -l <<< "scale=2;100 - (($fade_slide + 1) * $fade_incr)") >&2 + (( $( ${bC} <<< "$value < 0") == 1 )) && value=0 fade_cmd=(composite -depth 8 "$base_ppm" "$WORK_DIR/black.ppm" \ -blend ${value}% "$outppm") fi @@ -3558,8 +3561,7 @@ # check for multiple cpus if -jobs not passed already #TODO always wait for either 1 or 2 processes - no need for if block later if [[ -z $JOBS ]]; then
View file
tovid-0.35.0.tar.gz/src/todisc-fade-routine -> tovid-0.35.2.tar.gz/src/todisc-fade-routine
Changed
@@ -211,14 +211,14 @@ init_gamma_array () { -bc -l <<BC_EOF +${bC} -l <<BC_EOF pi=4*a(1); start_frame=0 # Get values from standard in # Format: -# echo "29.97\n 300\n 10\n .1\n 5\n .05\n .1\n" | bc -l +# echo "29.97\n 300\n 10\n .1\n 5\n .05\n .1\n" | ${bC} -l frame_rate=$FRAME_RATE; end_frame=$ANIMENU_ENDFRAME; average=$1;
View file
tovid-0.35.0.tar.gz/src/tovid-init -> tovid-0.35.2.tar.gz/src/tovid-init
Changed
@@ -45,7 +45,7 @@ #set -u # Suite version -TOVID_VERSION="0.35.0" +TOVID_VERSION="0.35.2" # String used to separate blocks of output SEPARATOR="=========================================================" @@ -55,6 +55,7 @@ TOVID_FORUMS="http://groups.google.com/group/tovid-users" TOVID_ISSUES="https://github.com/tovid-suite/tovid/issues" + # ****************************************************************************** # ****************************************************************************** # @@ -190,7 +191,7 @@ HMS_SECS=$(awk -F ':' '{print $3}' <<< $1) # allow integer to be passed, if so it will be echoed unchanged if [[ $1 = *:* ]]; then - TOT_SECONDS=$(bc <<< "($HMS_HOURS * 3600) + ($HMS_MINS * 60) + $HMS_SECS") + TOT_SECONDS=$( ${bC} <<< "($HMS_HOURS * 3600) + ($HMS_MINS * 60) + $HMS_SECS") else TOT_SECONDS=$1 fi @@ -281,7 +282,7 @@ # Wait for input file to appear # After a 30-second timeout, exit gracefully CUR_TIME=30 - while test $CUR_TIME -gt 0; do + while test $CUR_TIME -gt 0; do sleep 3 # If file exists, wait a few more seconds, then break out if test -e "$FOP_OUTFILE"; then @@ -304,7 +305,8 @@ # File size in bytes FOP_LAST_SIZE=0 - FOP_CUR_SIZE=$(du -b "$FOP_OUTFILE" | awk '{print $1}') + # BSD compatibiity, yes I know parsing ls is bad + FOP_CUR_SIZE=$(ls -lnR "$FOP_OUTFILE" | awk 'END{print $5}') # Keep looping until outfile stops getting bigger while test "$FOP_CUR_SIZE" -gt "$FOP_LAST_SIZE"; do @@ -323,11 +325,11 @@ "$ANIM_STR" "$FOP_MSG" "$FOP_CUR_MB" "$FOP_BASENAME_NAME" # Doze a bit to let the file size increase - # (SLEEP_TIME defaults to 1s if unset) - sleep ${SLEEP_TIME-"1"} + # freebsd couldn't handle ${SLEEP_TIME-1} so leave at 1s + sleep 1 FOP_LAST_SIZE=$FOP_CUR_SIZE - FOP_CUR_SIZE=$(du -b "$FOP_OUTFILE" | awk '{print $1}') + FOP_CUR_SIZE=$(ls -lnR "$FOP_OUTFILE" | awk 'END{print $5}') done $QUIET && printf "\n" || printf "\n\n" } @@ -398,7 +400,7 @@ bc_math() # usage: bc_math "expression" [int] { - bc_out=$(bc <<< "scale=3;$1" 2>/dev/null) + bc_out=$( ${bC} <<< "scale=3;$1" 2>/dev/null) if [[ -n $2 && $2 = "int" ]]; then echo ${bc_out%.*} else @@ -455,6 +457,25 @@ printf "\n" } +# BSD's readlink behaves differently than GNU's. Use python instead +# This is just a replacement for readlink -f which is used in our scripts, +# though it could be adapted for other options easily enough. +if [[ $(uname -s) =~ BSD ]]; then + readlink () + { + local args out parent_dir; + args=(); + for arg in "$@"; do + case "$arg" in + -[a-zA-Z0-9]) ;; + *) args+=($arg) ;; + esac; + done; + out="\"${args[*]}\""; + python -c "import os.path; print os.path.realpath($out)" + } +fi + # ****************************************************************************** # # @@ -476,15 +497,28 @@ /proc/cpuinfo | head -n 1 | sed 's/^ *//g') CPU_SPEED=$(awk 'BEGIN { IGNORECASE = 1 } /MHz/ { print $4 }' /proc/cpuinfo | head -n 1) # Test for multiple CPUs. If they are available, try to use them. - if test $(grep "^processor" /proc/cpuinfo | wc -l) -ge "2"; then - MULTIPLE_CPUS=: - else - MULTIPLE_CPUS=false - fi + cpu_count=$(grep "^processor" /proc/cpuinfo | wc -l) + ((cpu_count > 1)) && MULTIPLE_CPUS=: || MULTIPLE_CPUS=false elif test "$KERNEL" = "Darwin"; then - : + (( $(sysctl -n hw.ncpu) > 1 )) && MULTIPLE_CPUS=: || MULTIPLE_CPUS=false +elif [[ $KERNEL =~ BSD ]]; then + cpu_count=$(sysctl hw.ncpu | awk '{print $2}') + ((cpu_count > 1)) && MULTIPLE_CPUS=: + CPU_MODEL=$(sysctl hw.model |sed 's/.*: \(.*\)@/\1/') + CPU_SPEED='' fi +# use gnubc on bsd systems (found in /usr/local) +# bsd uses md5, which needs -r to print hash in 1st column +if [[ $KERNEL =~ 'BSD' ]]; then + bC=/usr/local/bin/bc + md5=md5 + md5sum="md5 -r" +else + bC=$(which bc) + md5=md5sum + md5sum=md5sum +fi # ****************************************************************************** # Find multiple version kludge @@ -558,10 +592,19 @@ [[ $TOVID_OUTPUT_DIR ]] && OUTPUT_DIR="$TOVID_WORKING_DIR" [[ $TOVID_FFMPEG_CMD ]] && TOVID_FFMPEG="$TOVID_FFMPEG_CMD" # FFmpeg and FFprobe are vars used for ffmpeg by scripts needing ffmpeg/avconv -# if avconv is installed, use that unless env var set -hash avconv 2>/dev/null && TOVID_FFMPEG=${TOVID_FFMPEG:-avconv} -hash avprobe 2>/dev/null && TOVID_FFPROBE=${TOVID_FFPROBE:=avprobe} +# if ffmpeg is installed, use that unless env var set +if hash ffmpeg 2>/dev/null; then + TOVID_FFMPEG=${TOVID_FFMPEG:-ffmpeg} +elif hash avconv 2>/dev/null; then + TOVID_FFMPEG=${TOVID_FFMPEG:-avconv} +fi +if hash ffprobe 2>/dev/null; then + TOVID_FFPROBE=${TOVID_FFPROBE:=ffprobe} +elif hash ffprobe 2>/dev/null; then + TOVID_FFPROBE=${TOVID_FFPROBE:=avprobe} +fi # finally, default to ffmpeg if non of the above override it +# this will cause the assert_dep to recommend installing ffmpeg FFmpeg=${TOVID_FFMPEG:=ffmpeg} [[ $FFmpeg =~ ffmpeg ]] && TOVID_FFPROBE=ffprobe [[ $FFmpeg =~ avconv ]] && TOVID_FFPROBE=avprobe @@ -593,7 +636,7 @@ # ************************************************************************* # Required Dependencies # ************************************************************************* - core="grep sed md5sum mplayer mplex mpeg2enc yuvfps yuvdenoise ppmtoy4m mp2enc jpeg2yuv" + core="grep sed $md5 mplayer mplex mpeg2enc yuvfps yuvdenoise ppmtoy4m mp2enc jpeg2yuv" # ************************************************************************* # Optional Dependencies @@ -633,7 +676,7 @@ # Quit and complain if ANY core dependency is missing. assert_dep "$core" "You are missing CORE tovid dependencies!" # ffmpeg is also a part of core deps, but is taken care of here - ffmpeg_alts="Use either ffmpeg (ffmpeg.org) or avconv (libav.org)." + ffmpeg_alts="Use ffmpeg from ffmpeg.org (recommended), or avconv from libav.org." ffmpeg_pref="Set choice in ${USER_PREFS}. As in: TOVID_FFMPEG=ffmpeg" assert_dep $FFmpeg "You are missing $FFmpeg ! $ffmpeg_alts ${ffmpeg_pref}."
View file
tovid-0.35.0.tar.gz/src/tovid-init.in -> tovid-0.35.2.tar.gz/src/tovid-init.in
Changed
@@ -55,6 +55,7 @@ TOVID_FORUMS="http://groups.google.com/group/tovid-users" TOVID_ISSUES="https://github.com/tovid-suite/tovid/issues" + # ****************************************************************************** # ****************************************************************************** # @@ -190,7 +191,7 @@ HMS_SECS=$(awk -F ':' '{print $3}' <<< $1) # allow integer to be passed, if so it will be echoed unchanged if [[ $1 = *:* ]]; then - TOT_SECONDS=$(bc <<< "($HMS_HOURS * 3600) + ($HMS_MINS * 60) + $HMS_SECS") + TOT_SECONDS=$( ${bC} <<< "($HMS_HOURS * 3600) + ($HMS_MINS * 60) + $HMS_SECS") else TOT_SECONDS=$1 fi @@ -281,7 +282,7 @@ # Wait for input file to appear # After a 30-second timeout, exit gracefully CUR_TIME=30 - while test $CUR_TIME -gt 0; do + while test $CUR_TIME -gt 0; do sleep 3 # If file exists, wait a few more seconds, then break out if test -e "$FOP_OUTFILE"; then @@ -304,7 +305,8 @@ # File size in bytes FOP_LAST_SIZE=0 - FOP_CUR_SIZE=$(du -b "$FOP_OUTFILE" | awk '{print $1}') + # BSD compatibiity, yes I know parsing ls is bad + FOP_CUR_SIZE=$(ls -lnR "$FOP_OUTFILE" | awk 'END{print $5}') # Keep looping until outfile stops getting bigger while test "$FOP_CUR_SIZE" -gt "$FOP_LAST_SIZE"; do @@ -323,11 +325,11 @@ "$ANIM_STR" "$FOP_MSG" "$FOP_CUR_MB" "$FOP_BASENAME_NAME" # Doze a bit to let the file size increase - # (SLEEP_TIME defaults to 1s if unset) - sleep ${SLEEP_TIME-"1"} + # freebsd couldn't handle ${SLEEP_TIME-1} so leave at 1s + sleep 1 FOP_LAST_SIZE=$FOP_CUR_SIZE - FOP_CUR_SIZE=$(du -b "$FOP_OUTFILE" | awk '{print $1}') + FOP_CUR_SIZE=$(ls -lnR "$FOP_OUTFILE" | awk 'END{print $5}') done $QUIET && printf "\n" || printf "\n\n" } @@ -398,7 +400,7 @@ bc_math() # usage: bc_math "expression" [int] { - bc_out=$(bc <<< "scale=3;$1" 2>/dev/null) + bc_out=$( ${bC} <<< "scale=3;$1" 2>/dev/null) if [[ -n $2 && $2 = "int" ]]; then echo ${bc_out%.*} else @@ -455,6 +457,25 @@ printf "\n" } +# BSD's readlink behaves differently than GNU's. Use python instead +# This is just a replacement for readlink -f which is used in our scripts, +# though it could be adapted for other options easily enough. +if [[ $(uname -s) =~ BSD ]]; then + readlink () + { + local args out parent_dir; + args=(); + for arg in "$@"; do + case "$arg" in + -[a-zA-Z0-9]) ;; + *) args+=($arg) ;; + esac; + done; + out="\"${args[*]}\""; + python -c "import os.path; print os.path.realpath($out)" + } +fi + # ****************************************************************************** # # @@ -476,15 +497,28 @@ /proc/cpuinfo | head -n 1 | sed 's/^ *//g') CPU_SPEED=$(awk 'BEGIN { IGNORECASE = 1 } /MHz/ { print $4 }' /proc/cpuinfo | head -n 1) # Test for multiple CPUs. If they are available, try to use them. - if test $(grep "^processor" /proc/cpuinfo | wc -l) -ge "2"; then - MULTIPLE_CPUS=: - else - MULTIPLE_CPUS=false - fi + cpu_count=$(grep "^processor" /proc/cpuinfo | wc -l) + ((cpu_count > 1)) && MULTIPLE_CPUS=: || MULTIPLE_CPUS=false elif test "$KERNEL" = "Darwin"; then - : + (( $(sysctl -n hw.ncpu) > 1 )) && MULTIPLE_CPUS=: || MULTIPLE_CPUS=false +elif [[ $KERNEL =~ BSD ]]; then + cpu_count=$(sysctl hw.ncpu | awk '{print $2}') + ((cpu_count > 1)) && MULTIPLE_CPUS=: + CPU_MODEL=$(sysctl hw.model |sed 's/.*: \(.*\)@/\1/') + CPU_SPEED='' fi +# use gnubc on bsd systems (found in /usr/local) +# bsd uses md5, which needs -r to print hash in 1st column +if [[ $KERNEL =~ 'BSD' ]]; then + bC=/usr/local/bin/bc + md5=md5 + md5sum="md5 -r" +else + bC=$(which bc) + md5=md5sum + md5sum=md5sum +fi # ****************************************************************************** # Find multiple version kludge @@ -558,10 +592,19 @@ [[ $TOVID_OUTPUT_DIR ]] && OUTPUT_DIR="$TOVID_WORKING_DIR" [[ $TOVID_FFMPEG_CMD ]] && TOVID_FFMPEG="$TOVID_FFMPEG_CMD" # FFmpeg and FFprobe are vars used for ffmpeg by scripts needing ffmpeg/avconv -# if avconv is installed, use that unless env var set -hash avconv 2>/dev/null && TOVID_FFMPEG=${TOVID_FFMPEG:-avconv} -hash avprobe 2>/dev/null && TOVID_FFPROBE=${TOVID_FFPROBE:=avprobe} +# if ffmpeg is installed, use that unless env var set +if hash ffmpeg 2>/dev/null; then + TOVID_FFMPEG=${TOVID_FFMPEG:-ffmpeg} +elif hash avconv 2>/dev/null; then + TOVID_FFMPEG=${TOVID_FFMPEG:-avconv} +fi +if hash ffprobe 2>/dev/null; then + TOVID_FFPROBE=${TOVID_FFPROBE:=ffprobe} +elif hash ffprobe 2>/dev/null; then + TOVID_FFPROBE=${TOVID_FFPROBE:=avprobe} +fi # finally, default to ffmpeg if non of the above override it +# this will cause the assert_dep to recommend installing ffmpeg FFmpeg=${TOVID_FFMPEG:=ffmpeg} [[ $FFmpeg =~ ffmpeg ]] && TOVID_FFPROBE=ffprobe [[ $FFmpeg =~ avconv ]] && TOVID_FFPROBE=avprobe @@ -593,7 +636,7 @@ # ************************************************************************* # Required Dependencies # ************************************************************************* - core="grep sed md5sum mplayer mplex mpeg2enc yuvfps yuvdenoise ppmtoy4m mp2enc jpeg2yuv" + core="grep sed $md5 mplayer mplex mpeg2enc yuvfps yuvdenoise ppmtoy4m mp2enc jpeg2yuv" # ************************************************************************* # Optional Dependencies @@ -633,7 +676,7 @@ # Quit and complain if ANY core dependency is missing. assert_dep "$core" "You are missing CORE tovid dependencies!" # ffmpeg is also a part of core deps, but is taken care of here - ffmpeg_alts="Use either ffmpeg (ffmpeg.org) or avconv (libav.org)." + ffmpeg_alts="Use ffmpeg from ffmpeg.org (recommended), or avconv from libav.org." ffmpeg_pref="Set choice in ${USER_PREFS}. As in: TOVID_FFMPEG=ffmpeg" assert_dep $FFmpeg "You are missing $FFmpeg ! $ffmpeg_alts ${ffmpeg_pref}."
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.