Jump to content

VCR Video to Hard drive


AussieJohn
 Share

Recommended Posts

I am using the above named card. I am also using Kaffeine for Free-to-Air TV download and it works perfectly. It even has the correct regional TV channels for Cairns in far North Queensland (124k Pop.) .

So no problems there it worked straight out of the box so to speak.

 

What I want to do is transfer a lot of my VCR video tapes to Hard drive so as to eventually put them on DVDs and get rid of the tapes.

I have tried googling this in relation to Kaffeine but it seems that Kaffeine may not be able to handle analog input.

 

Two things I would like to know are 1. what is the best way to connect up the output of the VCR into the Capture card.

2. what is the best application to use to capture the VCRs input from all the possible applications around.

 

I know there are different answers to both questions but I would like the words from those who may have experience with doing this and also any suggestions from others as well.

Hopefully no CLI stuff but will still consider it.

 

Please remember I am using Mandriva208-Spring and I have 2008-Free as an alternative.

 

Cheers. John.

Edited by AussieJohn
Link to comment
Share on other sites

I've only ever done this once. The capture device I had to use was pretty low-grade, the only working driver I could find was for Windows, and so I had to do the capture on a Windows box, but did use Mandriva for editing and converting to video DVD format. Sorry, I don't recall the details of the process that I went through and unfortunately did not keep any notes. I did find the following page helpful in getting started:

 

http://www.techlore.com/article/10257/

 

Jim

Link to comment
Share on other sites

Hi John,

 

I've done a lot of this, and I still am. I create SVCD, DVD, and ISO MPEG 4, depending on the intended usage, and depending on how much I value the record.

 

I'll share my experience with you if you want, but it is 99% CLI… I'm not saying it is the only way, or even the best, but I'm comfortable with the CLI, and I like to be in control of the whole process. You only got one answer, so I thought you could be interested.

 

Yves.

Link to comment
Share on other sites

Thank you Jim, but the site you mention is not very helpful to me here since I do not have any Windows at all now and i do not wish to do so just for this.

 

Thanks Yves. If it is not too much trouble then perhaps you can detail the method you use and PM it to me. I will see if I can follow it.

 

Any one else as well.

 

Cheers. John.

Link to comment
Share on other sites

Yves and John,

 

I would love to actually read this. If you both don't mind, either just post the original response for all to read, or the PM. Seriously, I have battled this and give us due to time constraints.

 

Thanks guys,

 

Jon

Link to comment
Share on other sites

I have almost the same card. I had a lot of trouble trying to capture videos from it. I did have some success with VLC. I got MythTV working once too.

 

For me its the only reason I keep windows on my HD. The original software works good in windows for recording.

Link to comment
Share on other sites

OK. Let's go :)

 

In France, we use SECAM, which uses the same resolution as PAL: 576 lines, split into two frames of 288 each. There are 25 images per second, which makes 50 frames per second. Someone told me that with analog signal, there's no such thing as "horizontal resolution", so I work with 384 columns; that way each frame is 4/3: 384x288 (768 would be nice but salon's CPU doesn't have enough power).

 

I defined 2 record qualities:

- "low": 384x288 @ 25fps: I let the hardware deal with deinterlacing, be it by some calculations, or by skipping every second frame, I don't know.

- "high": 384x576 @ 25fps: I get the whole data, but each picture is interlaced, so the software has to deal with that.

 

My capture card has three inputs: video, s-video, and tuner; I use the latter two.

Basically, I have two scripts: tv.sh, and mk_enc_script.sh.

 

tv.sh e {0|1|2|3|4|…} /path/to/raw/record.avi timeToRecord [HQ]

'e' stands for "encode", because there's also 'p' for "play" (fake; chech we have both sound and picture).

Next comes the channel (they are defined in the script). 0 is special for s-video.

The timeToRecord is the encoding time in a format accepted by "sleep": 1.5h, or 125m, etc…

the "HQ" word is present or absent depending on which quality I want.

Depending on the parameters, one of 4 profiles defined for mencoder/mplayer is used: tuner, tuner HQ, s-video, or s-video HQ.

This script creates a "raw" video, well… AVI, but with as little treatment as possible with the hardware I have: this takes rougthly 4 to 5 GB of disk space per hour of record.

 

The second script needs polishing and is only suitable for ISO MPEG 4 results. For it to work correctly, the "record.avi" file must be placed in a folder called "record" (same as the video without the extension). It needs some data that I get using avidemux.

So I open this video in avidemux. I skim over it to locate the start, end, and interruptions, and I report all "cuts" in a file called "record.edl" (same as the folder, with the .edl extension).

For example, let's suppose we see in avidemux that the video beging at frame #578, and there's advertisement starting at frame #70432, and the film begins again at frame #85490, and the film's last frame is #162065. I would create an EDL file with this contents:

0 578
70432 85490
162065

I'm not done yet with avidemux. I open the video filters dialog, "crop" category, and I choose the cropped width, height, and X/Y offsets (I'll name them W, H, X, Y) this way:

- All border-garbage or black borders should be removed.

- W, H, X, and Y should be even numbers only, although uneven X or Y seem acceptable.

- W and H should each be a multiple of 16 pixels.

- For interlaced video (my "high" quality), W should be a multiple of 8.

- For interlaced video (my "high" quality), X and Y should each be a multiple of 4 pixels.

I run the second script like this:

mk_enc_script.sh path/to/record/folder X Y W H [HQ]

The trailing "HQ" word is present only if the "raw" AVI was recorded in "high" quality.

The script assumes I want to create a MPEG 4 file that would fit on a 700MB CD, and displays 3 different possible settings for audio and video. I choose the one that fits best the kind of film I encode (musical: good audio bitrate, action: good video bitrate).

 

The result of the script is another (generated) script named "record.sh" ("record.edl" is also transformed in the process); "record.sh" will launch mencoder with a suitable EDL file, and suitable parameters. "record.sh" may be launched immediately, or reviewed and tweaked if needed.

This last script results in a file named "Z.record.avi": the final two-pass-encoded film.

 

I plan to improve mk_enc_script.sh, so I can tell if the film is anime or "real picture" (easy; results in slightly different parameters for mencoder), and transform mono to stereo.

 

I'll post the scripts when I get home. Meanwhile, you may be interested in

https://mandrivausers.org/index.php?showtopic=40460

https://mandrivausers.org/index.php?s=&...st&p=239563

 

Yves.

Link to comment
Share on other sites

Well… salon isn't available at the moment. So here's the mk_enc_script.sh script for a start:

#!/bin/bash
# $1: video and EDL directory
# $2-$5: cropX cropY width height
# $6: "HQ" (2/3) or "" (4/3)

base="$(basename "$(cd "$1"; pwd)")"
edl="$(grep '[0-9]' "$1/$base.edl")"

endF=$(tail --lines=1 <<<"$edl")
edl=$(head --lines=-1 <<<"$edl")
cutT=$(echo 0$(awk '{printf "+0.04-%.2f+%.2f",$1*0.04,$2*0.04}' <<<"$edl" | tr , .) | bc)
allT=$(bc <<<"0.04*($endF-1)-$cutT")
h=$(bc <<<"scale=0;$allT/3600")
m=$(printf "%02d" $(bc <<<"scale=0;($allT-3600*$h)/60"))
s=$(printf "%02d.${allT##*.}" $(bc <<<"$allT-3600*$h-60*$m" | sed 's/\..*//'))

edlText=
if [ "$cutT" != ".04" ]; then
 edlText=" -edl \"\$base.edl\""
fi

[ -z "$6" ] && pp="ha/va/dr" || pp="ha/va/dr/md"
[ -z "$6" ] && aspect=$(bc <<<"scale=5;$4/$5") || aspect=$(bc <<<"scale=5;2*$4/$5")

abr[1]=64
abr[2]=128
abr[3]=256
vbr[1]=$(bc <<<"700000*8/$allT-${abr[1]}")
vbr[2]=$(bc <<<"700000*8/$allT-${abr[2]}")
vbr[3]=$(bc <<<"700000*8/$allT-${abr[3]}")

select br in "Si ABR=${abr[1]}, VBR=${vbr[1]}" "Si ABR=${abr[2]}, VBR=${vbr[2]}" "Si ABR=${abr[3]}, VBR=${vbr[3]}"; do
vbrF=${vbr[$REPLY]}
abrF=${abr[$REPLY]}
break;
done

cat >"$1/$base.sh" <<-THEEND
#!/bin/bash
base="\$(basename "\$0" .sh)"
rm -f divx2pass.log "Z.\$base.avi"

mencoder -mc 0 "\$base.avi"$edlText -endpos $h:$m:$s -vf crop=$4:$5:$2:$3,pp=$pp,hqdn3d,harddup -ovc lavc -lavcopts aspect=$aspect:vbitrate=$vbrF:vcodec=mpeg4:vpass=1:turbo:dia=3:cmp=3:subcmp=3:last_pred=2:trell:mbd=
2:v4mv -oac mp3lame -lameopts vbr=3:br=$abrF:q=0:aq=0 -ofps 25 -o /dev/null

mencoder -mc 0 "\$base.avi"$edlText -endpos $h:$m:$s -vf crop=$4:$5:$2:$3,pp=$pp,hqdn3d,harddup -ovc lavc -lavcopts aspect=$aspect:vbitrate=$vbrF:vcodec=mpeg4:vpass=2:dia=3:cmp=3:subcmp=3:last_pred=2:trell:mbd=2:v4mv -oac mp3lame -lameopts vbr=3:br=$abrF:q=0:aq=0 -ofps 25 -o "Z.\$base.avi"
THEEND

chmod 755 "$1/$base.sh"
if [ -n "$edlText" ]; then
 awk '{printf "%.2f %.2f 0\n",$1*0.04,$2*0.04}' <<<"$edl" | tr , . >"$1/$base.edl"
fi

tv.sh will come tomorow.

 

Yves.

 

[edit:] Be careful: both "blocks" starting with "mencoder -mc 0" are actually one line each! [/edit]

Link to comment
Share on other sites

Follow-up:

 

Here's my .mplayer/config file, where the profiles are defined:

# Write your default config options here!

mouse-movements=1
nojoystick=1
stop-xscreensaver=1
vo=xvidix=unichrome_vid.so,xv
ao=alsa
cdda=speed=2
mc=0

[TV]
tv=driver=v4l2:device=/dev/v4l/video0:input=0:width=384:height=288:fps=25:norm=SECAM:normid=7:chanlist=france:c
hannels=23-TF1,29-F2,26-F3,K09-C+,21-F5/Arte,65-M6,47-N7:audiorate=48000:alsa=1:amode=1:immediatemode=0
mixer-channel=CD
aspect=4/3
ofps=25
oac=copy=1
ovc=lavc=1
lavcopts=vcodec=mjpeg:vqscale=2:aspect=4/3

[TVHQ]
tv=driver=v4l2:device=/dev/v4l/video0:input=0:width=384:height=576:fps=25:norm=SECAM:normid=7:chanlist=france:c
hannels=23-TF1,29-F2,26-F3,K09-C+,21-F5/Arte,65-M6,47-N7:audiorate=48000:alsa=1:amode=1:immediatemode=0
mixer-channel=CD
aspect=4/3
ofps=25
oac=copy=1
ovc=lavc=1
lavcopts=vcodec=mjpeg:vqscale=2:aspect=4/3

# SECAM

[VHS]
tv=driver=v4l2:device=/dev/v4l/video0:input=1:width=384:height=288:fps=25:norm=SECAM:normid=7:audiorate=48000:a
lsa=1:amode=1:immediatemode=0
mixer-channel=Line
aspect=4/3
ofps=25
oac=copy=1
ovc=lavc=1
lavcopts=vcodec=mjpeg:vqscale=2:aspect=4/3

[VHSHQ]
tv=driver=v4l2:device=/dev/v4l/video0:input=1:width=384:height=576:fps=25:norm=SECAM:normid=7:audiorate=48000:a
lsa=1:amode=1:immediatemode=0
mixer-channel=Line
aspect=4/3
ofps=25
oac=copy=1
ovc=lavc=1
lavcopts=vcodec=mjpeg:vqscale=2:aspect=4/3

# PAL

[VHSPAL]
tv=driver=v4l2:device=/dev/v4l/video0:input=1:width=384:height=288:fps=25:norm=PAL:normid=0:audiorate=48000:als
a=1:amode=1:immediatemode=0
mixer-channel=Line
aspect=4/3
ofps=25
oac=copy=1
ovc=lavc=1
lavcopts=vcodec=mjpeg:vqscale=2:aspect=4/3

[VHSPALHQ]
tv=driver=v4l2:device=/dev/v4l/video0:input=1:width=384:height=576:fps=25:norm=PAL:normid=0:audiorate=48000:als
a=1:amode=1:immediatemode=0
mixer-channel=Line
aspect=4/3
ofps=25
oac=copy=1
ovc=lavc=1
lavcopts=vcodec=mjpeg:vqscale=2:aspect=4/3

Of course, you'll have to adapt the general settings (vo=…) and each profile (device=…, input=…, normid=…, channels=…, mixer-channel=…).

For me, .mplayer/mencoder.conf is a symbolic link to .mplayer/config.

 

Now tv.sh:

#!/bin/bash
#$1: p(layer) ou e(ncoder = par defaut)
#$2: canal (1, 2, 3, 4, 5, 6, 7 ou 0 pour VHS), rien pour interractif
#$3: fichier d'enregistrement
#$4: duree d'enregistrement
#$5: 'HQ' (optionnel) (en fait, n'importe quoi différent de "rien")

DIR=/ici/partage/tv

[ "$1" == "p" ] && prog=mplayer || prog=mencoder
dest="$3"
if [ $prog == mencoder ] && [ -z "$3" ]; then
dest="$(zenity --entry --title "Titre de l'enregistrement" --text 'Choix du titre')"
[ -n "$dest" ] || exit 0
dest="${dest//\//_}"
while [ -e "$DIR/$dest.avi" ]; do dest="${dest}_"; done
dest="$DIR/$dest.avi"
fi

if [ -n "$2" ] && [ -z "${2//[0-9]/}" ]; then
if [ $2 -gt 0 ]; then
	profile=TV
	mixer=CD
	channel=$2
else
	profile=VHS
	mixer=Line
	channel=
fi
fi

if [ -z "$profile" ]; then
channel=$(zenity --list --title 'Choix de la chaîne' --text 'Choix de la chaîne' --width 300 --height 300 --column Num --column Nom --print-column=1 0 VHS 1 TF1 2 'France 2' 3 'France 3' 4 'Canal +' 5 'France 5 / Arte' 6 M6 7 'Nantes 7')
[ -n "$channel" ] || exit 0
if [ $channel -eq 0 ]; then
	profile=VHS
	mixer=Line
	channel=
else
	profile=TV
	mixer=CD
fi
zenity --info --title 'Attente du début' --text 'Cliquer pour commencer à enregistrer...'
fi

[ -n "$5" ] && profile=${profile}HQ

amixer set $mixer unmute cap

$prog -profile $profile tv://$channel ${dest:+-o "$dest"} &
pid=$!

[ -n "$4" ] && sleep $4 || zenity --info --title 'Attente de la fin' --text "Cliquer pour arrêter d'enregistrer..."
kill $pid

amixer set $mixer mute

Adapt "mixer", and "DIR=…" (where records are stored in interactive mode).

 

And tv-PAL.sh:

#!/bin/bash
#$1: p(layer) ou e(ncoder = par defaut)
#$2: canal (1, 2, 3, 4, 5, 6, 7 ou 0 pour VHS PAL), rien pour interractif
#$3: fichier d'enregistrement
#$4: duree d'enregistrement
#$5: 'HQ' (optionnel) (en fait, n'importe quoi différent de "rien")

DIR=/ici/partage/tv

[ "$1" == "p" ] && prog=mplayer || prog=mencoder
dest="$3"
if [ $prog == mencoder ] && [ -z "$3" ]; then
dest="$(zenity --entry --title "Titre de l'enregistrement" --text 'Choix du titre')"
[ -n "$dest" ] || exit 0
dest="${dest//\//_}"
while [ -e "$DIR/$dest.avi" ]; do dest="${dest}_"; done
dest="$DIR/$dest.avi"
fi

if [ -n "$2" ] && [ -z "${2//[0-9]/}" ]; then
if [ $2 -gt 0 ]; then
	profile=TV
	mixer=CD
	channel=$2
else
	profile=VHSPAL
	mixer=Line
	channel=
fi
fi

if [ -z "$profile" ]; then
channel=$(zenity --list --title 'Choix de la chaîne' --text 'Choix de la chaîne' --width 300 --height 300 --column Num --column Nom --print-column=1 0 VHS 1 TF1 2 'France 2' 3 'France 3' 4 'Canal +' 5 'France 5 / Arte' 6 M6 7 'Nantes 7')
[ -n "$channel" ] || exit 0
if [ $channel -eq 0 ]; then
	profile=VHSPAL
	mixer=Line
	channel=
else
	profile=TV
	mixer=CD
fi
zenity --info --title 'Attente du début' --text 'Cliquer pour commencer à enregistrer...'
fi

[ -n "$5" ] && profile=${profile}HQ

amixer set $mixer unmute cap

$prog -profile $profile tv://$channel ${dest:+-o "$dest"} &
pid=$!

[ -n "$4" ] && sleep $4 || zenity --info --title 'Attente de la fin' --text "Cliquer pour arrêter d'enregistrer..."
kill $pid

amixer set $mixer mute

The same for PAL (on the s-video input).

 

Yves.

Link to comment
Share on other sites

I forgot to mention that tv.sh is graphically interactive when at least the second argument is empty, using "zenity", which must be installed. "amixer" must be installed too.

 

For those interested, here's a little dictionnary:

 

ou = or

pour = for

d'/de = of

l'/le/la = the

du = of the

à = to

en fait = in fact

VHS ≃ VCR

par defaut = by default

canal/chaîne = a channel

rien = nothing

interractif = interactive

fichier = a file

enregistrement = a record

enregistrer = to record

duree = amount of time

optionnel = optionnal

n'importe quoi = anything

différent de = different from

titre = title

choix = choice

num = # (number)

nom = name

attente = now waiting

cliquer = click with the mouse

début = the start

fin = the end

commencer = to begin

arrêter = to stop

 

Yves.

Link to comment
Share on other sites

Wow Yves. I compliment you on your work it is tremendous.

 

It is all too much for this little black duck. I hope the data is useful to other members but it is all beyond my understanding.

 

Since I only want to transfer a number of Movie Videos that are NOT available in DVD, and I have been told "never will be", plus a small number of off air tapes, I then plan to sell off the VCR and the tapes. With that in mind I think I will temporarily reinstall W2000-Pro on to a spare partition (premade for any OS experiments), do the job and then clean it off again.

 

Thanks for all the effort you went to (as you often do and do very well).

 

Cheers. John.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...