Discussion:
[SoX-users] Sox Truncating MP3
Mark Sweeney
2017-06-10 05:04:06 UTC
Permalink
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.
Graff, David E
2017-06-10 16:22:59 UTC
Permalink
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 <***@gmail.com>
Sent: Saturday, June 10, 2017 1:04:06 AM
To: sox-***@lists.sourceforge.net
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.
Mark Sweeney
2017-06-14 21:20:41 UTC
Permalink
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.
Post by Graff, David E
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
------------------------------
*Sent:* Saturday, June 10, 2017 1:04:06 AM
*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
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
https://lists.sourceforge.net/lists/listinfo/sox-users
Jan Stary
2017-06-29 10:07:22 UTC
Permalink
Post by 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.
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
Post by Mark Sweeney
------------------------------------------------------------------------------
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
https://lists.sourceforge.net/lists/listinfo/sox-users
Måns Rullgård
2017-06-29 10:59:42 UTC
Permalink
Post by Jan Stary
Post by 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.
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
Jan Stary
2017-06-29 11:20:58 UTC
Permalink
Post by Måns Rullgård
Post by Jan Stary
Post by 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.
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

Loading...