[CentOS] OT: Digital Video Editor for CentOS 5.2 - Suggestions?

Florin Andrei florin at andrei.myip.org
Tue Aug 5 23:47:27 UTC 2008

Lanny Marcus wrote:
> I'm assuming it is a MiniDV format camcorder.

Well, the funny thing is, that's just the physical support. MiniDV can 
carry either standard-def DV, or high-def MPEG2.

Is it an HD camera or standard-def?

> I installed cinelerra
> and will  try to install Kino now.

If it's standard-def, you can quickly capture video from the camera with 
a command-line tool, if you wish. It's called dvgrab and it's part of 
the Kino project, but it's usually a separate RPM - CentOS has it in the 
Base repo.

This is what I use with dvgrab 3.0:

dvgrab --autosplit --size 0 --format dv2 --opendml --noavc --nostop \
   --showstatus --timestamp --frames 0 --buffers 200 ${basename}-

Rewind the tape, connect the camera to the PC, start dvgrab, then push 
the Play button on the camera. Wait until the whole tape is dumped and 
the camera stops. Kill dvgrab.

With the above parameters, dvgrab will start a new file whenever there's 
a scene change on the tape, which is nice. Those files can be viewed 
with lots of different players (xine, vlc, mplayer...) and edited with 
Kino to cut off undesirable portions and stuff like that. With Kino, DV 
editing is lossless.

There are many ways to convert DV to all kinds of other formats. With 
Linux-based tools, one way to do conversion to DVD is this:


I attached to this message another script which pretty much does the 
same thing, except it requires Windows-based tools running under WINE 
(AviSynth, HC Encoder, and associated software), but the image quality 
of the DVD is much better, since HCenc is a very good MPEG2 encoder.

Under Linux, without WINE, for DVD you can encode to MPEG2 with either 
mpeg2enc (so-so image quality, so-so speed, good standards compliance) 
or with ffmpeg (fast, poor image quality, produces MPEG2 that violates 
the DVD standard and may crash some standalone DVD players).
mencoder is similar to ffmpeg since they use the same underlying code.

HD is a very different story.

dvgrab can still be used for capture with MiniDV/MPEG2 cameras.
I've heard that Cinelerra may be able to edit HD MPEG2.
I doubt there's anything on Linux that can reliably parse and edit 
AVCHD, because libavcodec (essentially the only AVC decoder on Linux, 
and the only open source AVCHD decoder on Windows) has pretty big 
problems parsing interlaced high-def AVC (but if your camera is MiniDV, 
it's definitely not AVCHD).

I'm not sure how to do Blu-Ray authoring on Linux (or at least the poor 
man's Blu-Ray-file-structure-burned-on-DVD, a.k.a. AVCHD disks) other 
than running tsMuxer under WINE (or try the Linux version, if you can 
figure out how to use it text-mode).
For BD or AVCHD authoring, you may have to transcode MPEG2 to AVCHD 
(unless you can produce on Linux a BD structure with the video track in 
MPEG2 format). Hopefully x264 works for you, but you may have to 
interface it with AviSynth - under WINE, of course. :-)

It's not a pretty HD situation on Linux. Windows is much better.

Florin Andrei

-------------- next part --------------

# v20080221
# Florin Andrei <florin at andrei.myip.org>

if [ $# -ne "1" ]; then
 echo "Usage: $0 dirname"

# Testing pre-requisites
for exe in wine unix2dos mplex dvdauthor; do
if [ -z `which ${exe}` ]; then
    echo "${exe} is not installed, bye"

pushd $name

# File that contains the DVD structure info

# The HC Encoder executable
# Path is in Windows format (as seen inside Wine)


# The Unix filesystem root is what "drive letter" under Wine?
# (e.g., if drive is Z, then /home/user becomes Z:\home\user under Wine)

# pwd in "windows" format (replace / with \)
winepwd=`echo ${unixpwd} | tr / \\\ `

# HC Encoder general encoding parameters
# Change ASPECT to 4:3 or 16:9, depending on the source
# Change BITRATE up or down to adjust image quality and file size
# The other parameters typically don't need to be adjusted
cat - > HC.ini << HCINI
*DBPATH           ${rootdrive}:${winepwd}
*MAXBITRATE       9500
*PROFILE          best
*AUTOGOP          15
*AQ               1
*DC_PREC          10
*MATRIX           mpeg
*LUMGAIN          1
*PRIORITY         normal
*WAIT             0

unix2dos HC.ini

rm -f $xmlf
# dvdauthor XML config head
cat - >> $xmlf << XMLHEAD
<vmgm />

max=`ls dv | wc -l`
for inp in `ls dv`; do
rem=$(( $max - $n ))
echo -n "["
for i in `seq 1 $n`; do
    echo -n "+"
if [ $rem -ne 0 ]; then
for i in `seq 1 $rem`; do
    echo -n "-"
echo "]"
out=`basename $inp .avi`

cat - > $out-video.avs << AVSFILE-VIDEO

cat - > $out-audio.avs << AVSFILE-AUDIO
SoundOut(output="ac3", filename="${rootdrive}:${winepwd}\\${out}.ac3", cbrrate=192, acmod=2, autoclose=true, wait=0, overwritefile="Yes", silentblock=false)

unix2dos $out-video.avs
unix2dos $out-audio.avs

awinerun="wine ${aencoder} -frames 1 ${rootdrive}:${winepwd}\\${out}-audio.avs -o NUL"
echo ${awinerun}

winerun="wine ${encoder} -ini ${rootdrive}:${winepwd}\\HC.ini -i ${rootdrive}:${winepwd}\\${out}-video.avs -o ${rootdrive}:${winepwd}\\${out}.m2v -log ${rootdrive}:${winepwd}\\${out}.log -frames all"
echo ${winerun}

mplex -f 8 -S 4400 $out.m2v $out.ac3 -o $out.vob 2>&1 | tee $out-mplex.log
echo "<vob file=\"$out.vob\" />" >> $xmlf
n=$(( $n + 1 ))

# dvdauthor XML config tail
cat - >> $xmlf << XMLTAIL

dvdauthor -o $name -x $xmlf

chmod -R 0755 $name
chmod 0644 $name/*_TS/*

More information about the CentOS mailing list