sox-users@lists.sourceforge.net unofficial mirror
 help / color / mirror / code / Atom feed
* concat problem
@ 2017-09-22 16:36 Glenn English
  2017-09-22 17:34 ` Eric Wong
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Glenn English @ 2017-09-22 16:36 UTC (permalink / raw)
  To: sox-users

Debian Jessie, Supermicro box, SoX 14.4.1, SoX noob.

I ask SoX to concatenate AIFFs, and Mac Air stops at the end of first file.

I've written a Python script (first use of SoX) to concat a lot of
translated MP3s into a big AIFF file. The translation goes fine, and
SoX creates a huge AIFF, but there seems to be an EOF in there at the
end of the first file. Actually a little before the end of the first
file. The Air has been playing files (VLC) for several years with no
problems.

I give SoX a long list of AIFF source files and a destination file
name at the end. The MP3s have been successfully translated to AIFFs
earlier with a format conversion pass through SoX.

What am I missing?

--
Glenn English

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Sox-users mailing list
Sox-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sox-users

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

* Re: concat problem
  2017-09-22 16:36 concat problem Glenn English
@ 2017-09-22 17:34 ` Eric Wong
  2017-09-22 19:51   ` Glenn English
  2017-09-23 12:33 ` Jan Stary
  2017-09-27 14:42 ` Jan Stary
  2 siblings, 1 reply; 9+ messages in thread
From: Eric Wong @ 2017-09-22 17:34 UTC (permalink / raw)
  To: sox-users

Glenn English <ghe2001@gmail.com> wrote:
> Debian Jessie, Supermicro box, SoX 14.4.1, SoX noob.
> 
> I ask SoX to concatenate AIFFs, and Mac Air stops at the end of first file.

Can you play the file back with the "play(1)" command in sox on
Jessie?

Or try converting from AIFF back to mp3, flac, or whatever else
and see if the Mac can play that...

> I've written a Python script (first use of SoX) to concat a lot of
> translated MP3s into a big AIFF file. The translation goes fine, and
> SoX creates a huge AIFF, but there seems to be an EOF in there at the
> end of the first file. Actually a little before the end of the first
> file. The Air has been playing files (VLC) for several years with no
> problems.

Any other players you can try?  I don't have much experience
with VLC and have never used a Mac.

> I give SoX a long list of AIFF source files and a destination file
> name at the end. The MP3s have been successfully translated to AIFFs
> earlier with a format conversion pass through SoX.
> 
> What am I missing?

Any chance you're hitting a file size limit somewhere?  I'm not
familiar with AIFF, but FLAC supports large files and is lossless, too;
perhaps try that...

What's the exact command?

Can you reproduce the problem with smaller initial AIFF source
files?

Instead of using the entire long list of AIFF source files, can
you try only concatenating two of them and see if that's
successful.  (And then move onto 3 files, and 4 files, and so
on...)

Thanks.

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Sox-users mailing list
Sox-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sox-users

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

* Re: concat problem
  2017-09-22 17:34 ` Eric Wong
@ 2017-09-22 19:51   ` Glenn English
  0 siblings, 0 replies; 9+ messages in thread
From: Glenn English @ 2017-09-22 19:51 UTC (permalink / raw)
  To: sox-users

On Fri, Sep 22, 2017 at 5:34 PM, Eric Wong <normalperson@yhbt.net> wrote:

> Can you play the file back with the "play(1)" command in sox on
> Jessie?

Don't know. The 'big' computer doesn't do sound (yet), so I move the
files around on sneaker net. I do know how long that first file is,
about 7 seconds. I see what I can do to time it.

> Or try converting from AIFF back to mp3, flac, or whatever else
> and see if the Mac can play that...

I already do that (the big uncompressed file is converted to MP3 as
the last step), and the MP3 does the same thing: stops after 7 seconds

> Any other players you can try?  I don't have much experience
> with VLC and have never used a Mac.

I could try iTunes...

> Any chance you're hitting a file size limit somewhere?  I'm not
> familiar with AIFF, but FLAC supports large files and is lossless, too;
> perhaps try that...

Don't think so. I'm working on "The Girl Who Kicked the Hornet's Nest'
to be sure I process a lot of MP3s. Yesterday, SoX kept saying it
couldn't create a complete AIFF header because the file was too big.
So I cut things down until it quit whining.

It's still small, and SoX just printed out:

-rw-r--r--  1 ghe ghe 316M Sep 22 13:03 big_file.flac

> What's the exact command?

['sox', '--multi-threaded', '--combine', 'concatenate',
'flacs/1-01HornetIntro.flac', 'flacs/1-02Hornet01a.flac',
'flacs/1-03Hornet01b.flac', 'flacs/1-04Hornet01c.flac',
'flacs/1-05Hornet01d.flac', 'flacs/1-06Hornet01e.flac',
'flacs/1-07Hornet02a.flac', 'flacs/1-08Hornet02b.flac',
'flacs/1-09Hornet02c.flac', 'flacs/1-10Hornet02d.flac',
'flacs/1-11Hornet02e.flac', 'flacs/2-01Hornet02f.flac',
'flacs/2-02Hornet03a.flac', 'flacs/2-03Hornet03b.flac',
'flacs/2-04Hornet03c.flac', 'flacs/2-05Hornet03d.flac',
'flacs/2-06Hornet03e.flac', 'flacs/2-07Hornet04a.flac',
'flacs/2-08Hornet04b.flac', 'flacs/2-09Hornet04c.flac',
'flacs/2-10Hornet04d.flac', 'flacs/2-11Hornet04e.flac',
'flacs/2-12Hornet04f.flac', 'big_file.flac']

That's a Python list printed by Python from after I changed to FLAC a
few minutes ago -- that's what the 'subprocess' method wants to see.
There are no commas in the real thing. I think -- I'm a mild Python
noob too, but nothing like I am with SoX.

> Can you reproduce the problem with smaller initial AIFF source
> files?

Like I said, I've tried that.

> Instead of using the entire long list of AIFF source files, can
> you try only concatenating two of them and see if that's
> successful.  (And then move onto 3 files, and 4 files, and so
> on...)

I haven't tried that -- doing it by hand. B (file processing done)

...

FLAC works. On the first 2 files, anyway. Both uncompressed and as an
MP3. I guess the SoX developers were just kidding about the program
working with AIFF.

Thanks very much, Eric. You saved me many hours of frustration.

--
Glenn English

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Sox-users mailing list
Sox-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sox-users

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

* Re: concat problem
  2017-09-22 16:36 concat problem Glenn English
  2017-09-22 17:34 ` Eric Wong
@ 2017-09-23 12:33 ` Jan Stary
  2017-09-23 20:39   ` Eric Wong
  2017-09-26 17:24   ` Glenn English
  2017-09-27 14:42 ` Jan Stary
  2 siblings, 2 replies; 9+ messages in thread
From: Jan Stary @ 2017-09-23 12:33 UTC (permalink / raw)
  To: sox-users

On Sep 22 16:36:39, ghe2001@gmail.com wrote:
> Debian Jessie, Supermicro box, SoX 14.4.1, SoX noob.

The current version is 14.4.2

> I ask SoX to concatenate AIFFs, and Mac Air stops at the end of first file.
> I've written a Python script (first use of SoX)

If you are new to SoX, learn it by running SoX,
not by writing Python scripts.

> to concat a lot of translated MP3s into a big AIFF file.
> The translation goes fine, and
> SoX creates a huge AIFF, but there seems to be an EOF in there at the
> end of the first file. Actually a little before the end of the first
> file. The Air has been playing files (VLC) for several years with no
> problems.

What happens if you play the file with SoX's own play(1)?
What does 'play --ignore-length output.aiff' do?
What does soxi(1) say about the file?

> I give SoX a long list of AIFF source files and a destination file
> name at the end.

Concatenating AIFF files as follows works as expected for me.
Exactly what problem do you experience when you run this?
(That't an hour of concatenated aiff audio.)

$ for i in 1 2 3 4 ; do sox -n file$i.aiff synth 900 sin $(($i * 200)) ; done
$ sox file*aiff out.aiff 
$ play out.aiff 

> The MP3s have been successfully translated to AIFFs
> earlier with a format conversion pass through SoX.

How exactly did you make the conversion?
How do you know it's successfull?

$ sox file.mp3 file.aiff
$ soxi file.mp3 file.aiff
$ play file.mp3 file.aiff

Also, you can contatenate the original mp3's just as easily,
so why are you converting them to aiff first?


> > Can you play the file back with the "play(1)" command in sox on
> > Jessie?
> 
> Don't know. The 'big' computer doesn't do sound (yet), so I move the
> files around on sneaker net.

We don't know what 'big' computer is that and what a 'sneaker net' is
and how it relates to your aiff problem.

It would also be easier to do audio work
on a comupter wich has sound. Duh.

> I do know how long that first file is,
> about 7 seconds. I see what I can do to time it.

$ soxi file.aiff

> > Or try converting from AIFF back to mp3, flac, or whatever else
> > and see if the Mac can play that...
> 
> I already do that (the big uncompressed file is converted to MP3 as
> the last step), and the MP3 does the same thing: stops after 7 seconds

Why are you converting the mp3s to aiff,
then concating the aiffs to aiff, and then reconvert to mp3?
Why don't you just concat the mp3 files as they are
if that's what you eventually want to have?

> > Any chance you're hitting a file size limit somewhere?  I'm not
> > familiar with AIFF, but FLAC supports large files and is lossless, too;
> > perhaps try that...
> 
> Don't think so. I'm working on "The Girl Who Kicked the Hornet's Nest'
> to be sure I process a lot of MP3s. Yesterday, SoX kept saying it
> couldn't create a complete AIFF header because the file was too big.

In that case, the aiff outout you are creating is probably too big.
What exactly was the command line and what exactly was the error message?
Hint: script(1).

> So I cut things down until it quit whining.
> It's still small, and SoX just printed out:
> 
> -rw-r--r--  1 ghe ghe 316M Sep 22 13:03 big_file.flac

316M of flac is a lot. What exactly are you doing here and why?
Are you _concatenating_ hornet parts to create a rendition of a song?
How long is that song that it takes 316M of flac?

$ soxi big_file.flac

> > What's the exact command?
> ['sox', '--multi-threaded', '--combine', 'concatenate',
> 'flacs/1-01HornetIntro.flac', 'flacs/1-02Hornet01a.flac',
> 'flacs/1-03Hornet01b.flac', 'flacs/1-04Hornet01c.flac',
> 'flacs/1-05Hornet01d.flac', 'flacs/1-06Hornet01e.flac',
> 'flacs/1-07Hornet02a.flac', 'flacs/1-08Hornet02b.flac',
> 'flacs/1-09Hornet02c.flac', 'flacs/1-10Hornet02d.flac',
> 'flacs/1-11Hornet02e.flac', 'flacs/2-01Hornet02f.flac',
> 'flacs/2-02Hornet03a.flac', 'flacs/2-03Hornet03b.flac',
> 'flacs/2-04Hornet03c.flac', 'flacs/2-05Hornet03d.flac',
> 'flacs/2-06Hornet03e.flac', 'flacs/2-07Hornet04a.flac',
> 'flacs/2-08Hornet04b.flac', 'flacs/2-09Hornet04c.flac',
> 'flacs/2-10Hornet04d.flac', 'flacs/2-11Hornet04e.flac',
> 'flacs/2-12Hornet04f.flac', 'big_file.flac']
> 
> That's a Python list printed by Python from after I changed to FLAC a
> few minutes ago

Show us the actual sox command you have a mp3/aiff problem with,
not a Python version of something else.

> -- that's what the 'subprocess' method wants to see.

What "subprocess"?

> There are no commas in the real thing. I think -- I'm a mild Python
> noob too, but nothing like I am with SoX.

Run the actual SoX command on a command line,
don't complicate matters by bringing Python into it.

> > Can you reproduce the problem with smaller initial AIFF source
> > files?
> 
> Like I said, I've tried that.

And?

> > Instead of using the entire long list of AIFF source files, can
> > you try only concatenating two of them and see if that's
> > successful.  (And then move onto 3 files, and 4 files, and so
> > on...)
> 
> I haven't tried that -- doing it by hand. B (file processing done)

What does "B (file processing done)" mean?

> 
> FLAC works.

Meaning what? You can create a flac output that long,
as opposed to an aiff output that long?

If that's the case, I would suspect some length limit of the aiff format
- the more so if SoX complained about the aiff output being too long.

> On the first 2 files, anyway. Both uncompressed and as an MP3.

Meaning what? Show us the command line and the complete output,
using sox -V2

> I guess the SoX developers were just kidding
> about the program working with AIFF.

Coming to a mailing list for the first time with an elementary problem
and insulting the devs that they are "just kidding" about their software
(which keeps "whining" about length limits) - that's just plain rude.


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Sox-users mailing list
Sox-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sox-users

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

* Re: concat problem
  2017-09-23 12:33 ` Jan Stary
@ 2017-09-23 20:39   ` Eric Wong
  2017-09-26 17:24   ` Glenn English
  1 sibling, 0 replies; 9+ messages in thread
From: Eric Wong @ 2017-09-23 20:39 UTC (permalink / raw)
  To: sox-users

Jan Stary <hans@stare.cz> wrote:
> On Sep 22 16:36:39, ghe2001@gmail.com wrote:
> > I ask SoX to concatenate AIFFs, and Mac Air stops at the end of first file.
> > I've written a Python script (first use of SoX)
> 
> If you are new to SoX, learn it by running SoX,
> not by writing Python scripts.

I don't see how Python is too much different than Bourne shell,
and it's fairly easy to figure out (I don't know it myself,
either).  I use languages in the same space (Ruby, Perl) heavily.

> > > Can you play the file back with the "play(1)" command in sox on
> > > Jessie?
> > 
> > Don't know. The 'big' computer doesn't do sound (yet), so I move the
> > files around on sneaker net.
> 
> We don't know what 'big' computer is that and what a 'sneaker net' is
> and how it relates to your aiff problem.
> 
> It would also be easier to do audio work
> on a comupter wich has sound. Duh.

Fwiw, I use a crappy netbook to mosh/ssh/sshfs into a more
powerful workstation for audio processing when I'm on the road.

"sneakernet" is a way to transfer files via non-networked means
(USB stick, hard drives in a station wagon, etc).  `dict sneakernet'
on my system refers to entries in foldoc and jargon file.

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Sox-users mailing list
Sox-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sox-users

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

* Re: concat problem
  2017-09-23 12:33 ` Jan Stary
  2017-09-23 20:39   ` Eric Wong
@ 2017-09-26 17:24   ` Glenn English
  2017-09-27 11:38     ` Jeremy Nicoll - ml sox users
  1 sibling, 1 reply; 9+ messages in thread
From: Glenn English @ 2017-09-26 17:24 UTC (permalink / raw)
  To: sox-users

On Sat, Sep 23, 2017 at 12:33 PM, Jan Stary <hans@stare.cz> wrote:
> On Sep 22 16:36:39, ghe2001@gmail.com wrote:
>> Debian Jessie, Supermicro box, SoX 14.4.1, SoX noob.
>
> The current version is 14.4.2

Not on Debian Jessie it's not.

>> I ask SoX to concatenate AIFFs, and Mac Air stops at the end of first file.
>> I've written a Python script (first use of SoX)
>
> If you are new to SoX, learn it by running SoX,
> not by writing Python scripts.

In Python, you just create a list of the command and the options and
stuff, and it's passed to the kernel. There was only one point where
that didn't work -- the concatenation to aiff. And besides, I did try
running things by hand when there were problems.

> What happens if you play the file with SoX's own play(1)?
> What does 'play --ignore-length output.aiff' do?
> What does soxi(1) say about the file?

Dunno.

> Also, you can contatenate the original mp3's just as easily,
> so why are you converting them to aiff first?

Because there is sometimes a need for a lossless file, and I don't
trust anything to process mp3s properly. (I've run into that with
different software.)

> We don't know what 'big' computer is that and what a 'sneaker net' is
> and how it relates to your aiff problem.

The 'big computer' is a Supermicro server type -- it doesn't play music.

'Sneakernet', IIRC, is a term used at Apple back in the dark ages.
When you wanted to give a colleague some bits, you wrote them onto a
floppy and carried the floppy to where it had to go. By hand, walking
on sneakers.

And neither seemed to have anything to do with the aiff problem. Both
machines displayed the same trouble.

> It would also be easier to do audio work
> on a comupter wich has sound. Duh.\

I like to check a generating/processing program on several computers
to look for bugs. The failure was pretty obvious -- when I 'ran' the
sound file on the silent computer, it came back in a few seconds.

The noisy computer is an Apple MacBook Air running VLC. I consider it
a reliable reproducer of audio.

> $ soxi file.aiff

I don't know soxi. I'll try to become familiar with it...

> Why are you converting the mp3s to aiff,
> then concating the aiffs to aiff, and then reconvert to mp3?
> Why don't you just concat the mp3 files as they are
> if that's what you eventually want to have?

See above. And there was to be an additional step (and still is) where
the whole lossless file was normalized, equalized, and compressed.

> In that case, the aiff outout you are creating is probably too big.

No, It wasn't. I thought of that, and cut the size down to very small.
Same result.

> What exactly was the command line and what exactly was the error message?

I sent the command in a response to Eric (see below), and there was no
error message. Eric solved my last week's problem last week.

> 316M of flac is a lot. What exactly are you doing here and why?

What? I'm trying to convert audiobook CDs into a single file on a
computer disk. Last week, I was working with a collection of mp3s that
a friend of mine had already processed from CD, into a million mp3s.
This week, it's a million wav files ripped by cdparanoia from live CDs
of a Tom Clancy novel.

Why? Because I don't have a CD changer attachment on my computer. And
the Air doesn't even have a CD player.

> Are you _concatenating_ hornet parts to create a rendition of a song?
> How long is that song that it takes 316M of flac?

Like I said, the source was a reading of 'The Girl Who Kicked the
Hornet's Nest'. Big, real big. But there's plenty of space on my disk.

>> > What's the exact command?
>> ['sox', '--multi-threaded', '--combine', 'concatenate',
>> 'flacs/1-01HornetIntro.flac', 'flacs/1-02Hornet01a.flac',
>> 'flacs/1-03Hornet01b.flac', 'flacs/1-04Hornet01c.flac',
>> 'flacs/1-05Hornet01d.flac', 'flacs/1-06Hornet01e.flac',
>> 'flacs/1-07Hornet02a.flac', 'flacs/1-08Hornet02b.flac',
>> 'flacs/1-09Hornet02c.flac', 'flacs/1-10Hornet02d.flac',
>> 'flacs/1-11Hornet02e.flac', 'flacs/2-01Hornet02f.flac',
>> 'flacs/2-02Hornet03a.flac', 'flacs/2-03Hornet03b.flac',
>> 'flacs/2-04Hornet03c.flac', 'flacs/2-05Hornet03d.flac',
>> 'flacs/2-06Hornet03e.flac', 'flacs/2-07Hornet04a.flac',
>> 'flacs/2-08Hornet04b.flac', 'flacs/2-09Hornet04c.flac',
>> 'flacs/2-10Hornet04d.flac', 'flacs/2-11Hornet04e.flac',
>> 'flacs/2-12Hornet04f.flac', 'big_file.flac']

> What "subprocess"?

See Python dox. It's a class/module Python uses to interact with the kernel.

>> Like I said, I've tried that.
>
> And?

Same result.

>> FLAC works.
>
> Meaning what?

The conversion to flac and the concatenation generates a file that
plays past the first 6 or 7 seconds.

> You can create a flac output that long,
> as opposed to an aiff output that long?

Well, pretty much. The are both lossless files containing all the
data, but the flac is way shorter that the aiff. And it works.

--
Glenn English

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Sox-users mailing list
Sox-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sox-users

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

* Re: concat problem
  2017-09-26 17:24   ` Glenn English
@ 2017-09-27 11:38     ` Jeremy Nicoll - ml sox users
       [not found]       ` <CAKS_MTsMDd+_1wt5UJYp0HEDPi8hy1oswUSNNEi=v2i+xMnEMw@mail.gmail.com>
  0 siblings, 1 reply; 9+ messages in thread
From: Jeremy Nicoll - ml sox users @ 2017-09-27 11:38 UTC (permalink / raw)
  To: sox-users

On 2017-09-26 18:24, Glenn English wrote:
> On Sat, Sep 23, 2017 at 12:33 PM, Jan Stary <hans@stare.cz> wrote:
>> On Sep 22 16:36:39, ghe2001@gmail.com wrote:
>>> Debian Jessie, Supermicro box, SoX 14.4.1, SoX noob.
>> 
>> The current version is 14.4.2
> 
> Not on Debian Jessie it's not.
> 
>>> I ask SoX to concatenate AIFFs, and Mac Air stops at the end of first 
>>> file.
>>> I've written a Python script (first use of SoX)
>> 
>> If you are new to SoX, learn it by running SoX,
>> not by writing Python scripts.
> 
> In Python, you just create a list of the command and the options and
> stuff, and it's passed to the kernel.


The point is, if you post here asking for help with sox, but muddy the 
issue
by doing thing through pythin (or any other scripting language) no-one 
trying
to help you can be CERTAIN that the problem doesn't lie with your 
script.

If you issue the commands from a command prompt, anyone can exactly 
replicate
what you are doing (at least if we also had the source) and can rule out
scripts etc as a possible cause.


>> What happens if you play the file with SoX's own play(1)?
>> What does 'play --ignore-length output.aiff' do?
>> What does soxi(1) say about the file?
> 
> Dunno.

Why not?



>> What "subprocess"?
> 
> See Python dox. It's a class/module Python uses to interact with the 
> kernel.

If you're asking for help here telling us to read documentation for your 
scripting
language etc is not the way forward.

It'd be better if you spent time reading the sox documentation - so for 
example you
would then know about soxi.



-- 
Jeremy Nicoll - my opinions are my own

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Sox-users mailing list
Sox-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sox-users

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

* Re: concat problem
  2017-09-22 16:36 concat problem Glenn English
  2017-09-22 17:34 ` Eric Wong
  2017-09-23 12:33 ` Jan Stary
@ 2017-09-27 14:42 ` Jan Stary
  2 siblings, 0 replies; 9+ messages in thread
From: Jan Stary @ 2017-09-27 14:42 UTC (permalink / raw)
  To: sox-users



On Sep 26 17:24:41, ghe2001@gmail.com wrote:
> > If you are new to SoX, learn it by running SoX,
> > not by writing Python scripts.
> 
> In Python, you just create a list of the command and the options and
> stuff, and it's passed to the kernel.

Passed to your shell more likely; but the point is
nobody can be sure the problem is not in the scripting.
It brings something completely irrelevant to the original SoX problem.

> There was only one point where
> that didn't work -- the concatenation to aiff.

Yes, and that's what I'm trying to get to.

> And besides, I did try
> running things by hand when there were problems.

But you never showed us the actual sox command,
and the complete sox output. Hint again: script(1).

> > What happens if you play the file with SoX's own play(1)?
> > What does 'play --ignore-length output.aiff' do?
> > What does soxi(1) say about the file?
> 
> Dunno.

You mean, you haven't tried?
Just go run those commands.

> > It would also be easier to do audio work
> > on a comupter wich has sound. Duh.\
> 
> I like to check a generating/processing program on several computers
> to look for bugs. The failure was pretty obvious -- when I 'ran' the
> sound file on the silent computer, it came back in a few seconds.

By 'came back' you mean 'stopped playing in VLC'?
What other players have your tried then?
In particular, have you tried SoX's own 'play -V5'?
If not, do it now.

> The noisy computer is an Apple MacBook Air running VLC. I consider it
> a reliable reproducer of audio.

I'm sure it is. So run SoX's play(1) on the AIFF file you are having
a problem with (namely, it stops playing prematurely), and show us
the full and complete output of that command (play -V5 output.aiff).

> > $ soxi file.aiff
> 
> I don't know soxi. I'll try to become familiar with it...

It's mentioned in the second paragraph of the manpage.
Go read the SoX manpage.

> > In that case, the aiff outout you are creating is probably too big.
> 
> No, It wasn't.

You are contradicting yourself:

On Sep 22 19:51:20, ghe2001@gmail.com wrote:
> Yesterday, SoX kept saying it couldn't create a complete AIFF header
> because the file was too big.

On Sep 22 16:36:39, ghe2001@gmail.com wrote:
> The translation goes fine, and SoX creates a huge AIFF.

How huge? (What is the length limit of an AIFF file?)

> I thought of that, and cut the size down to very small.
> Same result.

Show us the exact command (presumably something like
"sox -V file1.aiff ... fileN.aiff output.aiff")
and the exact and full output of that command.

Upload those very small input files and the reasonably small
output file that exhibit the problem somewhere where people
can download them, and reproduce your problem,
and see what SoX actually says and does.

> > What exactly was the command line and what exactly was the error message?
> I sent the command in a response to Eric (see below),

No:

> >> > What's the exact command?
> >> ['sox', '--multi-threaded', '--combine', 'concatenate',
> >> 'flacs/1-01HornetIntro.flac', 'flacs/1-02Hornet01a.flac',
> >> 'flacs/1-03Hornet01b.flac', 'flacs/1-04Hornet01c.flac',
> >> 'flacs/1-05Hornet01d.flac', 'flacs/1-06Hornet01e.flac',
> >> 'flacs/1-07Hornet02a.flac', 'flacs/1-08Hornet02b.flac',
> >> 'flacs/1-09Hornet02c.flac', 'flacs/1-10Hornet02d.flac',
> >> 'flacs/1-11Hornet02e.flac', 'flacs/2-01Hornet02f.flac',
> >> 'flacs/2-02Hornet03a.flac', 'flacs/2-03Hornet03b.flac',
> >> 'flacs/2-04Hornet03c.flac', 'flacs/2-05Hornet03d.flac',
> >> 'flacs/2-06Hornet03e.flac', 'flacs/2-07Hornet04a.flac',
> >> 'flacs/2-08Hornet04b.flac', 'flacs/2-09Hornet04c.flac',
> >> 'flacs/2-10Hornet04d.flac', 'flacs/2-11Hornet04e.flac',
> >> 'flacs/2-12Hornet04f.flac', 'big_file.flac']

That's not the AIFF command line exhibiting your problem
(namely, the premature end of a concatenated aiff file).
That's a Python array of arguments to a different command
with different files, namely FLAC files,
where the original problem does not show.

> and there was no error message.

Yes, because this is another command with another files.
What was the error message with the AIFF files
(that sox "kept whining about" as you put it)?

> Eric solved my last week's problem last week.

It's fine that the FLAC version works for you,
but it's not an answer to the original AIFF problem.

To be clear: the issue here is not that VLC cannot play your AIFF file,
but rather (this being a SoX ML and all) that SoX creates, allegedly,
broken AIFF files; or at least broken in the sense that players
such as VLC don't play them properly. That's what I'm trying to get to
(but you're making it hard).

> > 316M of flac is a lot. What exactly are you doing here and why?
> 
> What? I'm trying to convert audiobook CDs into a single file on a
> computer disk. [...] > The source was a reading of
> 'The Girl Who Kicked the Hornet's Nest'. Big, real big.

Sorry for the confusion. I thought 'The Girl Who Kicked the Hornet's Nest'
is a song you are recording and confused the "Hornet1.flac" with
parts of a musical instrument. Please excuse my English (not native).
Being a reading of an audio book, the size makes sense.

> > What "subprocess"?
> See Python dox. It's a class/module Python uses to interact with the kernel.

No, I'm not gonna see python dox to get to the bottom of an AIFF
problem, because it has nothing to do with it. Isolate the problem
to SoX itself; don't complicate it by running the entire thing
in a Python script (or anything like that, for that matter).

> > You can create a flac output that long,
> > as opposed to an aiff output that long?
> 
> Well, pretty much. The are both lossless files containing all the
> data, but the flac is way shorter that the aiff. And it works.

Good. Now please exhibit in full detail the AIFF version
which does _not_ work (in VLC).

Then please run this command (it's all typed out for you)
and quote the output in full, to see what concatenation
of audio into a long aiff actually does on your system:

> Concatenating AIFF files as follows works as expected for me.
> Exactly what problem do you experience when you run this?
> (That't an hour of concatenated aiff audio.)
> 
> for i in 1 2 3 4 ; do sox -n file$i.aiff synth 900 sin $(($i * 200)) ; done
> sox -V5 file*aiff out.aiff 
> soxi out.aiff 
> play -V5 out.aiff 

Does the concatenated file stop playing after ~900s in VLC?
Does it play correctly in other players, play(1) in particular?

	Jan


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Sox-users mailing list
Sox-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sox-users

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

* Re: concat problem
       [not found]       ` <CAKS_MTsMDd+_1wt5UJYp0HEDPi8hy1oswUSNNEi=v2i+xMnEMw@mail.gmail.com>
@ 2017-09-28 15:00         ` Glenn English
  0 siblings, 0 replies; 9+ messages in thread
From: Glenn English @ 2017-09-28 15:00 UTC (permalink / raw)
  To: sox-users

Yesterday, I tried to send this reply to Jeremy. Google sent me email
that looked very much like a bounce notice. But it's in my list of
sent mail. If you see this twice, I apologize.

On Wed, Sep 27, 2017 at 5:31 PM, Glenn English <ghe2001@gmail.com> wrote:
> On Wed, Sep 27, 2017 at 11:38 AM, Jeremy Nicoll - ml sox users
> <jn.ml.sxu.88@wingsandbeaks.org.uk> wrote:
>
>> The point is, if you post here asking for help with sox, but muddy the issue
>> by doing thing through pythin (or any other scripting language) no-one
>> trying
>> to help you can be CERTAIN that the problem doesn't lie with your script.
>
> Good point, well taken. I was certain of my script because all the
> other sox commands worked just fine. But it surely could have been
> something I was doing wrong.
>
> OTOH, the command worked, in this case, after just replacing 'aiff' with 'flac.'
>
>> Why not?
>
> At that point, I'd never heard of soxi. All I had was an edited
> explanation of some the sox commands, the ones that were pertinent to
> the project at hand. I'd spent quite a while futzing with things and
> reading documentation, and was completely at a loss. Sox wasn't acting
> like it was said to in the documentation.
>
> Sox is a very impressive piece of software, and apart from that one
> oopsie, which I still don't understand but am very willing to write
> around, it's been a delight to work with.
>
> Actually, replacing the aiff files with flacs has saved me a lot of
> disk space :-) I look out for those things because I'm of the
> generation where a microsecond was pretty speedy, and a 300 MB disk
> was the size of a small refrigerator...

--
Glenn English

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Sox-users mailing list
Sox-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sox-users

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

end of thread, other threads:[~2017-10-01 14:39 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-09-22 16:36 concat problem Glenn English
2017-09-22 17:34 ` Eric Wong
2017-09-22 19:51   ` Glenn English
2017-09-23 12:33 ` Jan Stary
2017-09-23 20:39   ` Eric Wong
2017-09-26 17:24   ` Glenn English
2017-09-27 11:38     ` Jeremy Nicoll - ml sox users
     [not found]       ` <CAKS_MTsMDd+_1wt5UJYp0HEDPi8hy1oswUSNNEi=v2i+xMnEMw@mail.gmail.com>
2017-09-28 15:00         ` Glenn English
2017-09-27 14:42 ` 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).