Quote:
I think Ron has already modified his xport. ldecod is maintained by a different individual.

#!/bin/csh
set resolution=640x360
set resx=640
#The scripts and instructions in this package are free to use and
#redistribute AT YOUR OWN RISK!! Standard disclaimers apply.
#NO WARRANTY!
if ( $#argv == "0" ) then
echo usage: $0 filename.m2ts ...
exit
else
set files=($*)
endif
set path = ( . $path )
echo using:
which xporthdmv || exit
which ldecod || exit
which ffmpeg || exit
echo $0 Starting.
echo " "
foreach file ($files)
if ( ! -f $file ) then
echo file $file not found
exit
endif
set filebase=`basename $file | sed s/\\.m2ts// | sed s/\\.MTS//`
#set audiofile=/tmp/$filebase".ac3"
#set videofifo=/tmp/$filebase".yuv"
set audiofile=$filebase".ac3"
set videofifo=$filebase".yuv"
set outputfile=`stat -c %y $file | cut -d \\. -f 1`" @"$resolution" ("`basename $file`").avi"
if ( ! -f $audiofile ) then
echo xporthdmv -hn $file 1 1 1
xporthdmv -hn $file 1 1 1 && mv bits0001.mpa $audiofile
else
echo $audiofile already exists, not creating it.
endif
mkfifo $videofifo
echo ldecod -i bits0001.mpv -o $videofifo
ldecod -i bits0001.mpv -o $videofifo > /dev/null &
if ( ! -f "$outputfile" ) then
echo mencoder $videofifo -demuxer rawvideo -rawvideo w=1440:h=1080 -aspect 16:9 \\
-vf scale -zoom -xy $resx \\
-cache 8192 \\
-audiofile $audiofile \\
-oac copy -ovc x264 -x264encopts bitrate=5000 \\
-o "$outputfile"
mencoder $videofifo -demuxer rawvideo -rawvideo w=1440:h=1080 -aspect 16:9 \\
-vf scale -zoom -xy $resx \\
-cache 8192 \\
-audiofile $audiofile \\
-oac copy -ovc x264 -x264encopts bitrate=5000 \\
-o "$outputfile"
else
echo $outputfile exists, not creating it.
endif
#echo To remove temporary files: rm -f *.ac3 *.yuv
rm -f ./dataDec.txt ./log.dec bits0001.mpv $videofifo $audiofile
end
echo $0 complete.






