sox-users@lists.sourceforge.net unofficial mirror
 help / color / mirror / code / Atom feed
* convert wav to ogg twice produces diffrent binary files
@ 2017-10-14 16:16 Dennis Muratshin
  2017-10-15 18:52 ` Måns Rullgård
  0 siblings, 1 reply; 4+ messages in thread
From: Dennis Muratshin @ 2017-10-14 16:16 UTC (permalink / raw)
  To: sox-users

for example run these commands:

sox.exe src.wav dest1.ogg -G rate 44100
sox.exe src.wav dest2.ogg -G rate 44100

It will produce two files with small difference between them: 
http://prntscr.com/gxdifd
Is there any way to avoid it?


------------------------------------------------------------------------------
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] 4+ messages in thread

* Re: convert wav to ogg twice produces diffrent binary files
  2017-10-14 16:16 convert wav to ogg twice produces diffrent binary files Dennis Muratshin
@ 2017-10-15 18:52 ` Måns Rullgård
  2017-10-15 20:44   ` Jeremy Nicoll - ml sox users
  2017-10-16 13:54   ` Dennis Muratshin
  0 siblings, 2 replies; 4+ messages in thread
From: Måns Rullgård @ 2017-10-15 18:52 UTC (permalink / raw)
  To: Dennis Muratshin; +Cc: sox-users

Dennis Muratshin <frankinshtein85@gmail.com> writes:

> for example run these commands:
>
> sox.exe src.wav dest1.ogg -G rate 44100
> sox.exe src.wav dest2.ogg -G rate 44100
>
> It will produce two files with small difference between them:
> http://prntscr.com/gxdifd
> Is there any way to avoid it?

It could be due to dither.  Try the -R option to use a fixed seed for
the random number generator.

-- 
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
Sox-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sox-users

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

* Re: convert wav to ogg twice produces diffrent binary files
  2017-10-15 18:52 ` Måns Rullgård
@ 2017-10-15 20:44   ` Jeremy Nicoll - ml sox users
  2017-10-16 13:54   ` Dennis Muratshin
  1 sibling, 0 replies; 4+ messages in thread
From: Jeremy Nicoll - ml sox users @ 2017-10-15 20:44 UTC (permalink / raw)
  To: sox-users

On 2017-10-15 19:52, Måns Rullgård wrote:
> Dennis Muratshin <frankinshtein85@gmail.com> writes:
> 
>> for example run these commands:
>> 
>> sox.exe src.wav dest1.ogg -G rate 44100
>> sox.exe src.wav dest2.ogg -G rate 44100
>> 
>> It will produce two files with small difference between them:
>> http://prntscr.com/gxdifd
>> Is there any way to avoid it?
> 
> It could be due to dither.  Try the -R option to use a fixed seed for
> the random number generator.

It's hard to tell from the screenshot how big the files are... but they
look as if they might be tiny.  The line 1 difference might I guess be
a date/time stamp, if the file format allows that.

Then ... do we have just one or two 'frames' (if that's an appropriate
term) of audio?  Might they also have a date/time stamp in them?

I'd have thought a dither difference would affect many bytes in the 
audio
stream, but then again maybe that depends on what the audio in the file
actually is - silence, test tones, real music?

-- 
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] 4+ messages in thread

* Re: convert wav to ogg twice produces diffrent binary files
  2017-10-15 18:52 ` Måns Rullgård
  2017-10-15 20:44   ` Jeremy Nicoll - ml sox users
@ 2017-10-16 13:54   ` Dennis Muratshin
  1 sibling, 0 replies; 4+ messages in thread
From: Dennis Muratshin @ 2017-10-16 13:54 UTC (permalink / raw)
  To: Måns Rullgård; +Cc: sox-users

Thank you! '-R' option helped. Now files are identical:

sox -R src.wav dest1.ogg -G rate 44100
sox -R src.wav dest1.ogg -G rate 44100


15.10.2017 23:52, Måns Rullgård пишет:
> Dennis Muratshin <frankinshtein85@gmail.com> writes:
>
>> for example run these commands:
>>
>> sox.exe src.wav dest1.ogg -G rate 44100
>> sox.exe src.wav dest2.ogg -G rate 44100
>>
>> It will produce two files with small difference between them:
>> http://prntscr.com/gxdifd
>> Is there any way to avoid it?
> It could be due to dither.  Try the -R option to use a fixed seed for
> the random number generator.
>


------------------------------------------------------------------------------
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] 4+ messages in thread

end of thread, other threads:[~2017-10-16 13:54 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-10-14 16:16 convert wav to ogg twice produces diffrent binary files Dennis Muratshin
2017-10-15 18:52 ` Måns Rullgård
2017-10-15 20:44   ` Jeremy Nicoll - ml sox users
2017-10-16 13:54   ` Dennis Muratshin

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