pmrs 20120911

Merge branch 'master' of svn.c3d2.de:c3d2-web
This commit is contained in:
koeart 2012-09-11 12:30:46 +02:00
commit becea2a134
3 changed files with 48 additions and 41 deletions

View File

@ -14,6 +14,7 @@
Konzepten. Damit ihr bei solch Code nicht nur Bahnhof versteht, Konzepten. Damit ihr bei solch Code nicht nur Bahnhof versteht,
wollen wir euch Haskell an einem Themenabend vorstellen. wollen wir euch Haskell an einem Themenabend vorstellen.
</p> </p>
<addendum>
<p> <p>
Wenn ihr Code-Beispiele live nachvollziehen möchtet, installiert Wenn ihr Code-Beispiele live nachvollziehen möchtet, installiert
zur Vorbereitung den Glasgow Haskell Compiler und das Tool für zur Vorbereitung den Glasgow Haskell Compiler und das Tool für
@ -24,8 +25,14 @@
Für das Webframework Yesod danach: Für das Webframework Yesod danach:
</p> </p>
<pre>cabal update &amp;&amp; cabal install -p yesod-platform</pre> <pre>cabal update &amp;&amp; cabal install -p yesod-platform</pre>
</addendum>
<ul><li><link href="https://github.com/c3d2/ta-haskell-yesod"> <ul><li><link href="https://github.com/c3d2/ta-haskell-yesod">
Folien und Beispiele Folien und Beispiele
</link></li></ul> </link></li></ul>
<resource title="Videomitschnitt" size="780185888" type="video/webm"
url="http://ftp.c3d2.de/themenabend/ta-2012-08-29-haskell-yesod.webm">
<alternative size="815704582" type="video/mp4" url="http://ftp.c3d2.de/themenabend/ta-2012-08-29-haskell-yesod.mp4"/>
</resource>
<p>Wir danken wieder einmal COeins für das Anfertigen und Bearbeiten der Videomitschnitte.</p>
</item> </item>

View File

@ -1,33 +1,34 @@
#!/bin/sh #!/bin/sh -e
if=$1 if=$1
of=`basename "$1"`".mp4" of=`basename "$1"`".mp4"
schedtool -De \ # No. CPU cores:
ffmpeg -i "$if" \ threads=2
# Video bitrate:
vb=400k
# Audio bitrate:
ab=96k
ffmpeg -i "$if" \
-f mp4 \ -f mp4 \
-an \ -an \
-threads 4 \ -threads $threads \
-deinterlace \
-vcodec libx264 \ -vcodec libx264 \
-vpre libx264-ipod640 \ -vpre libx264-ipod640 \
-b:v 400k \ -b:v $vb \
-pass 1 \ -pass 1 \
-passlogfile "$of.ffmpeg2pass" \ -passlogfile "$of.ffmpeg2pass" \
-y \ -y /dev/null
/dev/null && \ ffmpeg -i "$if" \
schedtool -De \
ffmpeg -i "$if" \
-f mp4 \ -f mp4 \
-acodec libmp3lame \ -acodec libfaac \
-ab 96k \ -ab $ab \
-threads 4 \ -threads $threads \
-deinterlace \
-vcodec libx264 \ -vcodec libx264 \
-vpre libx264-ipod640 \ -vpre libx264-ipod640 \
-b:v 400k \ -b:v $vb \
-pass 2 \ -pass 2 \
-passlogfile "$of.ffmpeg2pass" \ -passlogfile "$of.ffmpeg2pass" \
-y \ -y "$of"
"$of"

View File

@ -1,34 +1,33 @@
#!/bin/sh #!/bin/sh -e
if=$1 if=$1
of=`basename "$1"`".webm" of=`basename "$1"`".webm"
if [ ! -f "$of.ffmpeg2pass-0.log" ]; then # No. CPU cores:
schedtool -De \ threads=2
ffmpeg -i "$if" \ # Video bitrate:
-threads 4 \ vb=400k
-f webm \ # Audio bitrate:
-an \ ab=96k
-vcodec libvpx \
-deinterlace \ ffmpeg -i "$if" \
-b:v 400k \ -threads $threads \
-pass 1 \ -f webm \
-passlogfile "$of.ffmpeg2pass" \ -an \
-y \ -vcodec libvpx \
/dev/null || exit 1 -b:v $vb \
fi -pass 1 \
schedtool -De \ -passlogfile "$of.ffmpeg2pass" \
ffmpeg -i "$if" \ -y /dev/null
-threads 4 \ ffmpeg -i "$if" \
-threads $threads \
-f webm \ -f webm \
-acodec libvorbis \ -acodec libvorbis \
-ab 96k \ -ab $ab \
-vcodec libvpx \ -vcodec libvpx \
-deinterlace \ -b:v $vb \
-b:v 400k \
-pass 2 \ -pass 2 \
-passlogfile "$of.ffmpeg2pass" \ -passlogfile "$of.ffmpeg2pass" \
-y \ -y "$of"
"$of" || exit 1