sox-users@lists.sourceforge.net unofficial mirror
 help / color / mirror / code / Atom feed
From: "Måns Rullgård" <mans@mansr.com>
To: Toru Yagi <yagitohru@yahoo.co.jp>
Cc: sox-users@lists.sourceforge.net
Subject: Re: sox can't encode to 16-bit
Date: Fri, 18 Jan 2019 21:44:35 +0000	[thread overview]
Message-ID: <yw1xy37h1vzw.fsf@mansr.com> (raw)
In-Reply-To: <2995b4a4-8938-e015-1d1f-d55a018c8f23@yahoo.co.jp> (Toru Yagi's message of "Fri, 18 Jan 2019 23:47:04 +0900")

Toru Yagi <yagitohru@yahoo.co.jp> writes:

> On 1/18/19 9:54 PM, Måns Rullgård wrote:
>>> $ rec -c 2 -b 16 -r 48000 -p trim 0 20 |
>>> sox -V3 -c 2 -b 16 -r 48000 -p test.wav trim 0 10 : newfile : restart
>>>
>>> I want to record 16-bit wav files, but the files generated are 32-bit ones.
>>
>> Put the "-b 16" option immediately before the output file argument.  You
>> can also drop all the format options preceding the -p since the pipe
>> format already includes all information.
>
> $ rec -c 2 -r 48000 -b 16 -p trim 0 20 | sox -p test.wav trim 0 10 : newfile : restart
> rec WARN formats: sox can't encode to 16-bit
>

[...]

> Is the position of "-b 16" option okay?

No, it needs to go immediately before the "test.wav" argument.

>> That said, why don't you do the splitting directly with the rec command?
>> This should work:
>>
>> $ rec -c 2 -b 16 -r 48000 test.wav trim 0 10 : newfile : restart
>
> I understand it, but I have to save test.wav first.
> I just want to split into wav files while I record from the line input.

The command I suggested does exactly that.

-- 
Måns Rullgård


_______________________________________________
Sox-users mailing list
Sox-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sox-users

  reply	other threads:[~2019-01-18 21:45 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-17 13:41 sox can't encode to 16-bit Toru Yagi
2019-01-18 12:54 ` Måns Rullgård
2019-01-18 14:47   ` Toru Yagi
2019-01-18 21:44     ` Måns Rullgård [this message]
2019-01-19 15:58       ` Toru Yagi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://lists.sourceforge.net/lists/listinfo/sox-users

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=yw1xy37h1vzw.fsf@mansr.com \
    --to=sox-users@lists.sourceforge.net \
    --cc=yagitohru@yahoo.co.jp \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/sox.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).