Closed YashMakan closed 3 years ago
@YashMakan Hello, At first I thought that the problem was that the mp3 format could not be recognized, but I just checked - everything works.
Do you have it installed ffmpeg?
Yes and when I entered ffmpeg -version
. It returns version 4.2. I am unable to figure out the problem.
@YashMakan give your test mp3 file, i check it
@dotX12 https://easyupload.io/rgcukg
@dotX12 https://easyupload.io/rgcukg
Hmm, everything works for me stably with your file, you probably have problems with pydub or ffmpeg
https://transfer.sh/1dE2aJk/KWHmwkbzT9.png
My requirements:
ffmpeg -version
ffmpeg version 2021-02-07-git-a52b9464e4-full_build-www.gyan.dev Copyright (c) 2000-2021 the FFmpeg developers built with gcc 10.2.0 (Rev6, Built by MSYS2 project) configuration: --enable-gpl --enable-version3 --enable-static --disable-w32threads --disable-autodetect --enable-fontconfig --enable-iconv --enable-gnutls --enable-libxml2 --enable-gmp --enable-lzma --enable-libsnappy --enable-zlib --enable-libsrt --enable-libssh --enable-libzmq --enable-avisynth --enable-libbluray --enable-libcaca --enable-sdl2 --enable-libdav1d --enable-libzvbi --enable-librav1e --enable-libsvtav1 --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxvid --enable-libaom --enable-libopenjpeg --enable-libvpx --enable-libass --enable-frei0r --enable-libfreetype --enable-libfribidi --enable-libvidstab --enable-libvmaf --enable-libzimg --enable-amf --enable-cuda-llvm --enable-cuvid --enable-ffnvcodec --enable-nvdec --enable-nvenc --enable-d3d11va --enable-dxva2 --enable-libmfx --enable-libglslang --enable-vulkan --enable-opencl --enable-libcdio --enable-libgme --enable-libmodplug --enable-libopenmpt --enable-libopencore-amrwb --enable-libmp3lame --enable-libshine --enable-libtheora --enable-libtwolame --enable-libvo-amrwbenc --enable-libilbc --enable-libgsm --enable-libopencore-amrnb --enable-libopus --enable-libspeex --enable-libvorbis --enable-ladspa --enable-libbs2b --enable-libflite --enable-libmysofa --enable-librubberband --enable-libsoxr --enable-chromaprint libavutil 56. 64.100 / 56. 64.100 libavcodec 58.121.100 / 58.121.100 libavformat 58. 67.100 / 58. 67.100 libavdevice 58. 11.103 / 58. 11.103 libavfilter 7.102.100 / 7.102.100 libswscale 5. 8.100 / 5. 8.100 libswresample 3. 8.100 / 3. 8.100 libpostproc 55. 8.100 / 55. 8.100
Yes, I think that my ffmpeg version is old. I am reinstalling it. Thanks for the help.
I reinstalled the new version from the official website i.e ffmpeg version 4.4-essentials_build-www.gyan.dev
and now when I run the below code it works
>>> sound = AudioSegment.from_mp3("sample.mp3")
>>>
but...
sound = pydub.AudioSegment.from_file(BytesIO(open("sample.mp3",'rb').read()))
giving the same error i.e json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
.
What should I do now?
@YashMakan, hmmmm. I seem to have found a solution. https://github.com/jiaaro/pydub/issues/450
@dotX12 Thanks I will follow the issue jiaaro/pydub#450 for updates. Also, are you using FFmpeg in windows? if so, if possible can you send the FFmpeg... So that I can install the same working version of ffmpeg.
@YashMakan, in windows i use very old version... https://transfer.sh/jeoDp/ffmpeg-2021-02-07-git-a52b9464e4-full_build.7z I think you need to read what is in issue and try to do it, because I have a very old version on Windows. On ubuntu, I use the most current version and everything works well for me.
Fixed in 0.5.0.
When I tried to recognize the song, it is giving me the following error. How to fix it? Code:
Error: