Sox Truncating MP3

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Sox Truncating MP3

Mark Sweeney
I used Sox to process an MP3 file, but the output file was truncated.
At first I thought the problem was with the command or options, but
after removing all options and using Sox just to do a copy, the output
file was still truncated.

So I ran the same file through ffmpeg.  It processed the entire file
even though there was a warning about invalid data found in the input
file.

Can I force Sox to finish processing this file without truncating?  If
not, can I have Sox output a message so I that I know there was a
problem?  Currently it just fails silently.

------------------------------------------------------------------------------
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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/sox-users
Reply | Threaded
Open this post in threaded view
|

Re: Sox Truncating MP3

Dave Graff

If you want to do something sox-ish with uncompressed mp3 data, despite knowing that some of the data is faulty, why not just use ffmpeg to get (faulty) uncompressed output, and then run sox on that output?


  Dave Graff


From: Mark Sweeney <[hidden email]>
Sent: Saturday, June 10, 2017 1:04:06 AM
To: [hidden email]
Subject: [SoX-users] Sox Truncating MP3
 
I used Sox to process an MP3 file, but the output file was truncated.
At first I thought the problem was with the command or options, but
after removing all options and using Sox just to do a copy, the output
file was still truncated.

So I ran the same file through ffmpeg.  It processed the entire file
even though there was a warning about invalid data found in the input
file.

Can I force Sox to finish processing this file without truncating?  If
not, can I have Sox output a message so I that I know there was a
problem?  Currently it just fails silently.

------------------------------------------------------------------------------
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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/sox-users

------------------------------------------------------------------------------
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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/sox-users
Reply | Threaded
Open this post in threaded view
|

Re: Sox Truncating MP3

Mark Sweeney
I would prefer to use one application because the file is alreadly loaded in Sox.  And more importantly if data is getting thrown away in Sox I want to see something in the output to warn me.  If I run the file through ffmpeg and then Sox afterwards, how do I know that Sox didn't throw something away if the output from ffmpeg was bad?

If Sox can't handle the file at the least Sox should output a warning.

On Sat, Jun 10, 2017 at 9:22 AM, Graff, David E <[hidden email]> wrote:

If you want to do something sox-ish with uncompressed mp3 data, despite knowing that some of the data is faulty, why not just use ffmpeg to get (faulty) uncompressed output, and then run sox on that output?


  Dave Graff


From: Mark Sweeney <[hidden email]>
Sent: Saturday, June 10, 2017 1:04:06 AM
To: [hidden email]
Subject: [SoX-users] Sox Truncating MP3
 
I used Sox to process an MP3 file, but the output file was truncated.
At first I thought the problem was with the command or options, but
after removing all options and using Sox just to do a copy, the output
file was still truncated.

So I ran the same file through ffmpeg.  It processed the entire file
even though there was a warning about invalid data found in the input
file.

Can I force Sox to finish processing this file without truncating?  If
not, can I have Sox output a message so I that I know there was a
problem?  Currently it just fails silently.

------------------------------------------------------------------------------
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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/sox-users

------------------------------------------------------------------------------
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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/sox-users



------------------------------------------------------------------------------
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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/sox-users
Reply | Threaded
Open this post in threaded view
|

Re: Sox Truncating MP3

Jan Stary
In reply to this post by Mark Sweeney
On Jun 09 22:04:06, [hidden email] wrote:

> I used Sox to process an MP3 file, but the output file was truncated.
> At first I thought the problem was with the command or options, but
> after removing all options and using Sox just to do a copy, the output
> file was still truncated.
>
> So I ran the same file through ffmpeg.  It processed the entire file
> even though there was a warning about invalid data found in the input
> file.
>
> Can I force Sox to finish processing this file without truncating?  If
> not, can I have Sox output a message so I that I know there was a
> problem?  Currently it just fails silently.

Without seeing the command and the original file, I can only guess,
but I have seen this situation when the length header was wrong
in the original MP3 file. I believe SoX stops processing the file
at the given length even though the data continues. This can be
overriden with --ignore-length

        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
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/sox-users

------------------------------------------------------------------------------
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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/sox-users
Reply | Threaded
Open this post in threaded view
|

Re: Sox Truncating MP3

Måns Rullgård
Jan Stary <[hidden email]> writes:

> On Jun 09 22:04:06, [hidden email] wrote:
>> I used Sox to process an MP3 file, but the output file was truncated.
>> At first I thought the problem was with the command or options, but
>> after removing all options and using Sox just to do a copy, the output
>> file was still truncated.
>>
>> So I ran the same file through ffmpeg.  It processed the entire file
>> even though there was a warning about invalid data found in the input
>> file.
>>
>> Can I force Sox to finish processing this file without truncating?  If
>> not, can I have Sox output a message so I that I know there was a
>> problem?  Currently it just fails silently.
>
> Without seeing the command and the original file, I can only guess,
> but I have seen this situation when the length header was wrong
> in the original MP3 file. I believe SoX stops processing the file
> at the given length even though the data continues. This can be
> overriden with --ignore-length

MP3 files don't have a length header, or any other header.

--
Måns Rullgård

------------------------------------------------------------------------------
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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/sox-users
Reply | Threaded
Open this post in threaded view
|

Re: Sox Truncating MP3

Jan Stary
On Jun 29 11:59:42, [hidden email] wrote:

> Jan Stary <[hidden email]> writes:
>
> > On Jun 09 22:04:06, [hidden email] wrote:
> >> I used Sox to process an MP3 file, but the output file was truncated.
> >> At first I thought the problem was with the command or options, but
> >> after removing all options and using Sox just to do a copy, the output
> >> file was still truncated.
> >>
> >> So I ran the same file through ffmpeg.  It processed the entire file
> >> even though there was a warning about invalid data found in the input
> >> file.
> >>
> >> Can I force Sox to finish processing this file without truncating?  If
> >> not, can I have Sox output a message so I that I know there was a
> >> problem?  Currently it just fails silently.
> >
> > Without seeing the command and the original file, I can only guess,
> > but I have seen this situation when the length header was wrong
> > in the original MP3 file. I believe SoX stops processing the file
> > at the given length even though the data continues. This can be
> > overriden with --ignore-length
>
> MP3 files don't have a length header, or any other header.

My must have been a different format then; sorry for the confusion.

If your (OP) file (mp3) is not too big or sensitive,
can you put it somewhere for download and show us the command
that truncated it for you?

        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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/sox-users