You are not logged in.

#1 2011-09-11 16:59:41

Jebususu
Member
Registered: 2011-02-27
Posts: 74

recordSoundAndDesktop fails to record any sound

Hello, I am currently in the process of trying to make a couple of screencasts, using this script; http://launchpadlibrarian.net/23829577/ … Desktop.sh

### Begginning of the script: ###

# Reads the parameters from the command line.
baseName=$1

# Tests if the base name was specified.
if [ "$baseName" = "" ]; then
	baseName="myrecording"
fi

# Starts audio recording.
arecord --quiet --file-type wav --rate=44000 > "$baseName.wav" &
pidA=$(ps -ef | grep "[a]record" | awk '{print $2}')
echo "Audio recording started with process ID $pidA"

# Starts recordmydesktop without 
recordmydesktop -fps 25 --no-sound -v_quality 30 -o "$baseName" &
pidV=$(ps -ef | grep "[r]ecordmydesktop" | awk '{print $2}')
echo "Video recording started with process ID $pidV"

# Waits for the user to press enter.
echo ""
echo "Press ENTER to finish."
read nothing

# Kills arecord and sends a Ctrl+C signal to recordmydesktop.
echo "Terminating processes $pidA and $pidV..."
kill -15 $pidA $pidV

# Wait for recordmydesktop to finish converting the video.
wait
echo ""
echo "Converting and merging audio and video"

# Converts the video to avi.
mencoder -ovc lavc -oac mp3lame "$baseName.ogv" -o "$baseName-nosound.avi"

# Converts the audio to mp3.
lame -m j -h --vbr-new -b 128 "$baseName.wav" -o "$baseName.mp3"

# Merges them into the final avi.
mencoder  -ovc copy -oac copy -audiofile "$baseName.mp3" "$baseName-nosound.avi" -o "$baseName-final.avi"

echo ""
echo "DONE! Final video written in file $baseName-final.avi"

The output video is fine, But no sound has been captured, any ideas?

Offline

#2 2011-09-11 19:11:05

whitethorn
Member
Registered: 2010-05-02
Posts: 153

Re: recordSoundAndDesktop fails to record any sound

Do you have all the programs used by the script?

-recordmydesktop
-alsa-utils (for arecord)
-lame
-mencoder

What files do you get when you run  the script?

Offline

#3 2011-09-11 19:38:01

Jebususu
Member
Registered: 2011-02-27
Posts: 74

Re: recordSoundAndDesktop fails to record any sound

whitethorn wrote:

Do you have all the programs used by the script?

-recordmydesktop
-alsa-utils (for arecord)
-lame
-mencoder

What files do you get when you run  the script?

Yes I have all those installed and up to date, and the script produces;

▕ -rw-r--r--▏<  min │ 1.5M│myrecording.ogv
▕ -rw-r--r--▏<  sec │ 6.6M│myrecording.wav


(Which is strange, because the first time I ran the script I was given those two files, and another called myrecording-final, but that had no sound)

Offline

#4 2011-09-12 07:22:48

ChemBro
Member
Registered: 2008-10-22
Posts: 704

Re: recordSoundAndDesktop fails to record any sound

Do these audio-files have sound? Would be something new to me, because I never got sound in a recording (only with glc, but that's for opengl + alsa only).

Offline

#5 2011-10-03 09:51:08

sacarde
Member
Registered: 2006-07-14
Posts: 389

Re: recordSoundAndDesktop fails to record any sound

hi,
   I try your script in my arch64

it works video recording, but I have no audio...

I read this error:

...
[AO OSS] audio_setup: Can't open audio device /dev/dsp: No such file or directory
AO: [alsa] 48000Hz 2ch s16le (2 bytes per sample)
...

how can I view what is my audio-device?


thanks

Offline

#6 2012-02-02 11:10:41

Zucca
Member
From: KUUSANKOSKI, Finland
Registered: 2009-02-26
Posts: 135

Re: recordSoundAndDesktop fails to record any sound

BUMP.

I have same kind of problem here. Mic seems to be recording, but no system sound is recorded.
My sound card:

             description: Audio device
             product: 82801I (ICH9 Family) HD Audio Controller
             vendor: Intel Corporation
             physical id: 1b
             bus info: pci@0000:00:1b.0
             version: 03
             width: 64 bits
             clock: 33MHz
             capabilities: pm msi pciexpress bus_master cap_list
             configuration: driver=snd_hda_intel latency=0
             resources: irq:44 memory:d4500000-d4503fff
sacarde wrote:

how can I view what is my audio-device?

aplay -L

... lists devices


K.i.s.s. <3

Offline

#7 2012-02-02 12:40:06

sacarde
Member
Registered: 2006-07-14
Posts: 389

Re: recordSoundAndDesktop fails to record any sound

I try with:


.asoundrc

pcm.!default {
   type plug
   slave.pcm multi
   route_policy "duplicate"
}
pcm.multi {
   type multi
   slaves.a.pcm "hw:Loopback,0,0"
   slaves.a.channels 2
   slaves.b.pcm "hw:0,0"
   slaves.b.channels 2
   bindings.0.slave a
   bindings.0.channel 0
   bindings.1.slave a
   bindings.1.channel 1
   bindings.2.slave b
   bindings.2.channel 0
   bindings.3.slave b
   bindings.3.channel 1
}
pcm.loop {
   type plug
   slave.pcm "hw:Loopback,1,0"
}

Offline

#8 2012-02-02 13:17:06

Zucca
Member
From: KUUSANKOSKI, Finland
Registered: 2009-02-26
Posts: 135

Re: recordSoundAndDesktop fails to record any sound

With those settings all the sounds were gone. sad


K.i.s.s. <3

Offline

#9 2012-02-02 15:51:12

sacarde
Member
Registered: 2006-07-14
Posts: 389

Re: recordSoundAndDesktop fails to record any sound

Offline

#10 2012-02-02 16:04:40

Zucca
Member
From: KUUSANKOSKI, Finland
Registered: 2009-02-26
Posts: 135

Re: recordSoundAndDesktop fails to record any sound

I don't know how to read that...

*google translates*


K.i.s.s. <3

Offline

#11 2012-02-03 05:19:37

Zucca
Member
From: KUUSANKOSKI, Finland
Registered: 2009-02-26
Posts: 135

Re: recordSoundAndDesktop fails to record any sound

Well that was just basically the same as what you pasted here. O.o


K.i.s.s. <3

Offline

Board footer

Powered by FluxBB