You didn't try the by far most popular option - OBS Studio.
To get the best audio results:
- add proper source for your input device, e.g. microphone
- add filters to the created source to process the audio on the fly, e.g. remove noise, add some gain and limit max dB treshold. There are lots of videos on e.g. YouTube explaining how to properly set up filters.
- add any other sources for whatever you want to record, specific windows are recommended. If you need other sound from e.g. the system, using Application Audio Capture source is recoomended for the best control.
Framerate applied to both streams, but since ffmpeg documentation examples are scattered I'll leave an answer here
A="$(pacmd list-sources | grep -PB 1 "analog.*monitor>" | head -n 1 | perl -pe 's/.* //g')"
F="$(date --iso-8601=minutes | perl -pe 's/[^0-9]+//g').mkv"
V="$(xdpyinfo | grep dimensions | perl -pe 's/.* ([0-9]+x[0-9]+) .*/$1/g')"
ffmpeg -loglevel error -video_size "$V" -f x11grab -i :0.0 -f pulse -i "$A" -f pulse -i default -filter_complex amerge -ac 2 -preset veryfast "$F"
where
#A=1
#F=2018121711440500.mkv
#V=2560x1440
ffmpegthe tool-loglevel erroronly print errors-video_size "$V"resolution of your screen (or less if you only want a subsection recorded)-f x11grabrecord the screen (screen recordings may not be possible on wayland?)-i :0.0the X11 screen ID, (can also add +x,y for offset)-f pulsethe audio driver-i "$A"the id of the audio stream-f pulsethe audio driver again (maybe not needed?)-i defaultnormally the system microphone-filter_complex amergemerge the 2 audio streams-ac 2convert the 4 audio channels to 2-preset veryfastgo light on video encoding to avoid stuttering"$F"the output file
Remember that the parameter order matters,
and pavucontrol can re-map audio only while ffmpeg is running.
ffmpeg -f x11grab -i :0.0 -f pulse -i 0 output_30_fps_fullscreen.mp4
Note: change 0 (zero) in pulse -i 0 to appropriate number (e.g. 1) if u get sound from microphone instead.
Just add -ad device_you_want_to_record
You might also want to tweak your audio codec.
This site has good examples: https://verb3k.wordpress.com/2010/01/26/how-to-do-proper-screencasts-on-linux/
I recently became interested in screencasting, and stumbled upon http://screencasts.ubuntu.com/ at which they recommended installing gtk-recordMyDesktop. So I did, and tried it out and it worked, audio and all. My humble results at http://www.youtube.com/watch?v=Rju2TEfG0Bo (includes audio). It may use your technique under the covers for all I know.
I had the same issue, and I will explain how I made it work in my system step by step. I hope this can help someone else.
I will leave the links to some websites that were very useful.
The global idea is to install JACK to manage the audio, and bridge JACK to Pulseaudio to be able to control the audio volume.
Step1. Remove Pulseaudio from the system to get a clean JACK installation:
sudo apt-get remove pulseaudio
sudo apt-get remove --auto-remove pulseaudio
sudo apt-get purge pulseaudio
Step 2. Install JACK:
sudo apt-get install qjackctl jackd2
These are:
qjackctl/stable,stable 0.9.1-1 amd64, the user interface for controlling the JACK sound server
jackd2/stable,stable 1.9.17~dfsg-1 amd64, JACK Audio Connection Kit (server and example clients)
During JACK installation, a windows open asking to Enable realtime process priority. I answered yes.

Step3. Once installed, execute JACK, and a graphical interface will open

Step4. Re-install Pulseaudio and module-jack
sudo apt-get install pulseaudio-module-jack
sudo apt-get install pulseaudio
Step5. Install Cadence software to allow bridging Pulseaudio/ALSA with JACK
sudo apt-get install apt-transport-https gpgv
wget https://launchpad.net/~kxstudio-debian/+archive/kxstudio/+files/kxstudio-repos_10.0.3_all.deb
sudo dpkg -i kxstudio-repos_10.0.3_all.deb
sudo apt install cadence
Step6. Configure the system. Here is where you will need to play around depending on your system audio devices.
On JACK, open settings (Setup...), and define your sound card. These are mine:

Execute Cadence:
Bridge ALSA/Pulseaudio with JACK

Restart the system
Step 7. Configure Simplescreenrecoder to listen to your device. Check that it is getting audio from the system and microphone

Probably this will not work at the first time. Play around with the JACK and Cadence configuration.
Some links that helped me: https://www.thelinuxfaq.com/ubuntu/ubuntu-17-04-zesty-zapus/pulseaudio?type=uninstall https://www.maartenbaert.be/simplescreenrecorder/recording-game-audio/#recording-game-audio-and-microphone-at-the-same-time
If you need something different, or I missed a step, please comment. This is not easy, and having clear steps would help so many people.
Good luck everyone
I'm using PulseAudio on Ubuntu 20.04, and for me, it was just a matter of selecting the right audio device. This may depend on your hardware.
This command will capture your full desktop: So use this command, whenever you want to record skype-conversation ( or anything else )
ffmpeg -f x11grab -s wxga -r 25 -i :0.0 -sameq /tmp/out.mpg
There is software recordMyDesktop http://recordmydesktop.sourceforge.net/about.php which you can record any part of you screen you want. I use it to record my skype sessions.
sudo apt-get install recordmydesktop
to install it from main channels.
If your HDD allows, you can try to do it this way:
First write uncompressed file:
ffmpeg -f x11grab -s SZ -r 30 -i :0.0 -qscale 0 -vcodec huffyuv grab.avi
here SZ is your display size (e.g. 1920x1080).
After that you can compress it at any time you want:
ffmpeg -i grab.avi grab.mkv
Of course, you can change compression, select codec and so on.
I've had success with:
ffmpeg -f x11grab -video_size 1920x1080 -framerate 30 -i :1 \
-vcodec libx264 -preset ultrafast -qp 0 -pix_fmt yuv444p \
video.mkv
Key points:
- -qp 0: x264 lossless mode
- -preset ultrafast: smallest cpu usage, large size
- -pix_fmt yuv444p: the default, but ffmpeg suggests yuv420p, which is lossy
Hint: capture screen and webcam overlay with:
ffmpeg -f x11grab -thread_queue_size 64 -video_size 1920x1080 -framerate 30 -i :1 \
-f v4l2 -thread_queue_size 64 -video_size 320x180 -framerate 30 -i /dev/video0 \
-filter_complex 'overlay=main_w-overlay_w:main_h-overlay_h:format=yuv444' \
-vcodec libx264 -preset ultrafast -qp 0 -pix_fmt yuv444p \
video.mkv
https://trac.ffmpeg.org/wiki/Capture/Desktop
[edit 20180418] Update for Gnome Shell and Wayland:
#!/usr/bin/env python3
from dbus import SessionBus, Interface
from os import getcwd, path
from sys import argv
BUS_NAME = 'org.gnome.Shell.Screencast'
PATH_NAME = '/org/gnome/Shell/Screencast'
INTERFACE_NAME = BUS_NAME
PIPELINE='x264enc pass=qual quantizer=0 speed-preset=ultrafast ! queue ! matroskamux'
if path.isabs(argv[1]):
name = argv[1]
else:
name = path.join(getcwd(), argv[1])
bus = SessionBus()
screen_cast = bus.get_object(BUS_NAME, PATH_NAME)
screen_cast = Interface(screen_cast, INTERFACE_NAME)
ret, name = screen_cast.Screencast(name, {'pipeline': PIPELINE})
if not ret:
print('Error starting screencast.')
raise SystemExit(1)
try:
i = input()
except (EOFError, KeyboardInterrupt):
pass
finally:
screen_cast.StopScreencast()
I would recommend Open Broadcaster Software.
It has support for most Linux distros and it has a set dos option. It does take a while to set it up though to get good quality recordings.
You can use recordMyDesktop:
- can record full screen
- free
- set FPS
- can record microphone and game audio
The Ubuntu Screencast Team uses gtk-recordmydesktop.
Try ffmpeg with something like this:
ffmpeg -vcodec mpeg4 -r 10 -g 300 -vd x11:0,0 -s 1280x1024
http://localhost:8090/feed1.ffm
If it's not working right with the exact settings from the example, see the ffmpeg webpage and documentation for more details: ffmpeg.org
you can read the solution here and here with more details, BTW to record a good audio you NEED to use jack to link the browser's audio output to vlc
so shortly here :
sudo apt-get install pulseaudio-module-jack qjackctl
now you nee d to run qjackctl and set like in this picture

after that you can test here with this : in this case I have used mp3 and x264 like codecs you can just try to change that if you need.
File will be recorded in tmp folder and to stop recording just press Ctrl+C
cd /tmp ; cvlc --jack-input-auto-connect screen:// --screen-fps=25 --input-slave pulse://jack_in --sout "#transcode{venc=x264,quality:50,scale=1,fps=25,acodec=mp3,ab=128,channels=2, samplerate=44100}:duplicate{dst=std{access=file,mux=mp4,dst=nowardev.mp4}}}"
Maybe it is much easier to watch at the websites source code (I think it was Ctrl+u in Firefox, if not just right click and »show source«) and search for the media being played. Then copy the media url and use mplayer to save the stream:
mplayer -dumpstream http://domainname.xyz/folder/containing/video.mp4
(could also be flv extension if it is a flash player based video stream, or webm or ogg or whatever).
To find the media url you could also use right click and »inspect element« and then click on the video. To achieve this, you have to click on the »select element with mouse« button (which is the leftmost button in the second row of the element inspector, in the image below the blue icon).

(source: mozillademos.org)
Image source: https://superuser.com/questions/650434/firefox-dom-inspector-highlight-element-like-chrome-firebug
I managed to get it going with the steps on the Ubuntu Forums, for clarity here is what I did:
sudo apt-get install gtk-recordmydesktop pavucontrol- Opened the Pulse Audio Volume Control dialog:
Applications > Sound & Video > PulseAudio Volume Control - Opened gtk-recordmydesktop
- In gtk-rmd advanced preferences, "Sound" tab, set "Device" to
pulse - In gtk-rmd start a recording
- In Volume Control goto the Recording tab and change the recordmydesktop entry to 'Monitor of '
This is what seems to have worked for me.
All I had to do was change DEFAULT to pulse in by: Advanced button > Sound tab > Device:.
Here is someone's list of the top four Linux screen recorders and how to install them. I hope this list includes what you are looking for.
Getting the right Screen Recorder
Although Kali Linux has a screen recorder built-in, I would suggest getting a similar screen recorder that is very easy to install and customize. The name of it is "Simple Screen Recorder".
Why should you use it?
The name says it all. This is a simple screen recorder that can be fully customized to your needs.
Benefits of SSR:
- SSR is multi-threaded
- SSR is capable for Live streaming of videos
- SSR supports many different types of codecs like MKV, WebM, MP4 etc
- SSR can record on 32-bit OpenGL application within a 64-bit OS
How to Install SSR:
sudo add-apt-repository ppa:maarten-baert/simplescreenrecorder
sudo apt-get update
sudo apt-get install simplescreenrecorder
I was going to recommend Kino which is the one I used when I needed to do that, but according to their web page the project is no longer mantained, so you can either use it the way it is or try the other software that is recommended on their web page:
Shotcut, Kdenlive, Flowblade, OpenShot, PiTiVi, LiVES, and LightWorks.
OBS (Open Broadcaster Software) is multi-platform (OBS is widely used in video game streaming). I haven't tried it yet myself for multiple cameras, but I know it supports at least one (as many streamers put a small video of themselves playing the game on their streams) and it does real-time preview.
Edit: I did run two c920 webcams with it on Linux (Ubuntu 16.04) and it works fine.
GUI
Audacity
If you want a GUI to do this you can do it using Audacity.
excerpt from wiki
In the drop-down menu on Audacity's Device Toolbar, choose “Wave Out” or “Stereo Mix” as the input source. (The exact name may be different, depending on your computer's sound drivers). On Windows, if you don't have a “Wave Out” or “Stereo Mix” option, or if it won't record, go to the system Control Panel and try to enable this option there. For instructions see: Using the Control Panel on the Wiki.
Streamtuner
You can also install streamtuner to browse radio stations.
# Debian/Ubuntu
$ apt-get install streamtuner
# Fedora/CentOS/RHEL
$ yum install streamtuner
screenshot of streamtuner

commandline
You can install streamripper like so:
# Debian/Ubuntu
$ sudo apt-get install streamripper
# Fedora/CentOS/RHEL
$ sudo yum install streamripper
example
To download a stream simply do the following:
$ streamripper <url>
This will save each stream into a .mp3 file.
References
- How to record rip streaming net radio in Ubuntu Debian Linux easy steps
With curl from the terminal, for example:
curl --output ~/Downloads/Radio/CostaDelMar.mp3 http://sc-costadelmar.1.fm:10156
Useful options are --max-time <seconds> and --max-filesize <bytes>.

