1

I'm having some issues recording sound with FFMPEG on Ubuntu.

ffmpeg -v verbose -f x11grab -y -r 60 -s 1920x1080 -i :0.0 -vcodec mpeg4 -f alsa -i pulse -ar 44100 -acodec libmp3lame -ab 192k -ac 2 output.mp4 -qscale 0

Video comes out flawlessly and at a small filesize but no sound is outputted.

1
  • Please include the complete ffmpeg console output. – llogan Apr 19 '14 at 17:10
2

Default settings ?

At here, Kubuntu 13.10 - ffmpeg 2.1.4

The default, at here, is the PulseAudion Control: 'Built-in Audio Analog Stereo' and the capture doesn't have the sound.

I need to change the Alsa Capture to the Monitor of Built-in Audio Analog Stereo. Then the capture has the sound.

enter image description here

The drill at here:

a) Start the pavucontrol

The PulseAudio Volume Control or pavucontrol is:

:~$ apt-cache show pavucontrol

Package: pavucontrol

Priority: optional

Section: universe/sound
...

Description: PulseAudio Volume Control

 PulseAudio, previously known as Polypaudio, is a sound server for POSIX and
 WIN32 systems. It is a drop in replacement for the ESD sound server with
 much better latency, mixing/re-sampling quality and overall architecture.
 .
 PulseAudio Volume Control (pavucontrol) is a simple GTK+ based volume
 control tool (mixer) for the PulseAudio sound server. In contrast to
 classic mixer tools this one allows you to control both the volume of
 hardware devices and of each playback stream separately. It also allows
 you to redirect a playback stream to another output device without
 interrupting playback.

Homepage: http://0pointer.de/lennart/projects/pavucontrol/

b) Start the ffmpeg script

c) Pick a sound source

At here the pavucontrol has options:

enter image description here

3
0

Hope this will help you

ffmpeg -f video4linux2 -i /dev/video0 -acodec libmp3lame -t 20 output.mp4

You can set recording time limit.

like -t hh:mm::ss

0

After five years of these posts, the OP's command as below still works on my Ubuntu 18.04 ffmpeg -v verbose -f x11grab -y -r 60 -i :0.0 -vcodec mpeg4 -f alsa -i pulse -ar 44100 -acodec libmp3lame -ab 192k -ac 2 output.mp4 -qscale

I will start to use it to record my screen, Thanks!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.