Git Product home page Git Product logo

audio-scan's People

Contributors

andygrundman avatar clivem avatar lintweaker avatar manwar avatar philippe44 avatar triode avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

audio-scan's Issues

Some WavPack DSD file the song_length_ms is incorrect

I found a problem when using LMS. Some WV files the duration is incorrect.

The LMS team says it seems to be a problem in Audio::Scan.

The info from the wavpack file:

  $VAR1={
      'audio_size' => 696793736,
      'file_size' => 696793736,
      'audio_offset' => 0,
      'encoder_version' => 1040,
      'bitrate' => 13922300,
      'song_length_ms' => 400390,
      'total_samples' => 1130061824,
      'channels' => 2,
      'lossless' => 1,
      'samplerate' => 2822400,
      'bits_per_sample' => 1,
      'jenkins_hash' => 1973334605
    };

The info from the decompressed dff file:

  $VAR1 = {
      'bitrate' => 5644814,
      'id3_version' => 'ID3v2.3.0',
      'audio_size' => 1356257280,
      'tag_diar_artist' => 'Cembalo Deluxe Vol. 2',
      'song_length_ms' => 1922133,
      'channels' => 2,
      'bits_per_sample' => 1,
      'jenkins_hash' => 2820175086,
      'samplerate' => 2822400,
      'file_size' => 1356260682,
      'audio_offset' => 144,
      'tag_diti_title' => 'Cembalo Deluxe Vol. 2'
    };

In the latter the correct song_length_ms is given.

The LMS issue link

Opus codec support

Any plans? My .opus files are not recognized when scanning.
I asked the question in the github.com/Logitech/slimserver project, and mherger pointed me here.

Bad Opus Header with embedded art (possibly over a certain size)

Using Audioscan 1.02 as part of LMS.

The scanner is not importing about 300 Opus files. Some Opus files work ok, some don't.

Checking debug log the problem files give a "Not an Opus file (bad opus header)" error. I've managed to narrow the issue down to the embedded artwork. They all import fine with artwork removed. I've tried tagging in Foobar and MP3Tag and checking with opusinfo.exe and there are no errors reported or playback issues with the files.

I've tried gradually reducing the artwork quality and it seems files start importing ok once the artwork size is under about 45KB.

All over formats happily support larger embedded artwork, so is there something in the Opus spec that is causing this error or is this just an issue with the scanner?

wrong duration for wav files > 16 bit

Hi,

I've found that using the Audio::Scan module in LMS 7.9.1 (Audio::Scan 0.9.5) when running over a wav file with precision greater than 16 bit we get a wrong duration, when i.e. sox expose the correct value:

Problem is that tracks are stored with this wrong duration so, when played, the progress bar is messed up and some controls like 'jump to time' does not works properly in plugins.

this is an example over a wav 32 bit 384000 Hz,.

look at song_length_ms vs. Duration.

AudioScan: {
  info => {
            audio_offset    => 80,
            audio_size      => 397516800,
            bitrate         => 24576000,
            bits_per_sample => 32,
            block_align     => 8,
            channels        => 2,
            file_size       => 397516880,
            format          => 65534,
            jenkins_hash    => 643161139,
            samplerate      => 384000,
            song_length_ms  => 6367,
          },
  tags => {},
} at F:\SVILUPPO\AudioScan\AudioScan.pl line 78.
"F:/Sviluppo/slimserver/Plugins/C3PO/Bin/MSWin32-x86-multi-thread/sox.exe --i \"F:\\SVILUPPO\\01 - SqueezeboxServer Plugins\\musica campione\\wav_32_384000.wav\""
0
(
  "\n",
  "Input File     : 'F:\\SVILUPPO\\01 - SqueezeboxServer Plugins\\musica campione\\wav_32_384000.wav'\n",
  "Channels       : 2\n",
  "Sample Rate    : 384000\n",
  "Precision      : 32-bit\n",
  "Duration       : 00:02:09.40 = 49689600 samples ~ 9705 CDDA sectors\n",
  "File Size      : 398M\n",
  "Bit Rate       : 24.6M\n",
  "Sample Encoding: 32-bit Signed Integer PCM\n",
  "\n",
)

here a table with results over different versions of same file (always 129.4 secs long).

file         offset	size	        ch     s/r      bit 	secs     
wav 16 192000	44	99379200	2	192000	16	129.4   
wav 16 44100	44	22826160	2	44100	16	129.4    
wav 16 96000	44	49689600	2	96000	16	129.4    
wav 24 192000	80	149068800	2	192000	24	17.551   
wav 24 384000	80	298137600	2	384000	24	6.367
wav 32 384000	80	397516800	2	384000	32	6.367

Corrupt jpeg error after not being able to read at least 10 bytes of file

OS X, High Sierra, using Audio-Scan as part of Logitech Media Server v7.9 (latest nightly build), Audio-Scan is v0.95

While scanning music files the process gets stuck on the same files, error messages from scanner.log copied below, the files involved open OK in several programs and the error doesn't show up in previous versions of LMS. Offending files coped below in case you want to reproduce the error. I've already posted this error in the LMS's forums������ and the recommendation there was to post a bug report here.

AudioScan error example files.zip

[18-02-06 16:23:58.3337] Slim::Music::Artwork::__ANON__ (697) Pre-caching artwork for Discovery from /Users/XXXX/Music/iTunes/iTunes Media/Music/Daft Punk/Discovery/01 One More Time.m4a [18-02-06 16:23:58.3344] Audio::Scan::scan (75) Warning: Error: Unable to read at least 16 bytes from file (only read 10). [18-02-06 16:23:58.3433] Slim::Music::Artwork::__ANON__ (697) Pre-caching artwork for Back in Black from /Users/XXXX/My Music/A-L/Back In Black/10 - Rock And Roll Ain't Noise Pollution.mp3 [18-02-06 16:23:58.3442] Image::Scale::new (44) Warning: Image::Scale libjpeg error: Corrupt JPEG data: 45 extraneous bytes before marker 0xe1 ((data))`

Building on Apple M1

Hi @andygrundman - I'm trying to build Audio::Scan on a new Apple M1 based system, using the good old buildme.sh script. Unfortunately it doesn't get far:

build_module run tests:1 clean:1 hints 1 Audio-Scan-1.02 
Adding -arch arm64 -arch x86_64 -mmacosx-version-min=11.0
Warning (mostly harmless): No library found for -lz
Generating a Unix-style Makefile
Writing Makefile for Audio::Scan
Writing MYMETA.yml and MYMETA.json
Running Mkbootstrap for Scan ()
chmod 644 "Scan.bs"
"/usr/bin/perl" -MExtUtils::Command::MM -e 'cp_nonempty' -- Scan.bs blib/arch/auto/Audio/Scan/Scan.bs 644
cc -c  -Iinclude -Isrc -arch arm64 -arch x86_64 -mmacosx-version-min=11.0 -I/usr/include  -g -pipe -fno-strict-aliasing -fstack-protector-strong -DPERL_USE_SAFE_PUTENV -Os   -DVERSION=\"1.02\" -DXS_VERSION=\"1.02\"  -iwithsysroot "/System/Library/Perl/5.28/darwin-thread-multi-2level/CORE"   Scan.c
rm -f blib/arch/auto/Audio/Scan/Scan.bundle
cc  -arch arm64 -arch x86_64 -mmacosx-version-min=11.0 -L/usr/lib  -bundle -undefined dynamic_lookup -fstack-protector-strong  Scan.o  -o blib/arch/auto/Audio/Scan/Scan.bundle  \
	      \
	  
chmod 755 blib/arch/auto/Audio/Scan/Scan.bundle
Skip blib/lib/Audio/Scan.pm (unchanged)
PERL_DL_NONLAZY=1 "/usr/bin/perl" "-MExtUtils::Command::MM" "-MTest::Harness" "-e" "undef *Test::Harness::Switches; test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
t/01use.t .......... 1/1 
#   Failed test 'use Audio::Scan;'
#   at t/01use.t line 3.
#     Tried to use 'Audio::Scan'.
#     Error:  Can't load '/Users/mh/SynologyDrive/git/slimserver-vendor/CPAN/Audio-Scan-1.02/blib/arch/auto/Audio/Scan/Scan.bundle' for module Audio::Scan: dlopen(/Users/mh/SynologyDrive/git/slimserver-vendor/CPAN/Audio-Scan-1.02/blib/arch/auto/Audio/Scan/Scan.bundle, 0x0002): symbol '_uncompress' not found, expected in flat namespace by '/Users/mh/SynologyDrive/git/slimserver-vendor/CPAN/Audio-Scan-1.02/blib/arch/auto/Audio/Scan/Scan.bundle' at /System/Library/Perl/5.28/darwin-thread-multi-2level/DynaLoader.pm line 197.
#  at t/01use.t line 3.
# Compilation failed in require at t/01use.t line 3.
# BEGIN failed--compilation aborted at t/01use.t line 3.
# Looks like you failed 1 test of 1.

(and a lot more test failures thereafter, of course)

Not much info there. Any hints where I could start digging?

Ogg files with implausibly long durations

Hi,

I have a number of ogg files here for which Audio::Scan returns implausibly long durations:

$ perl -MAudio::Scan -MData::Dumper -e 'print Data::Dumper->Dump( print Data::Dumper->Dump([Audio::Scan->scan("/mnt/media/home/media/player/Other/B/Berestez/Kahvi Collective Archive Vol 1/Plokcity.ogg")]))'
$VAR1 = {
          'tags' => {
                      'TRACKNUMBER' => '2',
                      'DATE' => '2003',
                      'GENRE' => 'electronica',
                      'TITLE' => 'Plokcity',
                      'ALBUM' => 'Kahvi Collective Vol 1',
                      'VENDOR' => 'Xiphophorus libVorbis I 20011231',
                      'ARTIST' => 'Berestez'
                    },
          'info' => {
                      'blocksize_1' => 512,
                      'bitrate_upper' => 0,
                      'file_size' => 7335534,
                      'bitrate_nominal' => 192003,
                      'song_length_ms' => '18446744071562067968', **<-- should be something more like 372400**
                      'bitrate_average' => 27,
                      'stereo' => 1,
                      'version' => 0,
                      'serial_number' => 32321,
                      'samplerate' => 44100,
                      'blocksize_0' => 4096,
                      'bitrate_lower' => 0,
                      'audio_size' => 7331474,
                      'channels' => 2,
                      'jenkins_hash' => 978199415,
                      'audio_offset' => 4060
                    }
        };

ffmpeg does parse the duration correctly:

...
[ogg @ 0x5602c91d7fc0] 107 bytes of comment header remain
Input #0, ogg, from '/mnt/media/home/media/player/Other/B/Berestez/Kahvi Collective Archive Vol 1/Plokcity.ogg':
  Duration: 00:06:12.40, start: 0.000000, bitrate: 157 kb/s
...

I should mention that the files showing the issue are, I believe, freely distributable, so I can send those over if useful.

Thanks!

Rob

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.