On Wed, Sep 18, 2019 at 11:16:41AM +0100, Mick wrote
> On Wednesday, 18 September 2019 10:10:16 BST Walter Dnes wrote:
> > 
> > ffmpeg -f alsa -ac 2 -i hw:0 -video_size 1920x1080 -framerate 25 -f x11grab
> > -i :0.0 output.mp4
> 
> The above should work, but only if your active audio card has Card
> ID 0.  If your PC uses HDMI as the first card you'll need to adjust
> /etc/asound.conf accordingly to switch to your analogue audio device,
> or perhaps try hw:1 in the above incantation instead.

 "aplay -l" outputs

**** List of PLAYBACK Hardware Devices ****
card 0: PCH [HDA Intel PCH], device 0: CX20641 Analog [CX20641 Analog]
  Subdevices: 0/1
  Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 3: Generic Digital [Generic Digital]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

  If I try "hw:1" it dies immediately (No such file or directory)

  No /etc/asound.conf or $HOME/.asoundrc on my system.  But there is a
large (9596 bytes) /usr/share/alsa/alsa.conf

> Also, check your Mic is not muted with alsamixer, or your desktop GUI 
> equivalent.

  Enabled them, but no difference.

> Did you try USE="alsa, -speex"?

  "emerge -pv mlayer" shows that speex is disabled.

  The console I launch ffmpeg from shows a lot of stuff like...

[alsa @ 0x559c480c94c0] ALSA buffer xrun.
frame= 2337 fps= 25 q=28.0 size=   11008kB time=00:01:33.05 bitrate= 
969.1kbits/frame= 2350 fps= 25 q=28.0 size=   11008kB time=00:01:33.05 bitrate= 
969.1kbits/frame= 2362 fps= 25 q=28.0 size=   11008kB time=00:01:33.05 bitrate= 
969.1kbits/frame= 2375 fps= 25 q=28.0 size=   11008kB time=00:01:33.05 bitrate= 
969.1kbits/[alsa @ 0x559c480c94c0] ALSA buffer xrun.
frame= 2387 fps= 25 q=28.0 size=   11264kB time=00:01:35.21 bitrate= 
969.2kbits/frame= 2400 fps= 25 q=28.0 size=   11264kB time=00:01:35.21 bitrate= 
969.2kbits/frame= 2412 fps= 25 q=28.0 size=   11264kB time=00:01:35.21 bitrate= 
969.2kbits/frame= 2425 fps= 25 q=28.0 size=   11264kB time=00:01:35.21 bitrate= 
969.2kbits/[alsa @ 0x559c480c94c0] ALSA buffer xrun.

  When I playback with mplayer and exit, there's a bunch of diagnostics.
Towards the end it says...

==========================================================================
Opening audio decoder: [ffmpeg] FFmpeg/libavcodec audio decoders
AUDIO: 48000 Hz, 2 ch, floatle, 0.1 kbit/0.00% (ratio: 17->384000)
Selected audio codec: [ffaac] afm: ffmpeg (FFmpeg AAC (MPEG-2/MPEG-4 Audio))
==========================================================================
AO: [alsa] 48000Hz 2ch floatle (4 bytes per sample)
Starting playback...
Could not find matching colorspace - retrying with -vf scale...
Opening video filter: [scale]
Movie-Aspect is undefined - no prescaling applied.
[swscaler @ 0x7f28e3f20100]bicubic scaler, from yuv444p to yuv420p using MMXEXT
VO: [xv] 1920x1080 => 1920x1080 Planar YV12 
A:  38.9 V:  35.9 A-V:  3.003 ct:  3.588   0/  0 17% 12%  0.0% 0 0 
Timing looks severely broken, resetting
A:  38.9 V:  39.6 A-V: -0.717 ct:  3.805   0/  0 17% 12%  0.0% 0 0

  The message about timing may be a clue.

-- 
Walter Dnes <[email protected]>
I don't run "desktop environments"; I run useful applications

Reply via email to