summaryrefslogtreecommitdiff
path: root/localvideopostprocess
diff options
context:
space:
mode:
Diffstat (limited to 'localvideopostprocess')
-rwxr-xr-xlocalvideopostprocess49
1 files changed, 49 insertions, 0 deletions
diff --git a/localvideopostprocess b/localvideopostprocess
new file mode 100755
index 0000000..9a65425
--- /dev/null
+++ b/localvideopostprocess
@@ -0,0 +1,49 @@
+#!/bin/sh
+# Copyright © 2012-2014 Jonas Smedegaard <dr@jones.dk>
+# Description: post-process fast-recorded multitrack video
+#
+# This program 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 3, or (at your option)
+# any later version.
+#
+# This program 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 program. If not, see <http://www.gnu.org/licenses/>.
+#
+# Depends: libav-tools
+#
+# TODO: add --help option
+# TODO: make codecs, rates etc. configurable
+# TODO: include SMTPE channel
+# TODO: Check and ask if outfile already exist
+# TODO: Add --force option to skip asking for overwriting
+
+set -e
+
+input="${1:-dump.nut}"
+output="${2:-dump.mkv}"
+
+#vcodec=huffyuv # more common
+#vcodec=ffvhuff # more compact, supports YV12 colorspace
+vcodec=ffv1 # most compact, supports RGBA colorspace, too CPU-hungry
+
+acodec=pcm_s16le
+
+#vf="${vf:+$vf }-vf setpts=(RTCTIME-RTCSTART)/(TB*1000000)" # current time
+vf="${vf:+$vf }-vf hqdn3d" # high-quality denoise (good for webcams)
+#font='/usr/share/fonts/truetype/droid/DroidSans.ttf'
+#vf="${vf:+$vf }-vf "drawtext=fontfile=$font: timecode='09\:57\:00\:00': r=25: x=(w-tw)/2: y=h-(2*lh): fontcolor=white: box=1: boxcolor=0x00000000@1"}"
+#vf="${vf:+$vf }-vf "drawtext=fontfile=DroidSans.ttf:'timecode=09\:57\:00\:00':r=25:x=\(w-tw\)/2:y=h-\(2*lh\):fontcolor=white:box=1:boxcolor=0x00000000@1"}"
+
+inargs="-i file:$input"
+maps="-map 0"
+voutargs="-c:v $vcodec $vf ${outrate:+-r $outrate}"
+aoutargs="-c:a $acodec"
+
+echo avconv -threads auto $inargs $maps $voutargs $aoutargs -y "$output"
+exec avconv -threads auto $inargs $maps $voutargs $aoutargs -y "$output"
/> -rw-r--r--tags/80/31/20210225175826.GA3689@reader/unread0
-rw-r--r--tags/80/31/20230414051235.1DC82F4C@xayide.jones.dk/jones0
-rw-r--r--tags/80/31/20230414051235.1DC82F4C@xayide.jones.dk/sys0
-rw-r--r--tags/80/31/20230414051235.1DC82F4C@xayide.jones.dk/unread0
-rw-r--r--tags/80/31/555030B2.3080909@jones.dk/inbox0
-rw-r--r--tags/80/31/555030B2.3080909@jones.dk/old0
-rw-r--r--tags/80/31/555030B2.3080909@jones.dk/signed0
-rw-r--r--tags/80/31/AANLkTinmVf_+X5TL+_2rk5scJs6Ow1CYxN1wdriDfZ4a@mail.gmail.com/debian0
-rw-r--r--tags/80/31/DCB85FE1-D8CA-4466-96AC-8E1D9B0DBB15@kaospilot.dk/hb0
-rw-r--r--tags/80/31/DCB85FE1-D8CA-4466-96AC-8E1D9B0DBB15@kaospilot.dk/unread0
-rw-r--r--tags/80/31/SNT125-W18344AF116036F964C70A69C6E0@phx.gbl/debian0
-rw-r--r--tags/80/31/SNT125-W18344AF116036F964C70A69C6E0@phx.gbl/replied0
-rw-r--r--tags/80/31/T24272035I73743857A81803276E@utdezzb/inbox0
-rw-r--r--tags/80/31/T24272035I73743857A81803276E@utdezzb/killed0
-rw-r--r--tags/80/31/T24272035I73743857A81803276E@utdezzb/unread0
-rw-r--r--tags/80/31/YlCshiynSf+9J%2fYs@roeckx.be/debian0
-rw-r--r--tags/80/31/YlCshiynSf+9J%2fYs@roeckx.be/signed0
-rw-r--r--tags/80/31/YlCshiynSf+9J%2fYs@roeckx.be/unread0
-rw-r--r--tags/80/31/mailman.39.1599721202.12638.pkg-sass-devel@alioth-lists.debian.net/inbox0
-rw-r--r--tags/80/31/mailman.39.1599721202.12638.pkg-sass-devel@alioth-lists.debian.net/killed0
-rw-r--r--tags/80/31/mailman.39.1599721202.12638.pkg-sass-devel@alioth-lists.debian.net/unread0
33 files changed, 0 insertions, 0 deletions