[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

No sound when recording



After many hours of reading and experimenting I am making no progress
and I will appreciate some help.

I can use tvtime, zapping, xawtv, fbtv, gv4l and maybe more programs
to watch TV without a problem.  Both the video and sound is good.

When I play back captured video's there is no sound.  I have captured
using 


lavrec
xawtv
mencoder

but I could not get zapping to record.  It does not offer such an
offer (on Debian Sarge).

Maybe the output of lavrec is significant but I do not know enough of
this technology to understand it:

$lavrec --software-encoding --format=a  --input=a  --quality=80
--geometry=352x288 lavrec.avi
++ WARN: [lavrec] Unable to set negative priority for audio thread.
++ WARN: [lavrec] Pthread Real-time scheduling for audio thread could
not be enabled.
++ WARN: [lavrec] Unable to set negative priority for main thread
++ WARN: [lavrec] Pthread Real-time scheduling for main thread could
not be enabled
0.00.20:18 int:040 lst:  0 ins: 26 del: 25 ae:  0 td1=0.021
td2=-0.0170
Recording time  :  0.00.20:18
Lost frames     : 000
A/V sync ins/del: 026/025
Audio errors    : 000


While I do a recording, there is sound on the system, but the playback
is without sound.

I did make sure that all the channels on alsamixer,  and kmixer was
unmuted while the recording (and playback) took place.

I am at the end of my wits here and do not know what to try next.
Even the following script does not record any sound:

======================
#!/bin/bash 
# ================= record-tv.sh  ==========================
# = copyright 2003 by Greg Watson <gwatson@linuxlogin.com> =
# = GPL2 License                                           =
# = usage record-tv.sh prefix-filename record-time channel =
# = Example:  ./record-tv.sh enterprise 61:00 20           =
# ==========================================================
# Version 0.8
# Last Mod: Wed Jan  7 12:48:15 MST 2004

# Output directory
OUTPUT=$HOME/video
# Streamer location
STREAMER=/usr/bin/streamer
# Alsa Mixer
AMIXER=/usr/bin/amixer
# v4lctl path
V4LCTL=/usr/bin/v4lctl
# Capture Volume to ensure sound is recorded (80%)
CAPTURE_VOLUME=100

# Tvtime settings file for color/brightness/contrast values
TVTIME=$HOME/.tvtime/tvtime.xml

# End of Config
###############

# check if I'm running TV, if so just exit
if [ `ps -C tvtime | grep -c tvtime` -gt 0 ]; then
	echo "TVtime is running, aborting recording."
	exit
fi

# If the filename prefix wasn't given, set it to 'recording'
if [ -z $1 ]; then
	PREFIX="recording"
else
	PREFIX=$1
fi

# if time is blank, record for 30 minutes
if [ -z $2 ]; then
	TIME="30:00"
else
	TIME=$2
fi

if [ ! -z $3 ]; then
	$V4LCTL setchannel $3
fi

# Check for vcr dir
if [ ! -x $OUTPUT ]; then
	mkdir $OUTPUT
fi
	
DATE=`date +%m-%d-%Y-%H:%M`

# Set the AC97 volume to 0 (so we don't hear the sounds)
# Get mixer values first
PLAY_VOL=`$AMIXER cget name='Analog Mix Playback Volume' | grep : | sed 's/^.*=\([^,]*\).*$/\1/'`
CAP_VOL=`$AMIXER cget name='Analog Mix Capture Volume' | grep : | sed 's/^.*=\([^,]*\).*$/\1/'`
# Fix for my card since sometimes it wants to record PCM, which I DON'T Want 
$AMIXER -q cset name='PCM Capture Volume' 0

$AMIXER -q cset name='Analog Mix Playback Volume' 0
# We want to ensure that volume is set (just in case it wasn't before)
$AMIXER -q cset name='Analog Mix Capture Volume' $CAPTURE_VOLUME

# if tvtime.xml is set, then grab settings out of it
if [ -f $TVTIME ]; then
	CONTRAST=`cat ${TVTIME} | grep DefaultContrast | sed 's/^.*value="\([^"]*\).*$/\1/'`
	BRIGHTNESS=`cat ${TVTIME} | grep DefaultBrightness | sed 's/^.*value="\([^"]*\).*$/\1/'`
	COLOR=`cat ${TVTIME} | grep DefaultColour | sed 's/^.*value="\([^"]*\).*$/\1/'`
	HUE=`cat ${TVTIME} | grep DefaultHue | sed 's/^.*value="\([^"]*\).*$/\1/'`

	$V4LCTL bright ${BRIGHTNESS}% color ${COLOR}% contrast ${CONTRAST}% hue ${HUE}%
fi

$STREAMER -p 4 -q -t ${TIME} -r 24 -q -o ${OUTPUT}/${PREFIX}-${DATE}-${TIME}.avi -j 90 -f mjpeg -F mono16

# Sometimes streamer doesn't always re-mute audio, mute it again just to be sure
$V4LCTL volume mute on

# Restore volumes
$AMIXER -q cset name='Analog Mix Playback Volume' $PLAY_VOL
$AMIXER -q cset name='Analog Mix Capture Volume' $CAP_VOL

=============================

My system:

        *-multimedia:0
             description: Multimedia audio controller
             product: ES1371 [AudioPCI-97]
             vendor: Ensoniq
             physical id: b
             bus info: pci@00:0b.0
             version: 08
             clock: 33MHz
             capabilities: bus_master cap_list
             configuration: driver=ENS1371 irq=10
        *-multimedia:1
             description: Multimedia video controller
             product: Bt878 Video Capture
             vendor: Brooktree Corporation
             physical id: c
             bus info: pci@00:0c.0
             version: 11
             clock: 33MHz
             capabilities: bus_master cap_list
             configuration: driver=bttv irq=11
        *-multimedia:2
             description: Multimedia controller
             product: Bt878 Audio Capture
             vendor: Brooktree Corporation
             physical id: c.1
             bus info: pci@00:0c.1
             version: 11
             clock: 33MHz
             capabilities: bus_master cap_list
             configuration: driver=Bt87x irq=11


$lsmod | grep bt
btaudio                16272  0
bt878                  11188  0
bttv                  144332  2 bt878
video_buf              20228  1 bttv
firmware_class          9728  1 bttv
i2c_algo_bit            9096  1 bttv
v4l2_common             6144  1 bttv
btcx_risc               4616  1 bttv
snd_bt87x              12488  1
snd_pcm                85256  4
snd_bt87x,snd_ens1371,snd_als4000,snd_pcm_oss
snd_page_alloc          9608  2 snd_bt87x,snd_pcm
snd                    50276  21
snd_seq_oss,snd_seq,snd_bt87x,snd_ens1371,snd_ac97_codec,snd_als4000,snd_sb_common,snd_pcm_oss,snd_mixer_oss,snd_pcm,snd_opl3_lib,snd_timer,snd_hwdep,snd_mpu401_uart,snd_rawmidi,snd_seq_device,snd_i2c
soundcore               9696  4 btaudio,snd
i2c_core               22288  5
tvaudio,tuner,bttv,i2c_algo_bit,msp3400
videodev                9728  2 bttv


$uname -r
2.6.9-1-386


Regards
Johann
--
 J.H. Spies - Tel. 021-982 2694 / 082 782 0336 / 021-808 4036(w)  
             Posbus 4668, Tygervallei 7536
     "In the beginning was the Word, and the Word was with 
      God, and the Word was God. The same was in the  
      beginning with God. All things were made by him; and 
      without him was not any thing made that was made."    
                                John 1:1-3 



Reply to: