Only showing results from stackexchange.com

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.
Answer from Destroy666 on Stack Exchange
Top answer
1 of 2
1

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

2 of 2
0

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.

Top answer
1 of 7
32

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.

2 of 7
14

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()
Find elsewhere
🌐
Stack Exchange
unix.stackexchange.com › questions › tagged › recording
Newest 'recording' Questions - Unix & Linux Stack Exchange
I'm trying to record audio that is being played on separate channels using arecord. I do this by executing the following command in separate threads in a python script: arecord -D plug:"+str(in_id)+" ... ... Last year I was using Debian Jessie 8 as my main linux os and I used to record my screen with Record My Desktop the resolution of the video rendered as 1080p but recently I have switched to Ubuntu 16....
Top answer
1 of 2
1

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}}}"
2 of 2
0

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