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

Possible improvement? #1

Open
brandom opened this issue Mar 7, 2014 · 3 comments
Open

Possible improvement? #1

brandom opened this issue Mar 7, 2014 · 3 comments

Comments

@brandom
Copy link

brandom commented Mar 7, 2014

Do you think it would be possible to parse the output directly from stdout rather than parsing the ffmetadata ini so that multiple input files could be processed with a single instance of ffmpeg?

This would provide a significant performance gain when reading metadata for a large collection, right?

I could probably hack on it if you can't think of any major caveats to this approach.

Ex:
ffmpeg -i 01.mp3 -i 02.mp3 -i 03.mp3..

@parshap
Copy link
Owner

parshap commented Mar 7, 2014

What do you mean by "parse the output directly from stdout rather than parsing the ffmetadata ini"? The module currently parses the ffmetadata ini output from ffmpeg stdout.

Support for multiple input files would be great though! I am not sure what the ffmpeg output would look like with multiple -i inputs, but I imagine it would just be multiple concatenated ffmetadata inis? That should be easy to parse as long as the order is consistent.

@brandom
Copy link
Author

brandom commented Mar 7, 2014

Yeah, as far as I can tell -f ffmetadata works only on the first input file so the metadata would have to be read directly from the output of ffmpeg (no -f) which would be more difficult to parse.

I am not sure what the limit of input files is, but I tested a single album with 20 songs and it was very fast. It would also save the expense of spawning huge numbers of ffmpeg processes while iterating over a large collection.

@parshap
Copy link
Owner

parshap commented Mar 7, 2014

Yeah, as far as I can tell -f ffmetadata works only on the first input file so the metadata would have to be read directly from the output of ffmpeg (no -f) which would be more difficult to parse.

Ah ok, I understand now.

I am not sure what the limit of input files is, but I tested a single album with 20 songs and it was very fast. It would also save the expense of spawning huge numbers of ffmpeg processes while iterating over a large collection.

Sounds great - I would gladly entertain a patch.

@nucleardreamer nucleardreamer mentioned this issue Jun 12, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants