[FFmpeg-user] Statics when record with ffmpeg

MrNice wxcvbn2006 at iol.ie
Sun Jul 12 21:52:05 CEST 2015



On 11/07/15 12:20, Carl Eugen Hoyos wrote:
> MrNice <wxcvbn2006 <at> iol.ie> writes:
> 
>> Looks like no alsa:
> 
> Try something like 
> $ yum install alsa-utils alsa-lib
> 
>> Enabled indevs:
>> dv1394			lavfi			v4l2
>> fbdev			oss			x11grab_xcb
> 
> You could also test oss.
> 
>>  ./configure --enable-libpulse
>> ERROR: libpulse not found using pkg-config
> 
> You need something like pulseaudio 
> or pulseaudio-core-libs
> 
> Carl Eugen


$ ./ffmpeg -devices
ffmpeg version N-73517-g47d0773 Copyright (c) 2000-2015 the FFmpeg
developers
  built with gcc 5.1.1 (GCC) 20150618 (Red Hat 5.1.1-4)
  configuration:
  libavutil      54. 28.100 / 54. 28.100
  libavcodec     56. 47.100 / 56. 47.100
  libavformat    56. 40.100 / 56. 40.100
  libavdevice    56.  4.100 / 56.  4.100
  libavfilter     5. 21.100 /  5. 21.100
  libswscale      3.  1.101 /  3.  1.101
  libswresample   1.  2.100 /  1.  2.100
Devices:
 D. = Demuxing supported
 .E = Muxing supported
 --
 DE alsa            ALSA audio output
 D  dv1394          DV1394 A/V grab
 DE fbdev           Linux framebuffer
 D  lavfi           Libavfilter virtual input device
 DE oss             OSS (Open Sound System) playback
  E v4l2            Video4Linux2 output device
 D  video4linux2,v4l2 Video4Linux2 device grab
 D  x11grab         X11 screen capture, using XCB


New test, same issue.

$ ./ffmpeg -debug 1 -vn -f alsa -ac 2 -channel_layout stereo -i hw:0,0
-c:a pcm_s16le /Store3/Test/pcm_`date +%m%d_%H%M`.wav
ffmpeg version N-73517-g47d0773 Copyright (c) 2000-2015 the FFmpeg
developers
  built with gcc 5.1.1 (GCC) 20150618 (Red Hat 5.1.1-4)
  configuration:
  libavutil      54. 28.100 / 54. 28.100
  libavcodec     56. 47.100 / 56. 47.100
  libavformat    56. 40.100 / 56. 40.100
  libavdevice    56.  4.100 / 56.  4.100
  libavfilter     5. 21.100 /  5. 21.100
  libswscale      3.  1.101 /  3.  1.101
  libswresample   1.  2.100 /  1.  2.100
 matched as AVOption 'debug' with argument '1'.
Reading option '-vn' ... matched as option 'vn' (disable video) with
argument '1'.
Reading option '-f' ... matched as option 'f' (force format) with
argument 'alsa'.
Reading option '-ac' ... matched as option 'ac' (set number of audio
channels) with argument '2'.
Reading option '-channel_layout' ... matched as option 'channel_layout'
(set channel layout) with argument 'stereo'.
Reading option '-i' ... matched as input file with argument 'hw:0,0'.
Reading option '-c:a' ... matched as option 'c' (codec name) with
argument 'pcm_s16le'.
Reading option '/Store3/Test/pcm_0712_2040.wav' ... matched as output file.
Finished splitting the commandline.
Parsing a group of options: global .
Successfully parsed a group of options.
Parsing a group of options: input file hw:0,0.
Applying option vn (disable video) with argument 1.
Applying option f (force format) with argument alsa.
Applying option ac (set number of audio channels) with argument 2.
Applying option channel_layout (set channel layout) with argument stereo.
Successfully parsed a group of options.
Opening an input file: hw:0,0.
[alsa @ 0x3835340] All info found
Input #0, alsa, from 'hw:0,0':
  Duration: N/A, start: 1436730025.838410, bitrate: 1536 kb/s
    Stream #0:0, 1, 1/1000000: Audio: pcm_s16le, 48000 Hz, stereo, s16,
1536 kb/s
Successfully opened the file.
Parsing a group of options: output file /Store3/Test/pcm_0712_2040.wav.
Applying option c:a (codec name) with argument pcm_s16le.
Successfully parsed a group of options.
Opening an output file: /Store3/Test/pcm_0712_2040.wav.
Successfully opened the file.
detected 8 logical cores
[graph 0 input from stream 0:0 @ 0x3834ea0] Setting 'time_base' to value
'1/48000'
[graph 0 input from stream 0:0 @ 0x3834ea0] Setting 'sample_rate' to
value '48000'
[graph 0 input from stream 0:0 @ 0x3834ea0] Setting 'sample_fmt' to
value 's16'
[graph 0 input from stream 0:0 @ 0x3834ea0] Setting 'channel_layout' to
value '0x3'
[graph 0 input from stream 0:0 @ 0x3834ea0] tb:1/48000 samplefmt:s16
samplerate:48000 chlayout:0x3
[audio format for output stream 0:0 @ 0x382aec0] Setting 'sample_fmts'
to value 's16'
[AVFilterGraph @ 0x38206e0] query_formats: 4 queried, 9 merged, 0
already done, 0 delayed
Output #0, wav, to '/Store3/Test/pcm_0712_2040.wav':
  Metadata:
    ISFT            : Lavf56.40.100
    Stream #0:0, 0, 1/48000: Audio: pcm_s16le ([1][0][0][0] / 0x0001),
48000 Hz, stereo, s16, 1536 kb/s
    Metadata:
      encoder         : Lavc56.47.100 pcm_s16le
Stream mapping:
  Stream #0:0 -> #0:0 (pcm_s16le (native) -> pcm_s16le (native))
Press [q] to stop, [?] for help
size=    1374kB time=00:00:07.32 bitrate=1536.1kbits/s
video:0kB audio:1374kB subtitle:0kB other streams:0kB global headers:0kB
muxing overhead: 0.005545%
Input file #0 (hw:0,0):
  Input stream #0:0 (audio): 22629 packets read (1406756 bytes); 22629
frames decoded (351689 samples);
  Total: 22629 packets (1406756 bytes) demuxed
Output file #0 (/Store3/Test/pcm_0712_2040.wav):
  Output stream #0:0 (audio): 22629 frames encoded (351689 samples);
22629 packets muxed (1406756 bytes);
  Total: 22629 packets (1406756 bytes) muxed
22629 frames successfully decoded, 0 decoding errors
[AVIOContext @ 0x38520c0] Statistics: 4 seeks, 22632 writeouts



Let me know a site where I could upload an audio sample.

@ Moritz, thanks for your help.



More information about the ffmpeg-user mailing list