sox-users@lists.sourceforge.net unofficial mirror
 help / color / mirror / code / Atom feed
* manualy setting output as for .s32 extension
@ 2020-08-21 12:33 Danijel DOMAZET
  2020-08-21 13:37 ` Måns Rullgård
  2020-08-21 14:15 ` Jan Stary
  0 siblings, 2 replies; 3+ messages in thread
From: Danijel DOMAZET @ 2020-08-21 12:33 UTC (permalink / raw)
  To: sox-users


[-- Attachment #1.1: Type: text/plain, Size: 550 bytes --]

Hi SoX users,

This command works for me:
1) sox --channels 1 --rate 48000 in_signal.wav in_signal.s32

Now, I'd like to change the output filename extension. In that case SoX
can't deduce the format from the extension, so I have to tell it the
details. I tried the following line:
2) sox --bits 32 --channels 1 --encoding signed-integer --rate 48000
in_signal.wav --type raw in_signal.q31

However, I am not getting the same output as using the first command.

What's done wrong in the second command?

Cheers,
Danijel Domazet

-- 
- Confidential -

[-- Attachment #1.2: Type: text/html, Size: 1076 bytes --]

[-- Attachment #2: Type: text/plain, Size: 0 bytes --]



[-- Attachment #3: Type: text/plain, Size: 158 bytes --]

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: manualy setting output as for .s32 extension
  2020-08-21 12:33 manualy setting output as for .s32 extension Danijel DOMAZET
@ 2020-08-21 13:37 ` Måns Rullgård
  2020-08-21 14:15 ` Jan Stary
  1 sibling, 0 replies; 3+ messages in thread
From: Måns Rullgård @ 2020-08-21 13:37 UTC (permalink / raw)
  To: Danijel DOMAZET; +Cc: sox-users

Danijel DOMAZET <p-danijel.domazet@devialet.com> writes:

> Hi SoX users,
>
> This command works for me:
> 1) sox --channels 1 --rate 48000 in_signal.wav in_signal.s32
>
> Now, I'd like to change the output filename extension. In that case SoX
> can't deduce the format from the extension, so I have to tell it the
> details. I tried the following line:
> 2) sox --bits 32 --channels 1 --encoding signed-integer --rate 48000
> in_signal.wav --type raw in_signal.q31
>
> However, I am not getting the same output as using the first command.
>
> What's done wrong in the second command?

You're options you've added apply to the input file, not the output, and
probably don't do what you want.  With a WAV input, you should not
normally need to specify channel count or sample rate unless the file
header is incorrect (it happens).

All you need to do here is say --type s32 before the output file
(instead of raw).

-- 
Måns Rullgård


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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: manualy setting output as for .s32 extension
  2020-08-21 12:33 manualy setting output as for .s32 extension Danijel DOMAZET
  2020-08-21 13:37 ` Måns Rullgård
@ 2020-08-21 14:15 ` Jan Stary
  1 sibling, 0 replies; 3+ messages in thread
From: Jan Stary @ 2020-08-21 14:15 UTC (permalink / raw)
  To: sox-users

On Aug 21 14:33:24, p-danijel.domazet@devialet.com wrote:
> This command works for me:
> 1) sox --channels 1 --rate 48000 in_signal.wav in_signal.s32

Why are you overriding the number of channels and the sample rate
for a wav file, which already has that information in the wav header?

> Now, I'd like to change the output filename extension. In that case SoX
> can't deduce the format from the extension, so I have to tell it the
> details. I tried the following line:
> 2) sox --bits 32 --channels 1 --encoding signed-integer --rate 48000
> in_signal.wav --type raw in_signal.q31

The option at the beginning of the line (before the input file)
overrdide the specifications for that file. Toy want to put those
specifications before the output file, to tell sox what its format is.
In the wors of the holy manpage,

  sox [global-options] [format-options] infile [format-options] outfile

Jan

> Danijel Domazet
> -- 
> - Confidential -

Don't tell anyone then.




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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-08-21 14:16 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-21 12:33 manualy setting output as for .s32 extension Danijel DOMAZET
2020-08-21 13:37 ` Måns Rullgård
2020-08-21 14:15 ` Jan Stary

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).