/media/bill/SWAPPER/bin/video production/1_Howell - video capture instructions.txt www.BillHowell.ca 07Mar2018 from earlier docs >>>>> Introduction Audio capture in Linux is a pain in the ass, but once set up properly by a VAST amount of guessing and three days to a week of work, it works well. Until the next time you need to use it. Key lessons : - DON'T USE Digital (IEC958) streams!!! - Analog ONLY!!!! - Audio cable SHUNT from Intel internal audio output to installed sound [board mic,line] ************************** Table of contents (without page numbers) Introduction Waiver/ Disclaimer Linux Mint sound settings Alsamixer & PulseAudio Alsamixer Pulse audio volume control (pavuc) Lenovo desktop computer Dell64 desktop computer audio setups from : /media/bill/SWAPPER/bin/video production/capture audio.sh Audio applications gstreamer audiorecorder Video applications RecordmyDesktop ... generated by : $ grep ">>>>> " "/media/bill/SWAPPER/bin/video production/1_Howell - video capture instructions.txt" | sed 's/\(^>>>>> \)\(.*\)/\2/' copy&paste results to replace list above **************************************************************************** >>>>> Waiver/ Disclaimer The contents of this document do NOT reflect the policies, priorities, directions, or opinions of any of the author's past current, or future employers, work colleagues family, friends, or acquaintances, nor even of the author himself. The contents (including but not restricted to concepts, results, recommendations) have NOT been approved nor sanctioned at any level by any person or organization. The reader is warned that there is no warranty or guarantee as to the accuracy of the information herein, nor can the [analysis, conclusions, and recommendations] be assumed to be correct. The application of any concepts or results herein could quite possibly result in losses and/or damages to the readers, their associates, organizations, or countries, or the entire human species. The author accepts no responsibility for damages or loss arising from the application of any of the concepts herein, neither for the reader nor third parties. ******************************************* Copyright © 2015 Bill Howell of Hussar, Alberta, Canada Exceptions: All papers cited are the property of the publisher or author as specified in the books and papers. All information from conversations with other individuals are potentially the property of that individual, or of third parties. Permission is granted to copy, distribute and/or modify ONLY the non-third-party content of this document under either: The GNU Free Documentation License (http://www.gnu.org/licenses/); with no Invariant Sections, Front-Cover Texts, or Back-Cover Texts. Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License. It is expected that users of the content will: Acknowledge William Neil Howell and/or the specific author of content or images on this page as indicated, as the source of the image. Provide a link or reference back to this specific page. Allow any modifications made to the content to also be reused under the terms of one or both of the licenses noted above. **************************************************************************** ******************************************* >>>>> Linux Mint sound settings I mostly use alsamixer+pulseAudio, not so much the normal user settings below. Sound Settings Linux Mint Menu -> Preferences -> System Settings -> Sound : Output tab -> select Digital Output (S/PDIF) CMI8786 (Xonar DG) Input tab -> select Digital Input (S/PDIF) CMI8786 (Xonar DG) https://community.linuxmint.com/tutorial/view/628 rmkimathi Go : Applications (Howell - LinuxMint Menu) -> Preferences -> Sound There on the Hardware tab. Choose a profile that does NOT contain anything related to digital or IEC. I chose Analog Stereo Duplex. My theory is, that if you go digital there, pulse is blocking the digital output. The sound preferences window seems to be only related to pulse, not alsa at all. ******************************************* >>>>> Alsamixer & PulseAudio >>>>> Alsamixer To start : Install "shunt" audio cable between line/speaker out and microphone in Open a separate terminal, and start alsamixer. Hopefully settings will be the same as required, but check that : The "Capture" bar is at reasonable volume. 03Apr2014 alsamixer volume control was balanced" (L vs R), and set to two notches below red.' ; F6: Select sound card highlights Lenovo : "0 Xonar DG" (??was "0 HDA Intel" for old Dell laptop?). Dell64 : "Creative X-Fi" To stop alsaMixer User to manually shut down alsamixer and its terminal ; Goto the separate terminal running alsamixer. press to exit alsamixer close the window >>>>> Pulse audio volume control (pavuc) >>>>> Lenovo desktop computer To get PulseAudio working properly, make sure the following settings apply : 1. Configuration tab : High Definition Audio Controller : Digital Stereo (HDMI) Output (a) Built-in Audio : Analog Stereo Output CMI8786 (Xonar DG) : Digital stereo (IEC958) Output 2. Input Devices : (a,b) 3. Output Devices : High Definition Audio Controller (HDMI) : HDMI / DisplayPort (a) Built-in Audio Digital stereo (IEC958) : Digital Output (S/PIF) (d) CMI8786 (Xonar DG) Digital Stereo (IEC958) : Digital Output (S/PIF) (d) 4. Recording : (c) 5. Playback : (c) System Sounds : (may be grayed out, (a)) old -> Built-in Audio Digital stereo (IEC958) : Digital Output (S/PIF) (d) CMI8786 (Xonar DG) Digital Stereo (IEC958) (a) - dont care about these items (b) - might be blank (c) - might be blank until arecorder kicks in, have to check during recording (d) - check all small boxes (EAC3 unchecks?) # 20May2014 rmd only uses this stop_PulseAudio IS { NONLOCAL PID_pulse WID_pulse ; %host link 'xdotool key --window ' WID_pulse ' ctrl+c % This doesn't work ; %host link 'kill -15 ' PID_pulse ; % Actually - this wont work, as pulseaudio autospawns (need to fix that!) ; %host link 'kill -15 ' PID_pavuc ; % ; %User to SUSTAIN alsamixer and its terminal ; ' ; ' ; It is advised that you do NOT shut down "PulseAudio Volume Control" (pavuc) nor alsamixer, ' ; as you will need to switch Configurations between digital for record and analog for playback. ' ; readscreen 'Press to continue with work that may follow this recording session....' ; ' ; } >>>>> Dell64 desktop computer I have to shunt audio from [speaker, headphones] to [mic, line in] ??? >> I shunted from Intel [headphone,line-out] (blue audio) to EMU20k2 mic in (hard to tell which connects are correct!) Try recoding again with PulseAudio changes to : 1. Configuration tab : x EMU20k2 [X-Fi Titanium Series] : Digital stereo (IEC958) Output + Analog Stereo Input >> I switched this to Analog Duplex GF100 High Definition Audio Controller : Off Built-in Audio : Off 2. Input Devices : x Monitor of EMU20k2 [X-Fi Titanium Series] : Digital stereo (IEC958) EMU20k2 [X-Fi Titanium Series] Analog Stereo : Microphone 3. Output Devices : x EMU20k2 [X-Fi Titanium Series] Analog stereo : Analog Output 4. Recording : EMU20k2 [X-Fi Titanium Series] : Analog stereo >> gives NO recording activity when selected x Monitor of EMU20k2 [X-Fi Titanium Series] : Analog stereo >> I switched back&forth - I think (IEC958) is desired, but no sound getting through 5. Playback : whole pile of streams (mostly FireFox) x FireFox last stream : GOOD!! now there is visible output activity! Audacious active (>0) System Sounds : silent ("x" means set as fallback) >> YEAHH! It worked, all analogue! >>>>> audio setups from : /media/bill/SWAPPER/bin/video production/capture audio.sh # www.BillHowell.ca 22Sep2017 taken from 0_audCaptrACM.ndf #************************* # Setup of audio jacks, alsamixer, pulseaudio, pavucontrl #see "/media/bill/HOWELL_BASE/System_maintenance/audio/0_PulseAudio Ctrl notes - setup, problems.txt" #+-----+ #PLAYBACK of audio file : #audio cable/jacks stereo : split audio output of system (HDA Intel) # -> input to [ghetto blaster, mic/line of EMU20k2 [X-Fi Titanium Series]] #for iterative [microphone record, audio playback] : set alsa (F6) at "3 Yeti stereo mic - record"! #alsamixer 1 HDA Intel #pulseaudio config EMU20k2 [X-Fi Titanium Series] : off #pulseaudio config GF100 High Definition Audio Controller : off #pulseaudio config Built-in Audio : Analogue Stereo Duplex #pulseaudio config 1.1 root hub (microphone) : off #pulseaudio config 1.1 root hub (microphone) : Digital Stereo (IEC958) Output + Analog stereo input #pulseaudio Input Dev Built-in Audio Analog Stereo : Analog Input #pulseaudio Outpt Dev Built-in Audio Analog Stereo : Line out (plugged in) #>> Result : # audio playback works #+-----+ #+-----+ #Blue Yeti microphone capture #audio cable/jacks split audio output of system (HDA Intel) # -> input to [ghetto blaster, mic/line of EMU20k2 [X-Fi Titanium Series]] #for iterative [microphone record, audio playback] : set alsa (F6) at "3 Yeti stereo mic - record"! #alsamixer F6 3 Yeti stereo microphone #pulseaudio config EMU20k2 [X-Fi Titanium Series] : off #pulseaudio config GF100 High Definition Audio Controller : off #pulseaudio config Built-in Audio : Analogue Stereo Duplex (for convenience for playback) #pulseaudio config 1.1 root hub (microphone) : Digital Stereo (IEC958) Output + Analog stereo input #pulseaudio Input Dev 1.1 root hub Analog Stereo : Microphone #pulseaudio Outpt Dev 1.1 root hub Digital Stereo (IEC958 : Digital Output (S/PDIF) #Recording ALSA plug-in [aplay]: ALSA capture from : 1.1 root hub Analog Stereo # #>> Result : # blue yeti microphone capture works, .wav file plays through audio software #+-----+ ******************************************* >>>>> Audio applications >>>>> gstreamer https://community.linuxmint.com/tutorial/view/628 rmkimathi Now open up a terminal window and start: gstreamer-properties On the Audio tab, select ALSA - Advanced Linux Sound Architecture, for Default Output. As Device, choose the digital device, in my case: ALC889A (my sound chip) digital. I selected ALSA also for Default Input, though I don't think Input has any effect, as long as you don't use a mic or something. In XBMC, I got both devices for audio and passthrough set to IEC958. And voila :-) I am enjoying happy sound via Alsa in Ubuntu and XBMC, via HDMI and SPDIF, including passthrough in XBMC. Hope this can help others to avoid audio troubles in Linux. Howell Music icon - right end of LinuxMint top panel Output device -> Built-in Analog Stereo >>>>> audiorecorder ******************************************* >>>>> Video applications >>>>> RecordmyDesktop cmd := link 'recordmydesktop -x ' x ' -y ' y ' --width ' width ' --height ' height ' --v_quality 63 --v_bitrate 2000000 --fps 30 ' ' --buffer-size 264620032 --freq 48000 ' ' -o "' pName '" & ' ; Can reset [pause, stop] shortcut keys : --pause-shortcut Default = Control+Mod1+p (Mod1 usually is laft alt) --stop-shortcut Default = Control+Mod1+s enddoc