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

[db,ffmpeg] calculate and persist audio hash on local files #1622

Closed
wants to merge 5 commits into from

Conversation

whatdoineed2do
Copy link
Contributor

Contributing to fixing #85

  • DB - new audio_hash column
  • scanner - optionally calc audio hash for files (based on all packets in file)
  • json api, conf, smartpl - supporting work

@ejurgensen
Copy link
Member

Thanks for the suggestion @whatdoineed2do. It's not great to solve usability issues with config options, but sometimes its all there is to do. Not sure where this is on that scale. In your experience, by what factor does this slow the scanning?

@whatdoineed2do
Copy link
Contributor Author

whatdoineed2do commented Jun 20, 2023

just ran ths off my laptop with an NVEM drive.

1198 real audio files (mostly 20-40mb flacs) locally, destroyed the db on each run, filescan_disable = true for startup, and manually trigger the scan via curl -XPUT http://localhost:3689/api/rescan

  • no audio generation: 3 secs (0.001 per file)
  • audio generation: 53 sec (0.044 per file)

I guess this is not a surprise, as the server needs to read most/all of each file in chunks (packet-by-packet).

@ejurgensen
Copy link
Member

destroyed the db on each run

How so?

@whatdoineed2do
Copy link
Contributor Author

Destroyed db - I mean deleted the db file before each test

@ejurgensen
Copy link
Member

I think the existing avformat_find_stream_info() reads some kB of each file, have you checked if you can get a hash from that?

@whatdoineed2do
Copy link
Contributor Author

Not seen anything on the existing metadata that the libav* maintains.

@ejurgensen
Copy link
Member

Sorry, but I'm not in favour of this option, so I will close the PR. The reasons are because of the performance impact and the "fix-with-a-config-option" approach.

@ejurgensen ejurgensen closed this Jun 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants