Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Music Duplicates - length field isn't populated if length is not selected as a matching option #696

Closed
kaysond opened this issue Apr 27, 2022 · 9 comments · Fixed by #698 or #705
Closed

Comments

@kaysond
Copy link

kaysond commented Apr 27, 2022

Running 4.1.0 on Windows Server 2k19. If I don't select length as a matching option, the length isn't shown in the results. It would be nice to have that as a means of comparison

image

@qarmin
Copy link
Owner

qarmin commented Apr 28, 2022

If length or year is not visible, that means that music file doesn't have such info in their tags.

@kaysond
Copy link
Author

kaysond commented Apr 28, 2022

If length or year is not visible, that means that music file doesn't have such info in their tags.

Which tags/frames are you looking for? Here is the media info dump for the files in the bottom of that screenshot. It has both year and duration.

Complete name                            : 03 - (defun botsbuildbots () (botsbuildbots)).mp3
Format                                   : MPEG Audio
File size                                : 9.49 MiB
Duration                                 : 4 min 7 s
Overall bit rate mode                    : Constant
Overall bit rate                         : 320 kb/s
Album                                    : Portal 2: Songs to Test By, Volume 2
Album/Performer                          : Aperture Science Psychoacoustics Laboratory
Album/Performer/Sort                     : Aperture Science Psychoacoustics Laboratory
Part/Position                            : 1
Part/Total                               : 1
Track name                               : (defun botsbuildbots () (botsbuildbots))
Track name/Position                      : 3
Track name/Total                         : 18
Performer                                : Aperture Science Psychoacoustics Laboratory
Performer/Sorted by                      : Aperture Science Psychoacoustics Laboratory
Composer                                 : Mike Morasky
Composer/Sorted by                       : Morasky, Mike
Publisher                                : Valve
Genre                                    : Electronic
Original/Released date                   : 2011
Recorded date                            : 2011-07-01
ISRC                                     : USA561361567
Cover                                    : Yes
Cover type                               : Cover (front)
Cover MIME                               : image/jpeg
SCRIPT                                   : Latn
Media Type                               : Digital Media
originalyear                             : 2011
MusicBrainz Album Status                 : official
MusicBrainz Album Release Country        : XW
MusicBrainz Album Type                   : album; soundtrack
WORK                                     : (defun botsbuildbots () (botsbuildbots))
ARTISTS                                  : Aperture Science Psychoacoustics Laboratory
MusicBrainz Work Id                      : c725dc05-e937-4eb5-aac4-cb03bd9993d7
MusicBrainz Album Id                     : f3c83cbc-5fd2-40ee-9e96-2ad1cc78c9a1
MusicBrainz Artist Id                    : 2b948e66-5269-4311-a89d-3f1126960f9b
MusicBrainz Album Artist Id              : 2b948e66-5269-4311-a89d-3f1126960f9b
MusicBrainz Release Group Id             : 57cc1506-af2f-49ee-8b72-2798ac074401
MusicBrainz Release Track Id             : 7996f8d3-a14a-3ac4-aab4-355b2907bfa4

Audio
Format                                   : MPEG Audio
Format version                           : Version 1
Format profile                           : Layer 3
Duration                                 : 4 min 7 s
Bit rate mode                            : Constant
Bit rate                                 : 320 kb/s
Channel(s)                               : 2 channels
Sampling rate                            : 44.1 kHz
Frame rate                               : 38.281 FPS (1152 SPF)
Compression mode                         : Lossy
Stream size                              : 9.43 MiB (99%)
Language                                 : zxx

@qarmin
Copy link
Owner

qarmin commented Apr 28, 2022

Can you post example audio file?

I think that one of three things could happen:

  • file tags are not recognized by lofty library that Czkawka use
  • length tag is different thing that duration
  • app read only first/primary tag, but info is written in second, third etc.

@kaysond
Copy link
Author

kaysond commented Apr 28, 2022

So I ran through all 4000 dupes last night, and none of them had year/length.
Looks like maybe you fixed this, but here's an example file in case: https://mega.nz/file/9koTiKbK#D1SgN2nHD_3tftB5pzJ7Sx236xouqJIN4ADS8-QJ3WM

I can test it next release

@qarmin
Copy link
Owner

qarmin commented Apr 28, 2022

Nightly builds can be downloaded from Actions tab - https://github.com/qarmin/czkawka/actions

Example build with fix - https://github.com/qarmin/czkawka/suites/6300147458/artifacts/225841924

@kaysond
Copy link
Author

kaysond commented Apr 29, 2022

Doesn't seem to be fixed. I tried the latest build:
image

I checked the commit, and I wonder if it's an issue with the tag names?

@qarmin qarmin reopened this Apr 29, 2022
@qarmin
Copy link
Owner

qarmin commented Apr 29, 2022

Didn't checked tags in app yet on provided file, but looks that it doesn't have length inside its tags.
This is what I got when reading tags from ffprobe

[mp3 @ 0x56500da66ec0] Estimating duration from bitrate, this may be inaccurate

@kaysond
Copy link
Author

kaysond commented Apr 29, 2022

Interesting. I used mediainfo which didn't complain about it, but I see the same thing with ffprobe. I tried some other files where ffprobe does not give that message, and it still doesn't show any year/length at all in czkawka.

Here's an example output:

Input #0, mp3, from '01 - Brahms, Johannes - Hungarian Dance no. 1 in G minor - Allegro molto (1) - Copy.mp3':
  Metadata:
    title           : Hungarian Dance no. 1 in G minor: Allegro molto
    artist          : Johannes Brahms
    track           : 1/21
    album           : 21 Hungarian Dances
    disc            : 1/1
    genre           : Classical
    TMED            : CD
    TORY            : 1982
    MusicBrainz Album Artist Id: c70d12a2-24fe-4f83-a6e6-57d84f8efb51; d770374d-05e9-4ed3-a068-3fbd4e6e4dd6; 39e84597-3e0f-4ccc-89d2-6ee1dd6fb050
    TSRC            : DEF058230900
    SCRIPT          : Latn
    performer       : Claudio Abbado
    composer        : Johannes Brahms
    TSOC            : Brahms, Johannes
    artist-sort     : Brahms, Johannes
    ASIN            : B000001G4R
    originalyear    : 1982
    publisher       : Deutsche Grammophon
    BARCODE         : 028941061522
    ARTISTS         : Johannes Brahms
    CATALOGNUMBER   : 410 615-2
    MusicBrainz Album Type: album
    MusicBrainz Album Status: official
    MusicBrainz Album Release Country: US
    Acoustid Id     : 368ea84f-d127-4707-a40f-cccd4f6fede7
    album_artist    : Johannes Brahms; Vienna Philharmonic, Claudio Abbado
    TSO2            : Brahms, Johannes; Vienna Philharmonic, Abbado, Claudio
    MusicBrainz Work Id: b4fb7274-f8d2-407c-a182-dca65ea56a19
    MusicBrainz Album Id: 6157def0-e14a-4064-86f7-f4c9d0b01bad
    MusicBrainz Artist Id: c70d12a2-24fe-4f83-a6e6-57d84f8efb51
    MusicBrainz Release Group Id: 9f43cc19-7528-4bc6-8811-d99b3c3d5f7e
    MusicBrainz Release Track Id: f5ba4f8b-3f8b-3f06-beb7-23ad361e2356
    WORK            : Hungarian Dances for orchestra, WoO 1, Book 1, no. 1 in G minor: Allegro molto
    date            : 1984
  Duration: 00:02:56.67, start: 0.025056, bitrate: 324 kb/s
    Stream #0:0: Audio: mp3, 44100 Hz, stereo, fltp, 320 kb/s
    Metadata:
      encoder         : Lavc56.16
    Stream #0:1: Video: mjpeg (Baseline), 1 reference frame, yuvj420p(pc, bt470bg/unknown/unknown, center), 500x500 [SAR 1:1 DAR 1:1], 90k tbr, 90k tbn, 90k tbc (attached pic)
    Metadata:
      comment         : Cover (front)

@qarmin
Copy link
Owner

qarmin commented May 4, 2022

The problem was was caused by reading only tags of music file and sometimes not reading tags due missing primary tag.
Strawberry, FFprobe and similar apps use audio properties to calculate length of music file and Czkawka will do exactly same after updating lofty library - #705

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants