Dev*_*are 5 audio screen vlc recording
我遇到了如何在 VLC 中捕获麦克风输入?在这篇文章中说:
\n\n\n\n\nMac:使用 VLC 2.0.0 或更高版本并利用 qtsound 模块:
\n
/Applications/VLC.app/Contents/MacOS/VLC -vvv qtsound:// \nRun Code Online (Sandbox Code Playgroud)\n\n如果我运行此命令,VLC 会从麦克风获取声音并将其输出到扬声器:
\n\n/Applications/VLC.app/Contents/MacOS/VLC qtsound://\nRun Code Online (Sandbox Code Playgroud)\n\n有没有办法将其录制到文件中?\n如果有,是否有办法将其与屏幕录制结合起来并生成带声音的屏幕投射?
\n\n到目前为止,我成功录制了屏幕投射,但无法在视频录制中添加声音:
\n\n/Applications/VLC.app/Contents/MacOS/VLC -I dummy screen:// --screen-fps=25 --sout "#transcode{vcodec=h264,vb072,acodec=mp4a,ab=128}:standard{access=file,mux=mp4,dst="~/Desktop/vlc-output-terminal.mp4"}"\nRun Code Online (Sandbox Code Playgroud)\n\n知道如何使用 VLC 和 qtsound (或其他输入)从麦克风录制声音吗?
\n\n更新:
\n\n在 Linux 上,它使用所谓的--input-slave参数,我尝试使用 mac 音频设备在 mac 上复制该参数:
\n\n/Applications/VLC.app/Contents/MacOS/VLC -vvv -I dummy screen:// --input-slave qtsound://AppleHDAEngineInput:1B,0,1,0:1 --sout "#transcode{vcodec=h264,vb=1024,acodec=mp4a,ab=128}:standard{access=file,mux=mp4,dst="~/Desktop/vlc-output-terminal.mp4"}"\nRun Code Online (Sandbox Code Playgroud)\n\n不幸的是,尽管 VLC 表示一切正常,但输出文件无效并且始终只有 44 字节长。以下是该命令的控制台输出:
\n\nAPPLEs-MacBook-Pro:deploy-mac myuser$ /Applications/VLC.app/Contents/MacOS/VLC -vvv -I dummy screen:// --input-slave qtsound://AppleHDAEngineInput:1B,0,1,0:1 --sout "#transcode{vcodec=h264,vb=1024,acodec=mp4a,ab=128}:standard{access=file,mux=mp4,dst="/Users/myuser/Desktop/vlc-output-terminal.mp4"}"\nVLC media player 2.1.5 Rincewind (revision 2.1.4-59-g5f258d5)\n[0x100503250] main libvlc debug: VLC media player - 2.1.5 Rincewind\n[0x100503250] main libvlc debug: Copyright \xc2\xa9 1996-2014 the VideoLAN team\n[0x100503250] main libvlc debug: revision 2.1.4-59-g5f258d5\n[0x100503250] main libvlc debug: configured with ../extras/package/macosx/../../../configure \'--prefix=/Users/fkuehne/Desktop/videolan/gits/vlc-2.1/release/vlc_install_dir\' \'--enable-macosx\' \'--enable-merge-ffmpeg\' \'--enable-growl\' \'--enable-faad\' \'--enable-flac\' \'--enable-theora\' \'--enable-shout\' \'--enable-ncurses\' \'--enable-twolame\' \'--enable-realrtsp\' \'--enable-libass\' \'--enable-macosx-audio\' \'--enable-macosx-eyetv\' \'--enable-macosx-qtkit\' \'--enable-macosx-vout\' \'--disable-caca\' \'--disable-skins2\' \'--disable-xcb\' \'--disable-sdl\' \'--disable-samplerate\' \'--disable-macosx-dialog-provider\' \'--with-macosx-sdk=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk\' \'--build=x86_64-apple-darwin10\' \'--with-macosx-version-min=10.6\' \'build_alias=x86_64-apple-darwin10\' \'CC=xcrun clang\' \'CXX=xcrun clang++\' \'OBJC=xcrun clang\'\n[0x100503250] main libvlc debug: searching plug-in modules\n[0x100503250] main libvlc debug: loading plugins cache file /Applications/VLC.app/Contents/MacOS/plugins/plugins.dat\n[0x100503250] main libvlc debug: recursively browsing `/Applications/VLC.app/Contents/MacOS/plugins\'\n[0x100503250] main libvlc debug: saving plugins cache /Applications/VLC.app/Contents/MacOS/plugins/plugins.dat\n[0x100503250] main libvlc debug: plug-ins loaded: 373 modules\n[0x100503250] main libvlc debug: opening config file (/Users/myuser/Library/Preferences/org.videolan.vlc/vlcrc)\n[0x100503250] main libvlc debug: translation test: code is "C"\n[0x100503250] main libvlc debug: CPU has capabilities MMX MMXEXT SSE SSE2 SSE3 SSSE3 SSE4.1 SSE4.2 FPU \n[0x100477360] main interface debug: looking for interface module matching "(null),none": 15 candidates\n[0x100477360] main interface debug: no interface modules matched\n[0x100477360] main interface error: no suitable interface module\n[0x100478c70] main input debug: Creating an input for \'Media Library\'\n[0x100478c70] main input debug: Input is a meta file: disabling unneeded options\n[0x100478c70] main input debug: using timeshift granularity of 50 MiB, in path \'/tmp\'\n[0x100478c70] main input debug: `file/xspf-open:///Users/myuser/Library/Application%20Support/org.videolan.vlc/ml.xspf\' gives access `file\' demux `xspf-open\' path `/Users/myuser/Library/Application%20Support/org.videolan.vlc/ml.xspf\'\n[0x100478c70] main input debug: creating demux: access=\'file\' demux=\'xspf-open\' location=\'/Users/myuser/Library/Application%20Support/org.videolan.vlc/ml.xspf\' file=\'/Users/myuser/Library/Application Support/org.videolan.vlc/ml.xspf\'\n[0x10047bf40] main demux debug: looking for access_demux module matching "file": 14 candidates\n[0x10047bf40] main demux debug: no access_demux modules matched\n[0x100478c70] main input debug: creating access \'file\' location=\'/Users/myuser/Library/Application%20Support/org.videolan.vlc/ml.xspf\', path=\'/Users/myuser/Library/Application Support/org.videolan.vlc/ml.xspf\'\n[0x10047c5f0] main access debug: looking for access module matching "file": 18 candidates\n[0x10047c5f0] filesystem access debug: opening file `/Users/myuser/Library/Application Support/org.videolan.vlc/ml.xspf\'\n[0x10047c5f0] main access debug: using access module "filesystem"\n[0x10047ca00] main stream debug: Using stream method for AStream*\n[0x10047ca00] main stream debug: starting pre-buffering\n[0x10047ca00] main stream debug: received first data after 0 ms\n[0x10047ca00] main stream debug: pre-buffering done 296 bytes in 0s - 15213 KiB/s\n[0x10047cc60] main stream debug: looking for stream_filter module matching "any": 9 candidates\n[0x10047cc60] main stream debug: no stream_filter modules matched\n[0x10047cc60] main stream debug: looking for stream_filter module matching "record": 9 candidates\n[0x10047cc60] main stream debug: using stream_filter module "record"\n[0x100478c70] main input debug: creating demux: access=\'file\' demux=\'xspf-open\' location=\'/Users/myuser/Library/Application%20Support/org.videolan.vlc/ml.xspf\' file=\'/Users/myuser/Library/Application Support/org.videolan.vlc/ml.xspf\'\n[0x10047d4d0] main demux debug: looking for demux module matching "xspf-open": 63 candidates\n[0x10047d4d0] playlist demux debug: using XSPF playlist reader\n[0x10047d4d0] main demux debug: using demux module "playlist"\n[0x10047d6e0] main demux meta debug: looking for meta reader module matching "any": 2 candidates\n[0x10047d6e0] lua demux meta debug: Trying Lua scripts in /Users/myuser/Library/Application Support/org.videolan.vlc/lua/meta/reader\n[0x10047d6e0] lua demux meta debug: Trying Lua scripts in /Applications/VLC.app/Contents/MacOS/share/lua/meta/reader\n[0x10047d6e0] lua demux meta debug: Trying Lua playlist script /Applications/VLC.app/Contents/MacOS/share/lua/meta/reader/filename.luac\n[0x10047d6e0] lua demux meta debug: Trying Lua scripts in /Applications/VLC.app/Contents/MacOS/share/share/lua/meta/reader\n[0x10047d6e0] main demux meta debug: no meta reader modules matched\n[0x100478c70] main input debug: `file/xspf-open:///Users/myuser/Library/Application%20Support/org.videolan.vlc/ml.xspf\' successfully opened\n[0x1004817e0] main xml reader debug: looking for xml reader module matching "any": 1 candidates\n[0x1004817e0] main xml reader debug: using xml reader module "xml"\n[0x10047d4d0] playlist demux debug: parsed 0 tracks successfully\n[0x100478c70] main input debug: EOF reached\n[0x10047d4d0] main demux debug: removing module "playlist"\n[0x10047cc60] main stream debug: removing module "record"\n[0x10047c5f0] main access debug: removing module "filesystem"\n[0x100477870] main playlist debug: creating audio output\n[0x10047ca00] main audio output debug: looking for audio output module matching "any": 4 candidates\n[0x10047ca00] auhal audio output debug: found 4 audio device(s)\n[0x10047ca00] auhal audio output debug: DevID: 39 DevName: AirPlay\n[0x10047ca00] auhal audio output debug: found 1 stream formats for stream id 40\n[0x10047ca00] auhal audio output debug: DevID: 65 DevName: Built-in Microphone\n[0x10047ca00] auhal audio output debug: this \'Built-in Microphone\' is INPUT only. skipping...\n[0x10047ca00] auhal audio output debug: DevID: 55 DevName: Built-in Input\n[0x10047ca00] auhal audio output debug: this \'Built-in Input\' is INPUT only. skipping...\n[0x10047ca00] auhal audio output debug: DevID: 47 DevName: Built-in Output\n[0x10047ca00] auhal audio output debug: found 16 stream formats for stream id 48\n[0x10047ca00] main audio output debug: restart requested (2)\n[0x10047ca00] main audio output debug: using audio output module "auhal"\n[0x100477870] main playlist debug: keeping audio output\n[0x100477870] main playlist debug: adding item `screen://\' ( screen:// )\n[0x100477870] main playlist debug: no fetch required for (null) (art currently (null))\n[0x100506170] main interface debug: looking for interface module matching "hotkeys,none": 15 candidates\n[0x100506170] main interface debug: using interface module "hotkeys"\n[0x100506590] main interface debug: looking for interface module matching "dummy": 15 candidates\n[0x100506590] dummy interface: using the dummy interface module...\n[0x100506590] main interface debug: using interface module "dummy"\n[0x100477870] main playlist debug: processing request item: null, node: Playlist, skip: 0\n[0x100477870] main playlist debug: rebuilding array of current - root Playlist\n[0x100477870] main playlist debug: rebuild done - 1 items, index -1\n[0x100477870] main playlist debug: starting playback of the new playlist item\n[0x100477870] main playlist debug: resyncing on screen://\n[0x100477870] main playlist debug: screen:// is at 0\n[0x100477870] main playlist debug: creating new input thread\n[0x10048e9e0] main input debug: Creating an input for \'screen://\'\n[0x100506cb0] main stream output debug: using sout chain=`transcode{vcodec=h264,vb=1024,acodec=mp4a,ab=128}:standard{access=file,mux=mp4,dst=/Users/myuser/Desktop/vlc-output-terminal.mp4}\'\n[0x100506cb0] main stream output debug: stream=`standard\'\n[0x100507250] main stream out debug: looking for sout stream module matching "standard": 20 candidates\n[0x100507250] main stream out debug: set config option: sout-standard-access to file\n[0x100507250] main stream out debug: set config option: sout-standard-mux to mp4\n[0x100507250] main stream out debug: set config option: sout-standard-dst to /Users/myuser/Desktop/vlc-output-terminal.mp4\n[0x100507e50] main access out debug: looking for sout access module matching "file": 8 candidates\n[0x100507e50] access_output_file access out debug: file access output opened (/Users/myuser/Desktop/vlc-output-terminal.mp4)\n[0x100507e50] main access out debug: using sout access module "access_output_file"\n[0x100508430] main mux debug: looking for sout mux module matching "mp4": 10 candidates\n[0x100508430] mux_mp4 mux debug: Mp4 muxer opened\n[0x100508430] main mux debug: using sout mux module "mux_mp4"\n[0x100507250] stream_out_standard stream out debug: using `file/mp4:///Users/myuser/Desktop/vlc-output-terminal.mp4\'\n[0x100507250] main stream out debug: using sout stream module "stream_out_standard"\n[0x100506cb0] main stream output debug: stream=`transcode\'\n[0x1005087a0] main stream out debug: looking for sout stream module matching "transcode": 20 candidates\n[0x1005087a0] main stream out debug: set config option: sout-transcode-vcodec to h264\n[0x1005087a0] main stream out debug: set config option: sout-transcode-vb to 1024\n[0x1005087a0] main stream out debug: set config option: sout-transcode-acodec to mp4a\n[0x1005087a0] main stream out debug: set config option: sout-transcode-ab to 128\n[0x1005087a0] stream_out_transcode stream out debug: codec audio=mp4a 0Hz 0 channels 128Kb/s\n[0x1005087a0] stream_out_transcode stream out debug: codec video=h264 0x0 scaling: 0.000000 1024kb/s\n[0x1005087a0] main stream out debug: using sout stream module "stream_out_transcode"\n[0x10048e9e0] main input debug: using timeshift granularity of 50 MiB, in path \'/tmp\'\n[0x10048e9e0] main input debug: `screen://\' gives access `screen\' demux `\' path `\'\n[0x10048e9e0] main input debug: creating demux: access=\'screen\' demux=\'\' location=\'\' file=\'(null)\'\n[0x10050a4b0] main demux debug: looking for access_demux module matching "screen": 14 candidates\n[0x10050a4b0] screen demux debug: screen width: 1920, height: 1200, depth: 32\n[0x10048e9e0] main input debug: selecting program id=0\n[0x10050a4b0] main demux debug: using access_demux module "screen"\n[0x10048e9e0] main input debug: adding slave input \'qtsound://AppleHDAEngineInput:1B,0,1,0:1\'\n[0x10048e9e0] main input debug: `qtsound://AppleHDAEngineInput:1B,0,1,0:1\' gives access `qtsound\' demux `\' path `AppleHDAEngineInput:1B,0,1,0:1\'\n[0x10048e9e0] main input debug: creating demux: access=\'qtsound\' demux=\'\' location=\'AppleHDAEngineInput:1B,0,1,0:1\' file=\'(null)\'\n[0x100492f20] main demux debug: looking for access_demux module matching "qtsound": 14 candidates\n[0x100492f20] qtsound.lo demux debug: qtsound uid = AppleHDAEngineInput:1B,0,1,0:1\n[0x100492f20] qtsound.lo demux debug: qtsound : uid = AppleHDAEngineInput:1B,0,1,0:1\n[0x100492f20] qtsound.lo demux debug: qtsound audio 0/2 localizedDisplayName: Built-in Microphone uniqueID: AppleHDAEngineInput:1B,0,1,0:1\n[0x100492f20] qtsound.lo demux debug: Device found\n[0x100492f20] qtsound.lo demux debug: created valid audio capture input facility\n[0x100492f20] qtsound.lo demux debug: initialized audio output\n[0x100492f20] qtsound.lo demux debug: Audio localized format summary: Linear PCM, 24 bit little-endian signed integer, 2 channels, 44100 Hz**\n[0x100492f20] qtsound.lo demux debug: Audio format description attributes: {\n audioStreamBasicDescription = "<00000000 8088e540 6d63706c 04000000 08000000 01000000 08000000 02000000 18000000 00000000>";\n}\nRun Code Online (Sandbox Code Playgroud)\n\n除此之外,VLC 什么也不做,我必须用 Ctrl-C 杀死它,因为没有进一步发生。\n从上面的日志中,我猜想与音频部分最相关的是一切似乎都工作得很好, VLC 端没有错误或投诉:
\n\n[0x10048e9e0] main input debug: `qtsound://AppleHDAEngineInput:1B,0,1,0:1\' gives access `qtsound\' demux `\' path `AppleHDAEngineInput:1B,0,1,0:1\'\n [0x10048e9e0] main input debug: creating demux: access=\'qtsound\' demux=\'\' location=\'AppleHDAEngineInput:1B,0,1,0:1\' file=\'(null)\'\n [0x100492f20] main demux debug: looking for access_demux module matching "qtsound": 14 candidates\n [0x100492f20] qtsound.lo demux debug: qtsound uid = AppleHDAEngineInput:1B,0,1,0:1\n [0x100492f20] qtsound.lo demux debug: qtsound : uid = AppleHDAEngineInput:1B,0,1,0:1\n [0x100492f20] qtsound.lo demux debug: qtsound audio 0/2 localizedDisplayName: Built-in Microphone uniqueID: AppleHDAEngineInput:1B,0,1,0:1\n [0x100492f20] qtsound.lo demux debug: Device found\n [0x100492f20] qtsound.lo demux debug: created valid audio capture input facility\n [0x100492f20] qtsound.lo demux debug: initialized audio output\n [0x100492f20] qtsound.lo demux debug: Audio localized format summary: Linear PCM, 24 bit little-endian signed integer, 2 channels, 44100 Hz**\n [0x100492f20] qtsound.lo demux debug: Audio format description attributes: {\n audioStreamBasicDescription = "<00000000 8088e540 6d63706c 04000000 08000000 01000000 08000000 02000000 18000000 00000000>";\n }\nRun Code Online (Sandbox Code Playgroud)\n