Re: Recording specific channels
"Michael Cottle, (David)" <[email protected]> Mon, 13 May 2024 17:28:39 +0000
| Newsgroups | gmane.comp.audio.sox |
|---|---|
| Message-ID | <BYAPR11MB27766A8E3F8C3E93B49CC851E7E22@BYAPR11MB2776.namprd11.prod.outlook.com> |
This one I started then closed the screen share so there was no other activity. It stopped after 5 minutes. minion-2-recording:~ minion$ ~/sox/rec -V5 -c 8 -b 16 -r 48k /Volumes/CAF3/test77.aif /Users/minion/sox/rec: SoX v14.4.2 time: Feb 22 2015 14:58:07 uname: Darwin minion-2-recording 22.6.0 Darwin Kernel Version 22.6.0: Wed Jul 5 22:17:35 PDT 2023; root:xnu-8796.141.3~6/RELEASE_ARM64_T8112 x86_64 compiler: gcc 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.56) arch: 1288 48 88 L /Users/minion/sox/rec DBUG coreaudio: audio device did not accept 2 channels. Use 18 channels instead. /Users/minion/sox/rec DBUG coreaudio: audio device did not accept 44100 sample rate. Use 48000 instead. /Users/minion/sox/rec WARN formats: can't set 8 channels; using 18 Input File : 'default' (coreaudio) Channels : 18 Sample Rate : 48000 Precision : 32-bit Sample Encoding: 32-bit Signed Integer PCM Endian Type : little Reverse Nibbles: no Reverse Bits : no /Users/minion/sox/rec DBUG aiff: converted 48000 to 100 16 37777777673 37777777600 0 0 0 0 0 0 Output File : '/Volumes/CAF3/test77.aif' Channels : 8 Sample Rate : 48000 Precision : 16-bit Sample Encoding: 16-bit Signed Integer PCM Endian Type : big Reverse Nibbles: no Reverse Bits : no Comment : 'Processed by SoX' /Users/minion/sox/rec DBUG effects: sox_add_effect: extending effects table, new size = 8 /Users/minion/sox/rec DBUG remix: 0: /Users/minion/sox/rec DBUG remix: 0 0.333333 /Users/minion/sox/rec DBUG remix: 8 0.333333 /Users/minion/sox/rec DBUG remix: 16 0.333333 /Users/minion/sox/rec DBUG remix: 1: /Users/minion/sox/rec DBUG remix: 1 0.333333 /Users/minion/sox/rec DBUG remix: 9 0.333333 /Users/minion/sox/rec DBUG remix: 17 0.333333 /Users/minion/sox/rec DBUG remix: 2: /Users/minion/sox/rec DBUG remix: 2 0.5 /Users/minion/sox/rec DBUG remix: 10 0.5 /Users/minion/sox/rec DBUG remix: 3: /Users/minion/sox/rec DBUG remix: 3 0.5 /Users/minion/sox/rec DBUG remix: 11 0.5 /Users/minion/sox/rec DBUG remix: 4: /Users/minion/sox/rec DBUG remix: 4 0.5 /Users/minion/sox/rec DBUG remix: 12 0.5 /Users/minion/sox/rec DBUG remix: 5: /Users/minion/sox/rec DBUG remix: 5 0.5 /Users/minion/sox/rec DBUG remix: 13 0.5 /Users/minion/sox/rec DBUG remix: 6: /Users/minion/sox/rec DBUG remix: 6 0.5 /Users/minion/sox/rec DBUG remix: 14 0.5 /Users/minion/sox/rec DBUG remix: 7: /Users/minion/sox/rec DBUG remix: 7 0.5 /Users/minion/sox/rec DBUG remix: 15 0.5 /Users/minion/sox/rec INFO sox: effects chain: input 48000Hz 18 channels (multi) 32 bits unknown length /Users/minion/sox/rec INFO sox: effects chain: channels 48000Hz 8 channels (multi) 32 bits unknown length /Users/minion/sox/rec INFO sox: effects chain: dither 48000Hz 8 channels 16 bits unknown length /Users/minion/sox/rec INFO sox: effects chain: output 48000Hz 8 channels (multi) 16 bits unknown length /Users/minion/sox/rec DBUG sox: start-up time = 0.103435 In:0.00% 00:05:20.42 [00:00:00.00] Out:15.4M [ | ] Clip:0 Done. /Users/minion/sox/rec DBUG aiff: converted 48000 to 100 16 37777777673 37777777600 0 0 0 0 0 0 minion-2-recording:~ minion$ 5/13/24, 10:55, "Jan Stary" <[email protected]>: On May 13 15:57:43, [email protected] wrote: > [* * * * * /Users… ] > > This looks promising, and I apologize for my ignorance (I have a bad habit of learning just enough code to do what I need), but it didn’t work for me. > > First, just to clarify, my sox folder is in the top level of my users account. I know it should be in the /bin/, but I get a new machine every year and keep forgetting how to move it and get the correct path (~/.bash_profile?) and don’t want to pester our tech staff to do it, so in the command line I just have to type the extra ~/sox/rec. The path can be whatever - as long as it is in your $PATH you can just call 'sox'. You can also specify the PATH at the beginning you your crontab. (This has nothing to do with sox.) > Second, in this example I don’t understand where the file is > being written to. Exactly where the command says: /tmp/file-`date +\%s`.wav Look under /tmp, see the files named file-whatever. > Last, it didn’t create a new file, but just stopped after 1 minute. Yes - it creates a new one at the beginning of the next minute. Jan PS: Please quote the emails you are replying to properly and don't top-post. It is customary in tech mailing list to quote the relevant portion verbatim and comment inline. Also, please wrap your lines - some pople (me included) read this in a text terminal. Long lines make it unnecessarily difficult to quote a bit from one "line" which is in fact a whole paragraph. > > > 5/13/24, 08:47, "Jan Stary" <[email protected]>: > > On May 13 09:26:10, [email protected] wrote: > > On May 12 22:56:45, [email protected] wrote: > > > If someone needs files from 1:35 to 3:15 we just give them 1 to 4. > > > They combine them (with no seam at 2pm) [...] We routinely combine files > > > into larger segments and we need them to be seamless. > > > > Ah, right, that's what you mean by "sample perfect". Let's try: > > > > $ sox -n sine.wav synth 10 > > $ sox sine.wav part%n.wav trim 0 5 : newfile : trim 0 5 > > $ soxi sine.wav part*.wav > > > > On my machine, that's 480000 split into 240000 + 240000 exactly > > when I said 5s out of 10s. > > On the contrary, this is not sample perfect: > a line in my crontab, starting a recording of one minute every minute. > > * * * * * /Users/hans/bin/rec -q /tmp/file-`date +\%s`.wav trim 0 00:01:00 > > This does indeed record each minute of audio into > an appropriately named file, but the transition is not seamless > (as verified by playing a song longer than one minute). > > But if you change this to record your "predefined blocks" > of a couple of hours, then perhaps overlaping a few samples > will not matter if the seams are at silent times. > Or you could record whole days, restarting at, say, 3 am. > > Jan > > > > _______________________________________________ > Sox-users mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/sox-users > _______________________________________________ > Sox-users mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/sox-users _______________________________________________ Sox-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/sox-users _______________________________________________ Sox-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/sox-users