IPB

Welcome Guest ( Log In | Register )

2 Pages V  < 1 2  
Reply to this topicStart new topic
Detecting whether a 24-bit file has been upconverted from 16-bit?
Arnold B. Kruege...
post Nov 9 2012, 16:01
Post #26





Group: Members
Posts: 3537
Joined: 29-October 08
From: USA, 48236
Member No.: 61311



QUOTE (vincefalks @ Nov 5 2012, 23:50) *
I downloaded a FLAC album from online web store and it appears that the files I've downloaded are 24-bit. it's not a hd web store like hdtracks, it's generally a CD 16-bit 44.1kHz store with either FLAC or MP3 to choose from in its offerings.

I'm wondering whether the 24-bit files are real and were supplied as 24-bit from the label and they just didn't label it correctly on the download page, or whether there was an encoding error or just somehow it made its way from 16-bit files to 24-bit FLACs.

Is there a way I can definitively tell or analyze it (looking at spectral maybe) to see if it's been upconverted? Are there certain algorithms and 'good jobs' that can be done to make its 16->24 upconversion undetectable?


Many of the actual upconversions are going to be pretty hard to determine by simple means. For example it is pretty well known that about half of all so-called HD tracks started out as analog tapes or non-CD digital recordings that either came from or passed through the analog domain during the transcription process.

Catching only the clerical errors and obvious transcription errors is only a partial solution.
Go to the top of the page
+Quote Post
Sparktank
post Apr 13 2013, 01:47
Post #27





Group: Members
Posts: 16
Joined: 31-July 12
Member No.: 101901



QUOTE (nu774 @ Nov 6 2012, 06:31) *
CODE
flac -ac foo.flac | findstr wasted_bits (for windows)


QUOTE (skamp @ Nov 6 2012, 04:06) *
fbits:
CODE
#!/bin/bash

me="${0##*/}"

if [ -w "$TMPDIR" ]; then
tdir="$TMPDIR"
elif [ -w '/tmp' ]; then
tdir='/tmp'
elif [ -w "$HOME" ]; then
tdir="$HOME"
elif [ -w "$PWD" ]; then
tdir="$PWD"
else
echo "$me: error: can't find a writable directory for creating the temporary file" 1>&2 ; exit 1
fi

tf="$( TMPDIR="$tdir" mktemp "${tdir}/${me}.XXXX" 2>/dev/null )"
if [ -z "$tf" ]; then
echo "$me: error: can't create temporary file" 1>&2 ; exit 1
fi

checkbits ()
{
local bps abps tbps=0 n=0
bps="$( metaflac --show-bps "$1" )"
flac -ac "$1" 2>/dev/null | fgrep 'wasted_bits' | cut -d '=' -f 3 | cut -f 1 > "$tf"
while read wb; do
tbps=$(( tbps + ( bps - wb ) ))
((n++))
done < "$tf"
abps=$(( ( ( tbps * 10 / n) + 5 ) / 10 )) # (* 10 + 5) / 10 for proper rounding
printf "%2u/%2u bits\t%s\n" "$abps" "$bps" "$1"
}

for f in "$@"; do
case "$f" in
*.flac) checkbits "$f" ;;
*) continue ;;
esac
done

rm -f "$tf"


Usage:
CODE
fbits *.flac


Can anyone convert that Unix BASH script for Windows BATCH script?
I don't want to install anything more, I've got so much installed already.

Windows 7 (x64) and Windows XP (x86) user.

Using what nu774 provided gives me over 4,000 lines of text.
It would be more convenient to have summarized results in a printed text file.

Thanks for any help.

PS: I've ready looked at a few threads where people were trying, miserably, to install software to use BASH scripts on a Windows environment.
Those threads didn't seem entirely successful and were incomplete in instructions.
Go to the top of the page
+Quote Post
skamp
post Apr 13 2013, 07:41
Post #28





Group: Developer
Posts: 1343
Joined: 4-May 04
From: France
Member No.: 13875



Maybe Greynol can help?


--------------------
caudec.net
Go to the top of the page
+Quote Post
Case
post Apr 13 2013, 09:39
Post #29





Group: Developer (Donating)
Posts: 2137
Joined: 19-October 01
From: Finland
Member No.: 322



Here's a quick Windows .cmd script trying to do the same thing: Attached File  fbits.zip ( 601bytes ) Number of downloads: 97
Go to the top of the page
+Quote Post
Sparktank
post Apr 13 2013, 09:59
Post #30





Group: Members
Posts: 16
Joined: 31-July 12
Member No.: 101901



QUOTE (Case @ Apr 13 2013, 01:39) *
Here's a quick Windows .cmd script trying to do the same thing: Attached File  fbits.zip ( 601bytes ) Number of downloads: 97


Thank you! But it's hard to figure out why it's not working.
I've replaced the only isntance of the program call with the filepath of the actual program.

It just opens and then closes right away.


--------------------
I like to use "[i]HD audio[/i]" in PaulStretch. "HD audio", lol.
Go to the top of the page
+Quote Post
Case
post Apr 13 2013, 10:11
Post #31





Group: Developer (Donating)
Posts: 2137
Joined: 19-October 01
From: Finland
Member No.: 322



It's meant to be used from command prompt when flac.exe and metaflac.exe are in search path. You can add "pause" command as the last line and then you can drag and drop .flac files over it. For drag and drop use it's enough to have flac.exe and metaflac.exe in the same dir as the .cmd file.

This post has been edited by Case: Apr 13 2013, 10:11
Go to the top of the page
+Quote Post
mjb2006
post Apr 13 2013, 10:40
Post #32





Group: Members
Posts: 707
Joined: 12-May 06
From: Colorado, USA
Member No.: 30694



Thanks for the .cmd version.

I suggest modifying it to use flac -acs rather than flac -ac, so you don't get the copyright/warranty/license header after every file it processes. (Maybe this varies by flac build?)
Go to the top of the page
+Quote Post
Arnold B. Kruege...
post Apr 13 2013, 16:12
Post #33





Group: Members
Posts: 3537
Joined: 29-October 08
From: USA, 48236
Member No.: 61311



QUOTE (vincefalks @ Nov 6 2012, 00:50) *
I downloaded a FLAC album from online web store and it appears that the files I've downloaded are 24-bit. it's not a hd web store like hdtracks, it's generally a CD 16-bit 44.1kHz store with either FLAC or MP3 to choose from in its offerings.

I'm wondering whether the 24-bit files are real and were supplied as 24-bit from the label and they just didn't label it correctly on the download page, or whether there was an encoding error or just somehow it made its way from 16-bit files to 24-bit FLACs.

Is there a way I can definitively tell or analyze it (looking at spectral maybe) to see if it's been upconverted? Are there certain algorithms and 'good jobs' that can be done to make its 16->24 upconversion undetectable?


It all depends on how the file was upconverted.

If a schlock job was done, and the file was converted from 16 to 24 by simply padding with zeroes, then that would be detectable by obvious means.

If a good job was done with a properly dithered conversion, then I don't know of a reliable numerical test for that.

I'd like to see people explain why their code fragments should be reliable, and then demonstrate that their code fragments are reliable detectors of upsampling if the file was upsampled correctly.
Go to the top of the page
+Quote Post
greynol
post Apr 13 2013, 16:18
Post #34





Group: Super Moderator
Posts: 10000
Joined: 1-April 04
From: San Francisco
Member No.: 13167



I don't see the point in adding dither when increasing the bit-depth.


--------------------
Your eyes cannot hear.
Go to the top of the page
+Quote Post
skamp
post Apr 13 2013, 17:28
Post #35





Group: Developer
Posts: 1343
Joined: 4-May 04
From: France
Member No.: 13875



QUOTE (Arnold B. Krueger @ Apr 13 2013, 17:12) *
I'd like to see people explain why their code fragments should be reliable, and then demonstrate that their code fragments are reliable detectors of upsampling if the file was upsampled correctly.


Is that directed at me? I make no such claim.


--------------------
caudec.net
Go to the top of the page
+Quote Post
Arnold B. Kruege...
post Apr 13 2013, 22:22
Post #36





Group: Members
Posts: 3537
Joined: 29-October 08
From: USA, 48236
Member No.: 61311



QUOTE (greynol @ Apr 13 2013, 11:18) *
I don't see the point in adding dither when increasing the bit-depth.


Cover up. Keep it from being easy to detect your trickery.
Go to the top of the page
+Quote Post
BearcatSandor
post Apr 14 2013, 01:00
Post #37





Group: Members
Posts: 147
Joined: 18-May 10
From: Montana, USA
Member No.: 80732



Anyone know how to adjust Skamp's script to work with wavpack files (hybrid in my case)? Wvunpack -ss doesn't seem to supply the needed information

Thanks


--------------------
Music lover and recovering high end audiophile
Go to the top of the page
+Quote Post
Kees de Visser
post Apr 14 2013, 15:23
Post #38





Group: Members
Posts: 617
Joined: 22-May 05
From: France
Member No.: 22220



QUOTE (Arnold B. Krueger @ Apr 13 2013, 22:22) *
QUOTE (greynol @ Apr 13 2013, 11:18) *
I don't see the point in adding dither when increasing the bit-depth.
Cover up. Keep it from being easy to detect your trickery.
I suppose you mean: make bits 17-24 active because them being static zeros would reveal that they are not part of the original signal.
To make sure all 8 bits are effected, a tiny bit of DSP (e.g. a level change of -0.01dB) would be more effective IME since dither might not toggle all 8 bits.
Go to the top of the page
+Quote Post
MikeFord
post Apr 16 2013, 21:11
Post #39





Group: Members
Posts: 132
Joined: 22-May 04
Member No.: 14241



How would this technique rate a file consisting of a single loud piano note every few seconds with some softly spoken voice?

How do different masterings come out, something lower level vs the loud nonoise version?
Go to the top of the page
+Quote Post

2 Pages V  < 1 2
Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 21st April 2014 - 12:27