IPB

Welcome Guest ( Log In | Register )

2 Pages V   1 2 >  
Reply to this topicStart new topic
Command line tool to detect gapless album, does something like this exist?
n0v!ze
post Jan 22 2014, 09:03
Post #1





Group: Members
Posts: 31
Joined: 9-June 07
Member No.: 44197



All my CDs are ripped with EAC. First I do gap detection, then rip as Image+Cue, convert to FLAC. I'd like to know if a command line tool or script exists that takes the cue file as input and tells me, for example by exit code, if the album has two or more tracks with no silence inbetween (gap length 0).

Basically, I'm looking for a method to detect gapless albums without human intervention, just by automatically examining the cue sheet, that can be used in a script-based transcoding process.
Go to the top of the page
+Quote Post
Juha
post Jan 22 2014, 10:54
Post #2





Group: Members
Posts: 442
Joined: 14-February 07
From: EU-FIN
Member No.: 40610



If the info text in cue file is formatted always the same then doesn't windows explorer's Search tool return those files which has the string you put in the search box?
Go to the top of the page
+Quote Post
n0v!ze
post Jan 23 2014, 14:34
Post #3





Group: Members
Posts: 31
Joined: 9-June 07
Member No.: 44197



QUOTE (Juha @ Jan 22 2014, 10:54) *
If the info text in cue file is formatted always the same then doesn't windows explorer's Search tool return those files which has the string you put in the search box?

Sure, I could also use grep within the console window. But what is the search string?
Go to the top of the page
+Quote Post
Juha
post Jan 23 2014, 16:23
Post #4





Group: Members
Posts: 442
Joined: 14-February 07
From: EU-FIN
Member No.: 40610



QUOTE (n0v!ze @ Jan 23 2014, 17:34) *
QUOTE (Juha @ Jan 22 2014, 10:54) *
If the info text in cue file is formatted always the same then doesn't windows explorer's Search tool return those files which has the string you put in the search box?
Sure, I could also use grep within the console window. But what is the search string?


I don't know (I've never used EAC) ... maybe the string is "Pre-gap length 0:00:00.00" ... so maybe "0:00.0" could be the searhed string?


You have all the tools there, just make sucha log least one entry has cap length 0 and then look how it's presented in log.

This post has been edited by Juha: Jan 23 2014, 16:26
Go to the top of the page
+Quote Post
greynol
post Jan 23 2014, 17:38
Post #5





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



This discussion seems to assume that data indexed by 00 is necessarily silent. It also seems to assume that silence between tracks will always be indexed by 00.

These assumptions are false.

This post has been edited by greynol: Jan 23 2014, 18:58


--------------------
Placebophiles: put up or shut up!
Go to the top of the page
+Quote Post
mjb2006
post Jan 23 2014, 17:57
Post #6





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



The only way to know if the gap/index-00 portions of the audio are silent is to test the audio; the cue sheet, by design, holds the CD's non-audio info.

QUOTE (n0v!ze @ Jan 22 2014, 01:03) *
All my CDs are ripped with EAC. First I do gap detection


Since gap detection happens automatically when generating a cue sheet, the only reasons you would do it before the rip are:
  • You are checking to see if gap detection settings are good (not producing weird values) for this drive+CD combo before generating the cue sheet
  • You want gap info to be written to the log, even though it's also going into the cue sheet
  • You enjoy seeing gap info in the main window
  • You blindly follow ripping guides posted on illicit file sharing sites, without understanding what you are doing


Go to the top of the page
+Quote Post
greynol
post Jan 23 2014, 19:16
Post #7





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



I wonder if this lack of gapless playback problem can't be solved by choosing a capable player and/or encoder.


--------------------
Placebophiles: put up or shut up!
Go to the top of the page
+Quote Post
n0v!ze
post Jan 23 2014, 19:26
Post #8





Group: Members
Posts: 31
Joined: 9-June 07
Member No.: 44197



QUOTE (greynol @ Jan 23 2014, 19:16) *
I wonder if this lack of gapless playback problem can't be solved by choosing a capable player and/or encoder.

If you (or anybody else) is aware of a 2-DIN car receiver with USB input and gapless MP3 playback, please let me know. I really searched hard and did not find a single one.

The reason why I would like to have a command line tool to detect gapless albums is that I want to keep the MP3 image then (and only then), and not just the files splitted from it using pcutmp3.
Go to the top of the page
+Quote Post
n0v!ze
post Jan 23 2014, 19:31
Post #9





Group: Members
Posts: 31
Joined: 9-June 07
Member No.: 44197



QUOTE (mjb2006 @ Jan 23 2014, 17:57) *
[*]You enjoy seeing gap info in the main window

Bingo. So, is it a misunderstanding on my side that a gap of 0s displayed in EAC means gapless?
Go to the top of the page
+Quote Post
greynol
post Jan 23 2014, 19:40
Post #10





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



I told you as much already. wink.gif

This post has been edited by greynol: Jan 23 2014, 22:09


--------------------
Placebophiles: put up or shut up!
Go to the top of the page
+Quote Post
n0v!ze
post Jan 24 2014, 06:24
Post #11





Group: Members
Posts: 31
Joined: 9-June 07
Member No.: 44197



Just to get it right: Are you saying that the length of the gap is meaningless and even a zero length gap could actually contain audio? That sounds so weird--I'd assume that zero length always means null data, neither audio nor anything else.
Go to the top of the page
+Quote Post
greynol
post Jan 24 2014, 17:09
Post #12





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



Gaps (also called pregaps or pre-gaps) are nothing more than audio data that is enumerated with a 00 index. This data may or may not contain silence. Discs with silence between tracks will not necessarily have this silence indexed as 00.

You need to divorce whatever idea you have that these "gaps" must always have something to do with gapless playback.

The only time you will know for sure that 00 indices contain silence is with CD-R/RWs that were burned as track-at-once, where the burning program places two seconds of silence between tracks. If there was silence at the ends of the source tracks then the silence written during the TAO process is additional. Either way, the 00 indices on a TAO disc will only mark the two seconds of silence created during burning.

This post has been edited by greynol: Jan 24 2014, 17:22


--------------------
Placebophiles: put up or shut up!
Go to the top of the page
+Quote Post
johnlgalt
post Jan 24 2014, 17:54
Post #13





Group: Members
Posts: 20
Joined: 10-January 14
Member No.: 113919



QUOTE (greynol @ Jan 24 2014, 11:09) *
Gaps (also called pregaps or pre-gaps) are nothing more than audio data that is enumerated with a 00 index. This data may or may not contain silence. Discs with silence between tracks will not necessarily have this silence indexed as 00.

You need to divorce whatever idea you have that these "gaps" must always have something to do with gapless playback.

The only time you will know for sure that 00 indices contain silence is with CD-R/RWs that were burned as track-at-once, where the burning program places two seconds of silence between tracks. If there was silence at the ends of the source tracks then the silence written during the TAO process is additional. Either way, the 00 indices on a TAO disc will only mark the two seconds of silence created during burning.


Great explanation. Thank you!
Go to the top of the page
+Quote Post
n0v!ze
post Jan 25 2014, 16:57
Post #14





Group: Members
Posts: 31
Joined: 9-June 07
Member No.: 44197



Thank you. It looks my initial assumption that "gapless is equivalent to gaps with length 0" is false. Do I get your explanations right that such a tool that I am asking for would first need to consult the cue sheet to identify start and end time (or frame, respectively) of all gaps and then would have to analyze the audio in these areas if they really contain silence?
Go to the top of the page
+Quote Post
greynol
post Jan 25 2014, 17:04
Post #15





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



I give up.


--------------------
Placebophiles: put up or shut up!
Go to the top of the page
+Quote Post
mjb2006
post Jan 25 2014, 17:52
Post #16





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



The short answer is yes, to detect whether there are pauses in the audio, you have to analyze the audio. If you want to restrict where you look to just the sections that your ripper detected as being designated index 00 in the disc's subcode, that's your prerogative. There are plenty of CDs that have no index 00 portions but that do have pauses between songs. You also have to decide what "silence" is, and how much of it needs to be present. Pauses can be very quiet hiss, not "digital" silence (all zeroes), and there can be a DC offset. Also, the index 00 portions may not have been designated or detected with the utmost precision; it's normal for pauses to begin or end slightly off from where the boundaries are on the disc, and where they were detected to be.

It's an interesting project, although I don't see the point of it... They're your CDs, so surely you know which ones are DJ mixes & live albums, and which ones have separate songs.

This post has been edited by mjb2006: Jan 25 2014, 17:59
Go to the top of the page
+Quote Post
n0v!ze
post Jan 26 2014, 10:10
Post #17





Group: Members
Posts: 31
Joined: 9-June 07
Member No.: 44197



Thank you for taking the time to explain this to me, mjb. I have to admit that I still don't get it, and I can live with that. The initial question seems to be answered in that no such tool exists.

QUOTE (mjb2006 @ Jan 25 2014, 17:52) *
It's an interesting project, although I don't see the point of it... They're your CDs, so surely you know which ones are DJ mixes & live albums, and which ones have separate songs.

Things are not always as easy as they seem. I'm into Metal music and there are often intros that blend into the next song without any interruption of music--that's what I call "gapless", no matter what the technical correct relationship to audio gaps on the disc may be (btw, I didn't start that discussion). Also, I've got a couple of non-live discs where four or five songs (out of ten) are really one contiguous opus with no silence between the tracks.

Be it live discs, intros/outros, or otherwise concatened passages of music that the producer decided to divide into tracks, in all the cases that I looked at EAC shows me gap length 00:00 (zero). And my perhaps stupid assumption was that this must be detectable somehow in an automated way because I surely don't want to read in 1500 CDs in EAC just to figure out if there are gapless tracks. The majority of my discs has already been ripped in the past and 'm looking for a tool or script that can work on the images and doesn't require the physical disc.

Sorry for the ignorance.
Go to the top of the page
+Quote Post
greynol
post Jan 26 2014, 17:08
Post #18





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



QUOTE (n0v!ze @ Jan 26 2014, 01:10) *
There are often intros that blend into the next song without any interruption of music--that's what I call "gapless",

As do the rest of us.

QUOTE
no matter what the technical correct relationship to audio gaps on the disc may be

There is no relationship.

QUOTE
(btw, I didn't start that discussion).

That part of the discussion was intended to keep you from wasting your time on a fool's errand.

QUOTE
The majority of my discs has already been ripped in the past and 'm looking for a tool or script that can work on the images and doesn't require the physical disc.

A tool to determine whether there is a silent pause at a track transition need not require a physical disc. A good one will not pay any attention to 00 indicies, rather it should search around each 01 index between the first and last track.

QUOTE
Sorry for the ignorance.

I think the word is obstinance.

This post has been edited by greynol: Jan 26 2014, 18:01


--------------------
Placebophiles: put up or shut up!
Go to the top of the page
+Quote Post
n0v!ze
post Jan 26 2014, 18:04
Post #19





Group: Members
Posts: 31
Joined: 9-June 07
Member No.: 44197



QUOTE (greynol @ Jan 26 2014, 17:08) *
I think the word is obstinance.

I'd prefer to call it tenacity wink.gif

You haven't commented on my observation that EAC always shows 00:00 (zero) gap length.
This is a very clear indication and I'd draw no connection to "searching around" - is that what EAC does under the hood?

This post has been edited by n0v!ze: Jan 26 2014, 18:10
Go to the top of the page
+Quote Post
greynol
post Jan 26 2014, 18:20
Post #20





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



Giving credence to your "eureka" moment would be silly. You might as well be claiming that all machines with tires are bicycles. Titles that have silence between tracks which have no 00 indices are commonplace. This single fact invalidates your position...completely.

EAC searches subcode data for index information in order to determine the length of "gaps" (READ: audio marked with a 00 index), not audio data.

To give you some insight, a typical use-case for a 00 index is to prompt a CD player to display the track time so that it counts up from a negative value to zero when transitioning to the next track. CD players also use this index to skip over audio when in shuffle or program play mode.

This post has been edited by greynol: Jan 26 2014, 21:05


--------------------
Placebophiles: put up or shut up!
Go to the top of the page
+Quote Post
n0v!ze
post Jan 27 2014, 20:08
Post #21





Group: Members
Posts: 31
Joined: 9-June 07
Member No.: 44197



QUOTE (greynol @ Jan 26 2014, 18:20) *
Titles that have silence between tracks which have no 00 indices are commonplace. This single fact invalidates your position...completely.

I can't follow.

A := EAC shows gap length 0 for track x
B := Track x is gapless
C := Tracks can contain silence anywhere, including the appended gap (True)
D := Silence in the gap must not necessarily be 00 indexed (True)

I said: If A, then B
You say: Because of C and D, what I say can't be true

But there's no connection between what I said and what you are claiming is disproving me--I never mentioned C.

Just to cite the HA wiki on gap calculation: "With the info here, one now might be able to, given any CUE, calculate all gap lengths and, if needed, edit the CUE Sheet to convert from one format to the other."

So what is actually missing, assuming that the information in the wiki is correct? What is preventing a more capable programmer than I am to calculate the gap length for each track from the cue sheet, and, if the gap length is 0, output "gapless track"?

Go to the top of the page
+Quote Post
greynol
post Jan 27 2014, 20:34
Post #22





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



*SIGH*

In EAC a "gap" (as shown in the GUI, log file or cue sheet) is the audio data marked with a 00 index. It is not the same as the concept of a gap as it relates to gapless playback. Being "tenacious" will not change this.

If track X has no 00 index, EAC will show a gap length of 0 regardless of whether it is preceded by silence. The same is true for track X+1.

Since if not B, then not A is a false statement, if A, then B is also a false statement.

How many more times must I repeat this for it to sink in?

This post has been edited by greynol: Jan 27 2014, 20:37


--------------------
Placebophiles: put up or shut up!
Go to the top of the page
+Quote Post
bryant
post Jan 27 2014, 20:42
Post #23


WavPack Developer


Group: Developer (Donating)
Posts: 1290
Joined: 3-January 02
From: San Francisco CA
Member No.: 900



QUOTE (n0v!ze @ Jan 27 2014, 11:08) *
So what is actually missing, assuming that the information in the wiki is correct? What is preventing a more capable programmer than I am to calculate the gap length for each track from the cue sheet, and, if the gap length is 0, output "gapless track"?

I saw greynol's last post (which says basically the same thing), but I'll add this anyway (because I already typed it):

I think the confusion may come from two different definitions of "gap" in this context.

One definition is areas of a CD that the TOC decribes as index 00.

Another definition would be "a silent, or near silent, period of audio near the transition of consecutive tracks on a CD". This is what most people mean when referring to "gaps" or "gapless".

The two definitions sometimes refer to the same thing, but often do not. There can be silent audio between tracks with no index 00 and there can be index 00 gaps with no silence in them. The only way to determine true silent gaps is to examine the audio data.
Go to the top of the page
+Quote Post
greynol
post Jan 27 2014, 20:43
Post #24





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



Thank you, David.


--------------------
Placebophiles: put up or shut up!
Go to the top of the page
+Quote Post
mjb2006
post Jan 27 2014, 21:13
Post #25





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



[I started writing this before David's reply was posted; we're all saying the same thing, though.]

"EAC shows gap length 0 for track x" = Without regard for how silent the audio is, EAC checked to see if the CD itself designates any portion of the track as index 00, and no such portions could be found. So if a cue sheet was generated, it would not contain an INDEX 00 or PREGAP line for that track.

"Track x is gapless" = Without regard for what index #s are encoded on the disc, and regardless of what EAC detected, you know by listening to it that this is a continuous mix CD or live album or whatever. There are no pauses (stretches of silent audio) near the track boundaries.

Two different types of gap.

When EAC talks about gaps, it is only talking about what the CD has designated as index 00. Ordinarily, no matter what ripper you use, these sections are present in the rip at the end of each track's file. So, when you play each track's file, as you get near the end of the file, the audio maybe goes silent for a couple seconds. If the CD had designated that silent portion as the next track's index 00, then in a real CD player, the track number would've advanced by 1 and the timer would show a count-up like -0:03, -0:02, -0:01, 0:00.

EAC is unique among rippers in that it gives you the option of either removing these sections (useful when ripping a CD-R burned in TAO mode) or putting them at the beginning of each track file (matching how tracks are actually written on the disc, allowing the cue sheet to be compliant, but not what we are used to listening to).

Does this help?

This post has been edited by mjb2006: Jan 27 2014, 21:14
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: 23rd July 2014 - 22:00