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

Add audio metadata filter #281

Merged
merged 5 commits into from Jan 13, 2017

Conversation

Projects
None yet
2 participants
@shadrech
Copy link

shadrech commented Jan 9, 2017

Q A
Bug fix? no
New feature? yes
BC breaks? no
Deprecations? no
Fixed tickets fixes #175 #120
Related issues/PRs #issuenum
License MIT

What's in this PR?

Adds a new Audio Filter. Using ffmpeg -metadata utility we can set metadata values such as title, artist, album etc...
Filter also can add image files to audio files (album artwork)
By not supplying an argument to the filter, it will remove all metadata, including previously set artworks

Why?

A simple way to add metadata or album artwork to audio files

Example Usage

$ffmpeg = new FFMpeg\FFMpeg::create();
$audio = $ffmpeg->open($file_path);
$audio->addMetadata([
    "title" => "Some Title",
    "album" => "Some Album",
    "artwork" => "/path/to/some/file.jpg"
]);

@shadrech shadrech changed the title Add audio metadata Add audio metadata filter Jan 9, 2017

@Romain

This comment has been minimized.

Copy link
Member

Romain commented Jan 9, 2017

Hi @shadrech,
Thanks for this PR!

Here are my comments:

  • I think we should make priority a parameter of your class, to be able to set it. This what is done with all the other filters. This would allow us to be consistent all over our filters

Otherwise, it looks good to me. Nice job.

@Romain Romain added the Feature label Jan 9, 2017

@shadrech

This comment has been minimized.

Copy link

shadrech commented Jan 9, 2017

Done. Let me know if that will do @Romain

shadrech shadrech
@Romain

This comment has been minimized.

Copy link
Member

Romain commented Jan 9, 2017

@shadrech Looks good to me! Thanks

@shadrech

This comment has been minimized.

Copy link

shadrech commented Jan 9, 2017

@Romain Let me know (I'm kinda new to open source contribution). What happens now? Do I have to pull in the branch I've made manually to access the new filter or will it be merged to the master branch? Thanks

@Romain

This comment has been minimized.

Copy link
Member

Romain commented Jan 10, 2017

Now someone needs to merge your branch. I've asked @romainneutron if he's ok with your contribution. I can do it, but since I'm new to administrating this bundle, I prefer to refer to him for now.

Then, once it's merged, you can delete your branch, but github will invite you to do so.

Then, I think that Romain needs to prepare a new version with the feature, for it to be available on Packagist.

@Romain Romain merged commit 8577cdb into PHP-FFMpeg:master Jan 13, 2017

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment