ua-nick / fleep-py

File format determination library for Python
https://pypi.python.org/pypi/fleep
MIT License
261 stars 40 forks source link

fleep.get returns nothing regarding type, extension, or mime #8

Open takedawilliam opened 5 years ago

takedawilliam commented 5 years ago

I have the following code

with open("back number - sister.mp3", "rb") as file:
    info = fleep.get(file.read(128))
    print(info.type)
    print(info.extension)
    print(info.mime)

But the output shows nothing

[]
[]
[]

I tried exiftool & it shows the correct info

ExifTool Version Number         : 11.11
File Name                       : back number - sister.mp3
Directory                       : .
File Size                       : 3.8 MB
File Modification Date/Time     : 2018:12:15 18:57:00+09:00
File Access Date/Time           : 2019:02:02 18:00:44+09:00
File Inode Change Date/Time     : 2018:12:15 18:57:28+09:00
File Permissions                : rw-r--r--
File Type                       : MP3
**File Type Extension             : mp3**
MIME Type                       : audio/mpeg
MPEG Audio Version              : 1
Audio Layer                     : 3
Audio Bitrate                   : 128 kbps
Sample Rate                     : 44100
Channel Mode                    : Joint Stereo
MS Stereo                       : On
Intensity Stereo                : Off
Copyright Flag                  : False
Original Media                  : True
Emphasis                        : None
Encoder                         : LAME3.99r
Lame VBR Quality                : 4
Lame Quality                    : 3
Lame Method                     : CBR
Lame Low Pass Filter            : 17 kHz
Lame Bitrate                    : 128 kbps
Lame Stereo Mode                : Joint Stereo
ID3 Size                        : 128
Title                           :
Artist                          :
Album                           :
Year                            :
Comment                         :
Genre                           : None
Duration                        : 0:04:07 (approx)

Link to the trouble file back number - sister.mp3

Could you please help?

takedawilliam commented 5 years ago

I added a new PR #10 for this issue. Could you please check?

audiofeature commented 4 years ago

Indeed I confirm: Many mp3 files just deliver an empty result.

r-y-zadeh commented 4 years ago

I added a new PR #10 for this issue. Could you please check?

Thank you. fix the issue for me