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

Fails to read audio from a wav #6

Open
dikonov opened this issue Apr 23, 2021 · 3 comments
Open

Fails to read audio from a wav #6

dikonov opened this issue Apr 23, 2021 · 3 comments
Assignees
Labels
need more info Not enough info to reproduce the reported problem

Comments

@dikonov
Copy link

dikonov commented Apr 23, 2021

I want to compute the DR value for a 6-channel 24bit 88Hz wav and simple_dr_meter failed to read it.

Output of ffprobe:

$ ffprobe 01.wav 
ffprobe version 4.4-alt1 Copyright (c) 2007-2021 the FFmpeg developers
  built with gcc 10 (GCC)
  configuration: --prefix=/usr --libdir=/usr/lib64 --shlibdir=/usr/lib64 --mandir=/usr/share/man --docdir=/usr/share/doc/ffmpeg-4.4 --disable-rpath --enable-gpl --enable-version3 --enable-pthreads --enable-shared --disable-static --enable-mmx --disable-nonfree --enable-ffplay --enable-ffprobe --enable-avfilter --enable-avresample --disable-avisynth --enable-bzlib --enable-chromaprint --enable-frei0r --enable-gnutls --disable-ladspa --enable-libaom --disable-libaribb24 --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --disable-libcelt --enable-libcodec2 --enable-libdav1d --disable-libdavs2 --enable-libdc1394 --enable-libdrm --disable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --disable-libglslang --enable-libgme --enable-libgsm --disable-libilbc --enable-libjack --disable-libklvanc --disable-libkvazaar --disable-liblensfun --disable-libmfx --disable-libmodplug --enable-libmp3lame --enable-librabbitmq --disable-libmysofa --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --disable-libopenmpt --enable-libopus --enable-libpulse --enable-librsvg --disable-librtmp --enable-librubberband --disable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --disable-libtesseract --enable-libtheora --enable-libtwolame --enable-libudev --enable-libv4l2 --enable-libvidstab --disable-libvmaf --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --disable-libxavs2 --enable-libxml2 --enable-libxvid --disable-libzimg --enable-libzmq --enable-libzvbi --enable-lv2 --disable-omx --enable-openal --disable-opencl --enable-opengl --disable-pocketsphinx --enable-sdl2 --enable-vaapi --disable-vapoursynth --enable-vdpau --enable-vulkan --enable-zlib --enable-cuvid --enable-hardcoded-tables --enable-runtime-cpudetect --enable-debug --disable-stripping --enable-pic --extra-cflags='-pipe -frecord-gcc-switches -Wall -g -fPIC -DPIC' --extra-version=alt1
  libavutil      56. 70.100 / 56. 70.100
  libavcodec     58.134.100 / 58.134.100
  libavformat    58. 76.100 / 58. 76.100
  libavdevice    58. 13.100 / 58. 13.100
  libavfilter     7.110.100 /  7.110.100
  libavresample   4.  0.  0 /  4.  0.  0
  libswscale      5.  9.100 /  5.  9.100
  libswresample   3.  9.100 /  3.  9.100
  libpostproc    55.  9.100 / 55.  9.100
Input #0, wav, from '01.wav':
  Metadata:
    originator_reference: CHDWESARACON00��3124618090171839
    time_reference  : 176359
    coding_history  : A=PCM,F=88200,W=24,M=6-channel 
                    :  
                    : A=PCM,F=88200,W=24,M=6chn,T=libsndfile-1.0.22pre2 
                    : 
  Duration: 00:03:44.77, bitrate: 12700 kb/s
  Stream #0:0: Audio: pcm_s24le ([1][0][0][0] / 0x0001), 88200 Hz, 6 channels, s32 (24 bit), 12700 kb/s

Error text:

$ simple_dr_meter 01.wav
Traceback (most recent call last):
  File "/usr/lib/python3/site-packages/simple_dr_meter/main.py", line 238, in <module>
    main()
  File "/usr/lib/python3/site-packages/simple_dr_meter/main.py", line 126, in main
    dr_log_items, dr_mean, dr_median = analyze_dr(in_path, track_cb, keep_precision)
  File "/usr/lib/python3/site-packages/simple_dr_meter/main.py", line 152, in analyze_dr
    audio_info = tuple(read_audio_info(in_path))
  File "/usr/lib/python3/site-packages/simple_dr_meter/audio_io/audio_io.py", line 242, in read_audio_info
    yield _audio_source_from_file(in_path)
  File "/usr/lib/python3/site-packages/simple_dr_meter/audio_io/audio_io.py", line 211, in _audio_source_from_file
    p = read_audio_file_metadata(in_path)
  File "/usr/lib/python3/site-packages/simple_dr_meter/audio_io/audio_io.py", line 302, in read_audio_file_metadata
    raise Exception('ffprobe returned {}'.format(returncode))
Exception: ffprobe returned 1
@magicgoose
Copy link
Owner

Can you provide a short slice of this file in the same format (like, 3 seconds or so)? That would help a lot with debugging and fixing.

@magicgoose magicgoose self-assigned this Apr 23, 2021
@dikonov
Copy link
Author

dikonov commented Apr 25, 2021

I do not have that file anymore, but I can tell that I used audacity and sox to convert files. Audacity can produce test wavs of the same type with any combination of parameters.

I thought that the reason might be the python-ffmpeg interface. ffprobe command alone works, but my brief attempt at digging into the problem (I tried to disable the check for ffprobe return value) showed that python received null data.

@magicgoose
Copy link
Owner

I do not have that file anymore, but I can tell that I used audacity and sox to convert files. Audacity can produce test wavs of the same type with any combination of parameters.

No problem, any other file would be good too, as long as the bug reproduces on it.

@magicgoose magicgoose added the need more info Not enough info to reproduce the reported problem label Jul 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
need more info Not enough info to reproduce the reported problem
Projects
None yet
Development

No branches or pull requests

2 participants