-
Notifications
You must be signed in to change notification settings - Fork 29
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
Problem reading metadata in Windows #9
Comments
I think there are two scenarios where this is possible:
I suggest debugging this and seeing what ffmpeg’s stderr output is. Right now if the exit code is 0, we assume success ignore stderr. You can use a debugger or edit the source to see the stderr output (see here, or you can use the /cc @egoroof: I think you are using ffmetadata under windows - have you seen this issue? |
No, I have no problems. Also even when I use ffmetadata with an input file which does not have any ID3 tags I get an object with "encoder" property. It works great with russian language) |
Ok, if I run ffmpeg directly from the console with the command: |
What about js? What code do you use? |
Here is a sample of code I am using: var dir = require('node-dir');
var ffmetadata = require('ffmetadata');
dir.files('D:/Music/Anjunabeats Vol. 11/Split/CD 1', function(err, files) {
if(err) { throw err; }
(function iterateFiles(n) {
n = n || 0;
if(n == files.length - 1) { return; }
console.log(files[n]);
if(!/.(mp3|wav|aac)$/.test(files[n])) { iterateFiles(n + 1); return; }
ffmetadata.read(files[n], function(err, metadata) {
if(err) { console.error('Could not read file'); }
else { console.log(metadata); }
setTimeout(function() {
iterateFiles(n + 1);
}, 1000);
});
})();
}); I managed to get a screenshot as the ffmpeg process was closing. In the screenshot you can see that ffmpeg is grabbing the metadata correctly but it is not brought back to ffmetadata for whatever reason. I tried to run the test by browsing to the node_modules/ffmetadata/test directory and running
Update: I was using node v0.10.22. I since upgraded to v0.10.33, but the error persists. |
Before running tests install |
@azcn2503 to run tests, run The output form ffmpeg looks alright at first glance. There could be a problem with the parsing of the output. Maybe try to see what's going on around here. Have you tried the same exact mp3 file on osx and it works? |
@azcn2503: Did you ever get this working? If you can share the mp3 file with me I can try to debug it locally. |
Apologies for the delay, I'm traveling for the next few weeks and will try
|
I had the same issue on windows 10. A quick change on line 118 to change the detached value from true, to false fixed it for me:
|
I'm not sure why |
@parshap Please merge the pr. |
read is returning an empty object when used on Windows. ffmpeg was installed using chocolatey, so this should have taken care of dependencies. I am able to use read on the same file successfully on the Mac, with ffmpeg installed via homebrew. Is there some additional configuration required on Windows for it to work?
The text was updated successfully, but these errors were encountered: