sox-users@lists.sourceforge.net unofficial mirror
 help / color / mirror / code / Atom feed
From: Jeremy Nicoll - ml sox users <jn.ml.sxu.88@wingsandbeaks.org.uk>
To: sox-users@lists.sourceforge.net
Subject: Re: discrepancy between sox and ffmpeg when extracting parts of flac file
Date: Sat, 25 Feb 2023 16:20:44 +0000	[thread overview]
Message-ID: <a6bf2a8f3f1e3daadbbe84bdbf688b2e@wingsandbeaks.org.uk> (raw)
In-Reply-To: <hgm5uo9_nUsgeNNOPQHlRL9QtMXTlPuUfGrDHiY9b0zUNx25npm9dxZXrjxeZJTp_atcEebIvsO8yFc6hGbCyWBNjWqDSLdu_b3JUkKZd2c=@protonmail.com>

On 2023-02-25 13:32, Jürgen Koslowski via Sox-users wrote:
> I have a large flac file (24bits 96kHz) A.flac containing several
> songs. I can extract those
> bei using either sox (B.flac) or ffmpeg (C.flac) with the same 
> splitting points:
> 
> sox T04.flac B.flac trim 22:26.342 =34:41.708
> ffmpeg -i T04.flac -ss 22:26.342 -to 34:41.708 -compression_level 12
> -c copy C.flac
> 
> Unfortunately, the results seem to differ in important aspects:
> 
> - C.flac that is larger (despite using "-compression_level 12")

How much larger?  And do you mean file size, or number of samples (or 
both)?

What happens if you don't use the compression option for C?


What's the full output from both 'stat' & 'stats' for all the files 
concerned?


> - soxi C.flac as well as ffprobe C.flac shows the wrong lengh, namely
> the length of A.flac

You didn't process A.flac though, but instead T04.flac.  Was it actually
identical to A.flac?  Are you certain of that?



> - dr14_tmeter shows different dynamic range values for B.flac
> (smaller) and C.flac (larger):

That's in itself not necessarily unexpected if the two files contained
different amounts of music.

Also, does the compression you used on one of these files just affect
its size in bytes, or does it also (perhaps minutely) change the sound?


> What is going on here? Are there additional parameters in sox that can
> fix this?

Dunno.  Which version of sox, ffmpeg etc, and on what platform?



-- 
Jeremy Nicoll - my opinions are my own


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

  reply	other threads:[~2023-02-25 17:06 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-25 13:32 discrepancy between sox and ffmpeg when extracting parts of flac file Jürgen Koslowski via Sox-users
2023-02-25 16:20 ` Jeremy Nicoll - ml sox users [this message]
2023-02-25 22:33   ` Jürgen Koslowski via Sox-users
2023-02-26  0:37 ` Jan Stary

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://lists.sourceforge.net/lists/listinfo/sox-users

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=a6bf2a8f3f1e3daadbbe84bdbf688b2e@wingsandbeaks.org.uk \
    --to=sox-users@lists.sourceforge.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).