我想从我的麦克风录制audio。 我的操作系统是Ubuntu的。 我已经尝试了以下,并得到错误
$ ffmpeg -f alsa -ac 2 -i hw:1,0 -itsoffset 00:00:00.5 -f video4linux2 -s 320x240 -r 25 /dev/video0 out.mpg ffmpeg version 0.8.8-4:0.8.8-0ubuntu0.12.04.1,copyright (c) 2000-2013 the Libav developers built on Oct 22 2013 12:31:55 with gcc 4.6.3 *** THIS PROGRAM IS DEPRECATED *** This program is only provided for compatibility and will be removed in a future release. Please use avconv instead. ALSA lib conf.c:3314:(snd_config_hooks_call) Cannot open shared library libasound_module_conf_pulse.so ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) UnkNown PCM hw:1,0 [alsa @ 0xbda7a0] cannot open audio device hw:1,0 (No such file or directory) hw:1,0: Input/output error
然后我试了一下
$ ffmpeg -f oss -i /dev/dsp audio.mp3 ffmpeg version 0.8.8-4:0.8.8-0ubuntu0.12.04.1,copyright (c) 2000-2013 the Libav developers built on Oct 22 2013 12:31:55 with gcc 4.6.3 *** THIS PROGRAM IS DEPRECATED *** This program is only provided for compatibility and will be removed in a future release. Please use avconv instead. [oss @ 0x1ba57a0] /dev/dsp: No such file or directory /dev/dsp: Input/output error
我一直无法获得ffmpeg来find我的麦克风。 我怎么能告诉ffmpeg从我的麦克风录音?
由于这个话题 ,似乎“弃用”的信息可以被忽略
如何select“line in”audioinput并设置input“音量”级别
Linux,C ++audio捕捉(只是麦克风)库
监视audio线路
ALSAaudio和YouTube
在bash脚本中设置系统卷(在linux中)
在Amazon EC2实例上安装Skype
通过挂接呼叫,在Windows进程中加速或静音audio播放
录制麦克风到Linux上的WAV或MP3文件?
将WebRTC(AudioTrackSinkInterface)原始audio写入光盘
使用linux命令行从WAV / RIFF获取频谱
我意识到这有点旧了。 以防其他人在寻找:
ffmpeg -f alsa -ac 2 -i default -itsoffset 00:00:00.5 -f video4linux2 -s 320x240 -r 25 -i /dev/video0 out.mpg
这样它将使用默认设备来记录。 您还在视频捕获设备 – / dev / device0之前缺少-i
如果你想得到更具体的你应该看看/ proc / asound 。 检查卡 , 设备 , pcm文件和卡子目录。 你应该能够在那里搜集到足够的信息,以便能够进行有根据的猜测。 例如hw:1,0或hw:2,0
该文件可能提供进一步的线索:
http://www.alsa-project.org/main/index.PHP/DeviceNames
网络摄像机也是如此 – 它可能不是/ dev / video0 ,也许你有一个外部摄像头插入,并在/ dev / video1 – 看看/ dev目录,看看有什么可用
解决了 !
ffmpeg -f pulse -ac 2 -i default -f x11grab -r 30 -s 1920x1080 -i :0.0 -acodec pcm_s16le -vcodec libx264 -preset ultrafast -threads 0 -y /media/t/TBVolume/desktop/output.mkv
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。