Skip to content
This repository has been archived by the owner on Mar 28, 2022. It is now read-only.

Windows CodeGen - "{\"error\":\"could not decode\" - #69

Open
prabhatmail opened this issue Mar 26, 2014 · 6 comments
Open

Windows CodeGen - "{\"error\":\"could not decode\" - #69

prabhatmail opened this issue Mar 26, 2014 · 6 comments

Comments

@prabhatmail
Copy link

Hi

I was able to compile the windows code for codegen on Visual Studio 2013 in 32 bit configuration. Now when I run the codegen executable, I get the error:
[
{"error":"could not decode", "tag":0, "metadata":{"filename":"C:\Maid.mp3"}}
]

When I debug the code, it seems the issue is in the function -
codegen_response_t codegen_file(char filename, int start_offset, int duration, int tag)

at the following lines

int numSamples = pAudio->getNumSamples(); //In my code I get 0 samples
if (numSamples < 1) {
char* output = (char*) malloc(16384);
sprintf(output,"{"error":"could not decode", "tag":%d, "metadata":{"filename":"%s"}}",

My machine is a Windows 8.1 - X64.
I installed FFMPEG (32 bit) in the path and checked it invoking from command line and it identifies the command.

Please advise if there could be any other issue.

Thanks
Prabhat

@sonypsx
Copy link

sonypsx commented Dec 27, 2014

Same here tried it with a ".flac". I tried to convert the file to ".mp3" with ffmpeg to ensure it is readable and valid. Of course both the .flac and .mp3 is playable. Also on the .mp3 i got:
[
{"error":"could not decode", "tag":0, "metadata":{"filename":"d:\X\ENMFP\output.mp3"}}
]

{"response": {"status": {"version": "4.2", "code": 0, "message": "Success"}, "songs": [{"tag": 0, "error": "need codes in query for fingerprint matching"}]}}

Any hints on this?
Thanks
sonypsx

@sonypsx
Copy link

sonypsx commented Dec 27, 2014

I think i have found a decent hint:
It is ALWAYS the first file in the filelist!
For example:
filelist content:
D:\X\ENMFP\1.mp3
D:\X\ENMFP\2.mp3

call:
codegen -s 0 50 < filelist.lst > result.txt

in the result you will get:
[
{"error":"could not decode", "tag":0, "metadata":{"filename":"d:\X\ENMFP\1.mp3"}},
{"metadata":{"artist":"", "release":"", "title":"", "genre":"", "bitrate":0,"sample_rate":0, "duration":0, "filename":"d:\X\ENMFP\2.mp3 ", "samples_decoded":1102500, "given_duration":50, "start_offset":0, "version":3.15, "codegen_time":0.657000, "decode_time":0.640000}, "code_count":202, "code":"eJzNlolxKCkMRFMaIc5wEEf-IfzX2K7aENZl9wjNIFon_r6fn8mfLSBlgSQXZC2z3hZB1bJKaoKeBB0YkoakKWlKCoGMfEvSFhwtTwXuA9b2IZk90DJJ8gdaioGVB9gyMbD2QEsxsC5JDGxIEgOLB1NeSdoPtBQDuw8gJLIAymRaap2Sljo8ZUERVCynBquk09KQpNPSxGgKSUvSzgJJR3C1vEj-Yd4tCbRMWrogC4peFEkVy94Uf53mXTC01JE-629iXAf50bYDvyx-WdHIQ0u9yAddUQaKthQFvCh5RckrXTAEcqEoW2XrE6WnKD1VnKsyU0W3imlVHYgjoGWHRhW1OiWFQNSqGNQLyBcAVk3RbQkDzQWZbU2pbVVvG_aa7LXxCgzOLfRiCbZA9roS1VUlXaa6s6PLShetrqj1_oAdXZXYQ0ulp8vAkFvDsoBPhkunMhtVklgO0RiiMRQh_QEQUso_RRjQXqV2KsRTpqYqZyrYMyeBlirbqfRMhX2K2lTApqjNeKDvxG-qcuaR7rIj1BqhegklINQVoaiFkhnyN-RvqPhDdR-q-1Aa4-BCyN9Ql7mtdT0n-mc19-923HMjMRRRRW-0Px2BvudGm2TpDW_IxtOnvlF-lcaY_pW0rKPfxTI0rVwvuaRUdmlrl-RjtFJu8tlPpa6u9zN9eKYWD9m_fVu-TiP5QWneZ8Geu1O7JCK3tTb9UdKw-_hanhBzTQXOkR_5h-9__YDanx806q8f4vs_8cPX_fEjsLQwX3JaKPndBSUhv35LhszobV0olnRIThR457A6aS-cPKfMEcVHbjHqNDQFJXzyaiP7Dj8ovaVbF8Gzb6_YkdbKGaV7DUfp-1t7ruXRbkYJj7Pv_h6_Gy3t_sePJvrld3aHz-P3-FT41f74wLtMlD6J3a5K2omSI6VbUsydrvXAAZ6xarrw5XnJHwMXpY1hS_mwUWtuyeZl5IyRLNdYDPl0e0HJEO1xLBPvVWXNGHearOySUnWAKXUjdVCrx-I5nU-Oguo6PlDuquMnH0cJi2_QVXjEOtWNhSEeI1xPeGD__DzZEvrIYEIjUhM9M1z7Tl35SjO58lRSnr1vXSN5MK-6MzXIO6lgbCTOIz_d33mXpO34O-_qfEr61IZ-Mon8nXe66jwzo5gnVK8pKTzjXdbTqeJl-AWPRQVEMOndGv6eXdlXDrFPrRhXqPwdm32kLNXTiicGfB9h3124PDXW_ab6_KSByOfz01TR851buaOnUV1cKVxa1lp65-9V9rJWiWszX1725PzI99uNOvO0AeJ5v8Wt8eK53Fv7iWf-9iazyiNGG5VM_vDvjpXJI7eAH8wqv1--w8J43y1F1EXcmerzbJQ3c4kzFWdjKg66JM1xKHXaus8J1UM-D_PEwsnn67u6zl_fEc3Xd5rK66eouO1D_yFVTRueQa0O3-Up4XFL1bPV1Rgq6g940H3qj5b6JUQE-xj3BPHxFb2iHCNflOq_ymghvvQfhx3ii5KQeld8g_PyMfrhLCn5H6KgJB5r0Q_UV-J2ZR5xJRAPzzG5t4nH2Omonkll06SjnDU6s1wa6g_76BOcoz-yv9F_UarPc4p_FVeEWA==", "tag":1}
]

Now just turn the filelist to:
d:\X\ENMFP\2.mp3
d:\X\ENMFP\1.mp3

call again:
codegen -s 0 50 < filelist.lst > result.txt

And the result looks like the following:

[
{"error":"could not decode", "tag":0, "metadata":{"filename":"d:\X\ENMFP\2.mp3"}},
{"metadata":{"artist":"Clean Bandit Feat. Jess Glynne", "release":"Bravo Hits Vol.85", "title":"Rather Be", "genre":"Pop", "bitrate":227,"sample_rate":44100, "duration":228, "filename":"d:\X\ENMFP\1.mp3", "samples_decoded":1102500, "given_duration":50, "start_offset":0, "version":3.15, "codegen_time":0.625000, "decode_time":0.625000}, "code_count":187, "code":"eJx1lluWJSsIRKeUii-GIynOfwh3R57qz3u6F6mh8ggQ63m-X20I08gGQrOnSw6JLRHCQquRiKNRIsqzEFXC2FdaRXRNx0a4plv79osIbQmNXo2ORsm--jCqlX3VlkTKKY26FoamS0Ju1NCJV6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E5Y1l3WP0c6D3nnCq6umdEqDMKCn4eSmz6_g_L-BDqke_8BjW0VlOcpdUFDmnt_j5c7L0_OdPn_Hnz6FL1fj5Q1b2Ie9L1UB9w4vtn-vWvgdS50_lJcVnw_4KvZre6hiVXkKjAaxorY0KLRQDIJ2FV5QnBdOtl_7po038Hz-o-PmD0qH6XgtL7k_erALnsrg0ajVBQF7N0gWeKLP1ZjGpoH6es_JcQHfaEx3kzjHa4dEa91AhQMfjzkpGzx0D3LkU86ufPR-Gf_Vz8iQvSM52J3rsgU47psYI-NXTpY7uUj1ZpceqyCB993UX_YlqVeOlP3Vz_SnCTez_AU6QW5Y=", "tag":1}
]

So i think this is a bug. Please verify if you are getting the same result.

Regards
sonypsx

@AmirHossein484
Copy link

Echonest will shutdown it's fingerprinting service on 5 Jan 2015.

@sonypsx
Copy link

sonypsx commented Dec 27, 2014

Thanks for this information! - And THEN?!
Any alternatives?

Do you have a source of this bad news?

@AmirHossein484
Copy link

There is some, Like Last.fm and Gracenote ..
But, Last.fm fingerprint system has down since 5 month ago .. Check : status.last.fm

@sonypsx
Copy link

sonypsx commented Dec 28, 2014

Anyway found the source by myself :(
http://developer.echonest.com/forums/thread/3650

Thanks

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants