On Wed, Aug 17, 2005 at 11:24:43PM -0700, patrick ~ wrote:
> Greetings,
> 
> The purpose of this message is two fold. First, I'd like to
> find out the status of dvdauthor port on 3.7 and secondly I
> am curious to see if there is a simpler solution for what I
> am attempting to do.
> 
> FYI: I'm using OPENBSD_3_7 on i386.
> 
> 
> (1)
> I'm trying to figure out if there is an official dvdauthor
> port for OpenBSD. Specifically OBSD 3.7?

no.

> I did a search on MARC and only came across this post:
> 
> http://marc.theaimsgroup.com/?l=openbsd-ports&m=111455839701397&w=2
> 
> Are there any plans to incorporate the mentioned port into
> the official ports tree?

after the tree "thaws".

> Is there any particular reason it
> hasn't yet been introduced?

I'm a slacker.

> (2)
> Allow me to explain what I'm trying to do and maybe there
> is a simpler solution out there that I'm not aware of and
> someone in the know-how could help direct me to it.
> 
> My goal, as the subject states, is to copy DVDs for back up
> purposes. Specifically I have two 4gig DVDs of my cousin's
> wedding video which I'd like to duplicate for my parents and
> a few other family members. Ideally i would like to take the
> two 4gig DVDs and burn them onto a dual layer DVD media, but
> I'll consider that to be the icing.  I'll be happy with a
> direct 1-to-1 copy of the two DVDs for starters.

two "regular" DVDs is cheaper (and probably easier) than one DL DVD.

> I installed the dvdrip port thinking this was the solution I
> was looking for. However, it looks like dvdrip is mainly for
> ripping DVDs to copy them onto CDs (VCD?) only.

mostly, but not only, IIRC.

> Did some searching on MARC and also google and the only
> viable solution comes from this post:
> 
> http://www.videohelp.com/forum/viewtopic.php?t=263980
> 
>   (from post)
>   mplayer -dumpvideo -dumpfile movie.m2v dvd://1
>   mplayer -dumpaudio -dumpfile movie.ac3 dvd://1
>   requant 1.3 <movie.m2v >movie-small.m2v
>   rm movie.m2v
>   mplex -f8 -omovie.vob movie-small.m2v movie.ac3
>   rm movie-small.m2v movie.ac3
>   mkdir disc
>   dvdauthor -o disc -t movie.vob
>   dvdauthor -o disc -T
>   dvdburn "Movie Title" disc

if the original DVDs are 4GB DVDs, there's no need to requantize.

if the original DVDs aren't encrypted, then you should be able to just
copy the DVD filesystem to disk, then burn it with growisofs.  otherwise,
you will need to use something (mplayer, tccat, etc) to decrypt the DVD.

> So, I looked for dvdauthor port but didn't find it in the
> official ports CVS tree (at least not in OPENBSD_3_7 branch).
> To be honest, I'd love to bypass dvdrip if I can stick with
> non-gui tools. So the above command-set seem very attractive.

dvd::rip is a GUI that uses transcode.  transcode is a set of command
line tools.  you probably only need tccat, tcdemux and tcextract for
this job.

<<<
#!/bin/sh

# revob.sh - backup a DVD with AC3 audio, needs to be tweaked for MP2,
#            but in the US, most DVDs use AC3

set -e

function usage
{
        cat << __EOT

Usage: revob.sh -vd -i input -o output -r requant

  -i    input file or directory
  -o    output directory
  -r    requantization factor
  -d    input is a DVD
  -v    verbose output

__EOT

        false
}

IS_DVD="no"

set -- `getopt dvi:o:r: $*` || usage
if [ $# -lt 5 ]; then
        usage
fi

for i
do
        case $i
        in
                -d)
                        IS_DVD="yes"
                        shift;;
                -v)
                        VERBOSE="yes"
                        shift;;
                -i)
                        INPUT_FILE="$2"
                        shift; shift;;
                -o)
                        OUTPUT_DIR="$2"
                        shift; shift;;
                -r)
                        REQUANT_FACTOR="$2"
                        shift; shift;;
                --)
                        shift; break;;
        esac
done

if test -z $INPUT_FILE
then
        echo "Please specify input file!"
        usage
fi

if test x"$IS_DVD" = x"yes"
then
        RANGE="-T 1,-1"
else
        RANGE=""
fi

if test x"$VERBOSE" = x"yes"
then
        V="-d 2"
else
        V=""
fi

if test -z "$OUTPUT_DIR"
then
        echo "Please specify output directory!"
        usage
else
        rm -rf $OUTPUT_DIR
        mkdir -p $OUTPUT_DIR
fi

if test -n "$REQUANT_FACTOR"
then
        TCREQUANT="| tcrequant -f $REQUANT_FACTOR"
else
        TCREQUANT=""
fi

cmd="tcprobe -H 10 -i ${INPUT_FILE}"

echo
echo $cmd
eval $cmd

cmd="tccat ${V} -i ${INPUT_FILE} ${RANGE} | tcdemux ${V} -t vob -x mpeg2 -S 0 |\
        tcextract ${V} -t vob -a 0 -x mpeg2 ${TCREQUANT} >\
        ${OUTPUT_DIR}/revob.m2v"

echo
echo $cmd
eval $cmd

cmd="tccat ${V} -i ${INPUT_FILE} ${RANGE} | tcdemux ${V} -t vob -x ac3 -S 0 |\
        tcextract ${V} -t vob -a 0 -x ac3 | tcextract ${V} -t raw -a 0 -x ac3 >\
        ${OUTPUT_DIR}/revob.ac3"

echo
echo $cmd
eval $cmd

cmd="mplex -f 8 -o ${OUTPUT_DIR}/revob.vob \
        ${OUTPUT_DIR}/revob.m2v ${OUTPUT_DIR}/revob.ac3"

echo
echo $cmd
eval $cmd

rm ${OUTPUT_DIR}/revob.m2v ${OUTPUT_DIR}/revob.ac3

cat > ${OUTPUT_DIR}/dvdfs.xml << _EOT
<dvdauthor>
  <vmgm />
  <titleset>
    <titles>
      <pgc>
        <vob file="${OUTPUT_DIR}/revob.vob" />
      </pgc>
    </titles>
  </titleset>
</dvdauthor>
_EOT

cmd="dvdauthor -o ${OUTPUT_DIR}/dvdfs \
        -x ${OUTPUT_DIR}/dvdfs.xml -t"

echo
echo $cmd
eval $cmd

rm ${OUTPUT_DIR}/revob.vob

cmd="mkisofs -dvd-video -o ${OUTPUT_DIR}/dvdfs.iso \
        ${OUTPUT_DIR}/dvdfs"

echo
echo $cmd
eval $cmd

rm -rf ${OUTPUT_DIR}/dvdfs

cmd="growisofs -dvd-compat \
        -Z /dev/rcd0c=${OUTPUT_DIR}/dvdfs.iso"

echo
echo $cmd
eval $cmd

exit 0
>>>

demuxing and remuxing is necessary because dvdauthor needs the VOBU
hints added by 'mplex -f 8'.

> I started to see what would be invovled in making a port for
> dvdauthor myself (seemed like fun and educational). Following
> the instructions on the Porting Checklist[1] I am posting this
> message to the ports list.

http://www.jakemsr.com/openbsd/ports/port-tgzs/dvdauthor-0.6.10-port.tgz

of course, streamdvd is a much easier way to make backups.  I use the
above script more to test the functionality of tc*.

if you really want to do the DL thing, read the dvdauthor HTML
docs, and tweak the above dvdfs.xml to have two "chapters", one 4GB
VOB each.

-- 
<[EMAIL PROTECTED]>

Reply via email to