Post by James H. MarkowitzAny recommendations on software to record an XFCE session with
sound under Slackware?
I have a script that I wrote a few years ago which records from a
webcam or from the screen plus audio. It is the result of several
years of struggling with the complexities of ffmpeg and sox. You might
notice that it records audio and video seprately, but simultaneously,
then combines them.
Here it is:
#!/bin/sh
# avrec
# Joseph Rosevear 200801 I wrote this script.
# Check arguments.
if [ \( "$#" -gt "2" \) -o \
\( \( "$#" -eq "2 " \) -a \
\( "$2" != "screen" \) \) ]; then
cat << DONE
$0: Error:
You must supply the base of the output file as \$1 and optionally
provide "screen" as \$2.
If you provide \$2 in this way, then this script will record from
the screen instead of from the webcam.
DONE
exit
fi
rm $1.avi
rm temp.wav temp_normal.wav temp.avi
rec temp.wav&
# If $2 is "screen", then record the screen. Otherwise record from the
# webcam.
if [ "$2" = "screen" ]; then
ffmpeg -loglevel quiet \
-f x11grab \
-s 1024x768 \
-i :0.0 \
-c:v huffyuv temp.avi
else
ffmpeg -loglevel quiet \
-f video4linux2 -input_format yuyv422 \
-s 640x480 \
-i /dev/video0 \
-c:v copy temp.avi
fi
killall rec
sox --norm temp.wav temp_normal.wav
ffmpeg -i temp.avi -i temp_normal.wav \
-vcodec copy -acodec copy $1.avi
rm temp.wav temp_normal.wav temp.avi
--
https://JoesLife.org