You are not logged in.

#1 2008-05-18 16:02:07

fiod
Member
Registered: 2007-04-02
Posts: 205

What application for capturing Video+Audio?

Hey,

I've recently installed (with great success) the WinFast 2000 XP RM video capturing card (according the instructions in the wiki).

I can now watch TV using TVTIME or KDETV.

Question is, how can I capture video + audio, to a .avi file?

Note that the card doesn't have an audio input, and that the audio input is connected
to the line-in of my onboard sound card.

I got some instructions from this page: http://forum.videohelp.com/topic307679.html
But, when trying to issue:

mencoder -tv norm=PAL:driver=v4l2:width=720:height=576:input=2:fps=25 tv:// -oac lavc -ovc lavc -of mpeg -mpegopts format=dvd -vf pp=lb/ha/va/dr,hqdn3d,harddup -srate 48000 -af lavcresample=48000 -lavcopts vcodec=mpeg2video:vrc_buf_size=1500:vrc_maxrate=8000:vbitrate=7000:keyint=15:acodec=mp2:abitrate=192:aspect=4/3 -o capture.mpg

I didn't get any sound at all (though the video capturing worked perfectly).

Any help would be appreciated,
Thanks
fiod

Last edited by fiod (2008-05-18 16:06:32)

Offline

#2 2008-05-18 17:22:19

azleifel
Member
Registered: 2007-10-28
Posts: 486

Re: What application for capturing Video+Audio?

It's a while since I tried to capture analogue tv using mencoder but you're going to need to add at least "alsa" and "advice=" to the -tv options, e.g. "-tv norm=PAL:driver=v4l2:width=720:height=576:input=2:fps=25:alsa:advice=hw.0,0".  NB. The format for the alsa device is correct!

The mencoder man page has more options but don't blame me if you have a/v synchronisation problems using mencoder.  Despite what I've read in various forums, I've never been able to make mencoder capture video with perfect a/v sync and so use transcode for vhs captures.

Offline

#3 2008-05-18 17:47:02

fiod
Member
Registered: 2007-04-02
Posts: 205

Re: What application for capturing Video+Audio?

thanks a lot for the reply.

I'll have a look at those new mencoder settings and transcode at the weekend..

thanks again
fiod

Offline

#4 2008-05-18 17:57:18

fiod
Member
Registered: 2007-04-02
Posts: 205

Re: What application for capturing Video+Audio?

If you could save me some time, and type an example for how to capture video and audio (from the SVideo port of my card, and
from line-in) using transcode - I'd be very thankful...

thanks again
fiod

Offline

#5 2008-05-18 20:01:43

azleifel
Member
Registered: 2007-10-28
Posts: 486

Re: What application for capturing Video+Audio?

Ok.  The transcode command line is no fun and transcode doesn't work with alsa, so you'll need to have alsa-oss installed.  I use v4lctl (part of the xawtv package) to set the video card input and I capture to mjpeg rather than mpeg2, because it's better for editing, with ac3 audio, like this:

#!/bin/bash

# Generate recording filename
if [ -z "$1" ]; then
    TMPFILE="tmp-`date +%F-%X`-mjpeg.avi"
else
    TMPFILE=$1
fi

# Set capture card
v4lctl -c /dev/video2 setinput Composite1

transcode \
  -u 256,2 \
  -x v4l2=resync_margin=1:resync_interval=250:overrun_guard=1,v4l2 \
  -g 720x576 \
  --import_asr 2 \
  -i /dev/video2 \
  -H 0 \
  -p /dev/dsp1 \
  -e 32000,16,2 \
  -E 48000,16,2 \
  -n 0x1 \
  -N 0x2000 \
  -b 192\
  -J resample,smartyuv,mask=lefttop=0x6:rightbot=720x564,hqdn3d=luma=4:chroma=3:luma_strength=6:chroma_strength=4,pv=cache=30 \
  -y ffmpeg \
  -F mjpeg \
  -o $TMPFILE

exit 0

(The "-J mask=lefttop=0x6:rightbot=720x564" hides some vhs artefacts.)

Of course, my card is different to yours, so you'll need to adjust the audio device (/dev/dsp?) and video device (/dev/video?).  Use "v4lctl -c /dev/video? list" to get the possible options for your card, like this:

[david@darkstar ~]$ v4lctl -c /dev/video2 list
attribute  | type   | current | default | comment
-----------+--------+---------+---------+-------------------------------------
norm       | choice | PAL-DK  | PAL     | PAL PAL-BG PAL-I PAL-DK NTSC SECAM SECAM-DK SECAM-L SECAM-Lc PAL-M PAL-Nc PAL-60
input      | choice | Televis | Televis | Television Composite1 Composite2 S-Video
audio mode | choice | mono    | mono    | mono stereo lang1 lang2
bright     | int    |     128 |     128 | range is 0 => 255
contrast   | int    |      68 |      68 | range is 0 => 127
color      | int    |      64 |      64 | range is 0 => 127
hue        | int    |       0 |       0 | range is -128 => 127
volume     | int    |      15 |       0 | range is -15 => 15
mute       | bool   | on      | off     |
Mirror     | bool   | off     | off     |
Invert     | bool   | off     | off     |
y offset o | int    |       0 |       0 | range is 0 => 128
y offset e | int    |       0 |       0 | range is 0 => 128
automute   | bool   | on      | on      |

Oh, and my ~/.transcode/ffmpeg.conf contains:

[mjpeg]
precmp = 2 
cmp = 2
subcmp = 2
mbd = 2
dia = -2
predia = -2

Last edited by azleifel (2008-05-18 20:37:31)

Offline

#6 2008-05-19 14:36:42

fiod
Member
Registered: 2007-04-02
Posts: 205

Re: What application for capturing Video+Audio?

thanks a lot!

will have a look at this at the weekend..

tnx again
fiod

Offline

Board footer

Powered by FluxBB