All pastes #568776 Raw Edit

Untitled

public text v1 · immutable
·published 2007-06-15 19:35 UTC
rendered paste body
#!/bin/bash

#AUDIODECODER="ffmpeg"
AUDIODECODER="libmad"

OPTS="-oac lavc -ovc lavc -of mpeg -mpegopts format=dvd:tsaf \
  -vf scale=720:576,harddup -srate 48000 -af lavcresample=48000 \
  -lavcopts vcodec=mpeg2video:vrc_buf_size=1835:vrc_maxrate=9800:vbitrate=2000:\
keyint=15:vstrict=0:acodec=ac3:abitrate=192:aspect=4/3 -ofps 25 \
  -afm $AUDIODECODER"


ANIMEPATH="/mnt/sde1/shared/anime/"
ANIME="Abenobashi Mahou Shoutengai"
DEST="/home/honk/anime/$ANIME/"
SEQ="$(seq -w 1 10)"

echo "<dvdauthor dest=\"$DEST\" >" > "$DEST/dvdauthor.xml"
echo ' <vmgm/>' >> "$DEST/dvdauthor.xml"
echo ' <titleset>' >> "$DEST/dvdauthor.xml"
echo '  <titles>' >> "$DEST/dvdauthor.xml"
echo '   <video format="pal" aspect="4:3" resolution="720x576" />' >> "$DEST/dvdauthor.xml"
echo '   <pgc pause="0" >' >> "$DEST/dvdauthor.xml"

mkdir -p "$DEST/temp"
for i in $SEQ
do
  mencoder $OPTS -o "$DEST/temp/$ANIME - $i.mpeg2" \
  "$ANIMEPATH/$ANIME/$ANIME - $i"*.avi

  echo "    <vob file=\"$DEST/temp/$ANIME - $i.mpeg2\" pause=\"0\" />" >> "$DEST/dvdauthor.xml"

done

echo '    <post> { g2 = 0; call vmgm menu entry title; } </post>' >> "$DEST/dvdauthor.xml"
echo '   </pgc>' >> "$DEST/dvdauthor.xml"
echo '  </titles>' >> "$DEST/dvdauthor.xml"
echo ' </titleset>' >> "$DEST/dvdauthor.xml"
echo '</dvdauthor>' >> "$DEST/dvdauthor.xml"