From 61237e2ababf9bdfb1817a43ae2e8f578bffb607 Mon Sep 17 00:00:00 2001 From: David Bartley Date: Wed, 11 Jul 2007 19:23:15 -0400 Subject: [PATCH 1/1] Initial commit. --- build-stamp | 0 configure-stamp | 0 debian/README | 6 ++++ debian/README.Debian | 6 ++++ debian/changelog | 5 +++ debian/compat | 1 + debian/control | 12 +++++++ debian/copyright | 40 +++++++++++++++++++++ debian/dirs | 2 ++ debian/docs | 0 debian/rules | 100 +++++++++++++++++++++++++++++++++++++++++++++++++++ encodetalks-audio | 17 +++++++++ encodetalks-video | 29 +++++++++++++++ 13 files changed, 218 insertions(+) create mode 100644 build-stamp create mode 100644 configure-stamp create mode 100644 debian/README create mode 100644 debian/README.Debian create mode 100644 debian/changelog create mode 100644 debian/compat create mode 100644 debian/control create mode 100644 debian/copyright create mode 100644 debian/dirs create mode 100644 debian/docs create mode 100755 debian/rules create mode 100755 encodetalks-audio create mode 100755 encodetalks-video diff --git a/build-stamp b/build-stamp new file mode 100644 index 0000000..e69de29 diff --git a/configure-stamp b/configure-stamp new file mode 100644 index 0000000..e69de29 diff --git a/debian/README b/debian/README new file mode 100644 index 0000000..c17f62e --- /dev/null +++ b/debian/README @@ -0,0 +1,6 @@ +The Debian Package csc-encode +---------------------------- + +Comments regarding the Package + + -- David Bartley Sat, 07 Jul 2007 05:09:09 -0400 diff --git a/debian/README.Debian b/debian/README.Debian new file mode 100644 index 0000000..2ab08d2 --- /dev/null +++ b/debian/README.Debian @@ -0,0 +1,6 @@ +csc-encode for Debian +--------------------- + + + + -- David Bartley Sat, 07 Jul 2007 05:09:09 -0400 diff --git a/debian/changelog b/debian/changelog new file mode 100644 index 0000000..94f1181 --- /dev/null +++ b/debian/changelog @@ -0,0 +1,5 @@ +csc-encode (1.0) unstable; urgency=low + + * Initial Release. + + -- David Bartley Sat, 07 Jul 2007 05:09:09 -0400 diff --git a/debian/compat b/debian/compat new file mode 100644 index 0000000..7ed6ff8 --- /dev/null +++ b/debian/compat @@ -0,0 +1 @@ +5 diff --git a/debian/control b/debian/control new file mode 100644 index 0000000..e6afbcf --- /dev/null +++ b/debian/control @@ -0,0 +1,12 @@ +Source: csc-encode +Section: misc +Priority: optional +Maintainer: David Bartley +Build-Depends: debhelper (>= 5) +Standards-Version: 3.7.2 + +Package: csc-encode +Architecture: all +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: Scripts that the CSC uses to encode talks. + Scripts that the CSC uses to encode talks. diff --git a/debian/copyright b/debian/copyright new file mode 100644 index 0000000..eef644d --- /dev/null +++ b/debian/copyright @@ -0,0 +1,40 @@ +This package was debianized by David Bartley on +Sat, 07 Jul 2007 05:09:09 -0400. + +It was downloaded from + +Upstream Author(s): + + + + +Copyright: + + + + +License: + + This package is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This package is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this package; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +On Debian systems, the complete text of the GNU General +Public License can be found in `/usr/share/common-licenses/GPL'. + +The Debian packaging is (C) 2007, David Bartley and +is licensed under the GPL, see above. + + +# Please also look if there are files or directories which have a +# different copyright/license attached and list them here. diff --git a/debian/dirs b/debian/dirs new file mode 100644 index 0000000..ca882bb --- /dev/null +++ b/debian/dirs @@ -0,0 +1,2 @@ +usr/bin +usr/sbin diff --git a/debian/docs b/debian/docs new file mode 100644 index 0000000..e69de29 diff --git a/debian/rules b/debian/rules new file mode 100755 index 0000000..d74bf58 --- /dev/null +++ b/debian/rules @@ -0,0 +1,100 @@ +#!/usr/bin/make -f +# -*- makefile -*- +# Sample debian/rules that uses debhelper. +# This file was originally written by Joey Hess and Craig Small. +# As a special exception, when this file is copied by dh-make into a +# dh-make output file, you may use that output file without restriction. +# This special exception was added by Craig Small in version 0.37 of dh-make. + +# Uncomment this to turn on verbose mode. +#export DH_VERBOSE=1 + + + + +CFLAGS = -Wall -g + +ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) + CFLAGS += -O0 +else + CFLAGS += -O2 +endif + +configure: configure-stamp +configure-stamp: + dh_testdir + # Add here commands to configure the package. + + touch configure-stamp + + +build: build-stamp + +build-stamp: configure-stamp + dh_testdir + + # Add here commands to compile the package. + #$(MAKE) + #docbook-to-man debian/csc-encode.sgml > csc-encode.1 + + touch $@ + +clean: + dh_testdir + dh_testroot + rm -f build-stamp configure-stamp + + # Add here commands to clean up after the build process. + #$(MAKE) clean + + dh_clean + +install: build + dh_testdir + dh_testroot + dh_clean -k + dh_installdirs + + # Add here commands to install the package into debian/csc-encode. + #$(MAKE) DESTDIR=$(CURDIR)/debian/csc-encode install + install -m 755 encodetalks-video $(CURDIR)/debian/csc-encode/usr/bin/encodetalks-video + install -m 755 encodetalks-audio $(CURDIR)/debian/csc-encode/usr/bin/encode-talks-audio + + +# Build architecture-independent files here. +binary-indep: build install +# We have nothing to do by default. + +# Build architecture-dependent files here. +binary-arch: build install + dh_testdir + dh_testroot + dh_installchangelogs + dh_installdocs + dh_installexamples +# dh_install +# dh_installmenu +# dh_installdebconf +# dh_installlogrotate +# dh_installemacsen +# dh_installpam +# dh_installmime +# dh_python +# dh_installinit +# dh_installcron +# dh_installinfo + dh_installman + dh_link + dh_strip + dh_compress + dh_fixperms +# dh_perl +# dh_makeshlibs + dh_installdeb + dh_shlibdeps + dh_gencontrol + dh_md5sums + dh_builddeb + +binary: binary-indep binary-arch +.PHONY: build clean binary-indep binary-arch binary install configure diff --git a/encodetalks-audio b/encodetalks-audio new file mode 100755 index 0000000..f81a956 --- /dev/null +++ b/encodetalks-audio @@ -0,0 +1,17 @@ +#!/bin/sh + +A_BIT_RATE=128 + +if [ $# != "2" ] ; then + echo "Usage input.wav output_prefix"; exit; +fi + +mkdir $2 2> /dev/null + +# mp3 +echo ffmpeg -i $1 -acodec mp3 -ab $A_BIT_RATE $2/$2.mp3 +# ogg +echo ffmpeg -i $1 -acodec vorbis -ab $A_BIT_RATE $2/$2.ogg +# flac +echo ffmpeg -i $1 -acodec flac $2/$2.flac +# TODO: ram, wma diff --git a/encodetalks-video b/encodetalks-video new file mode 100755 index 0000000..9ce84fc --- /dev/null +++ b/encodetalks-video @@ -0,0 +1,29 @@ +#!/bin/sh + +V_BIT_RATE=1024kb +A_BIT_RATE=128kb + +if [ $# != "2" ] ; then + echo "Usage input.avi output_prefix"; exit; +fi + +mkdir $2 2> /dev/null + +# TODO (gdcosta) +# Have ffmpeg rip xvid, aac and mp3 output separately so we can just mux +# avi and mp4 instead of encoding twice + +# xvid +# mp3 +# aac + +# avi (xvid, mp3) +ffmpeg -i $1 -vcodec xvid -b $V_BIT_RATE -acodec mp3 -ab $A_BIT_RATE $2/$2.avi +# mp4 (xvid, aac) +ffmpeg -i $1 -vcodec xvid -b $V_BIT_RATE -acodec aac -ab $A_BIT_RATE $2/$2.mp4 +# mpg (mpeg2, mp2) +ffmpeg -i $1 -vcodec mpeg2video -b $V_BIT_RATE -acodec mp2 -ab $A_BIT_RATE $2/$2.mpg +# ogg (theora, vorbis) +ffmpeg2theora -V $V_BIT_RATE -A $A_BIT_RATE -o $2/$2.ogg $1 +# flv +ffmpeg -i $1 -f flv -ab $A_BIT_RATE -b $V_BIT_RATE -ar 22050 $2/$2.flv -- 2.11.0