8000 Add `.audio` + `.video` operators by kkroening · Pull Request #212 · kkroening/ffmpeg-python · GitHub
[go: up one dir, main page]

Skip to content

Add .audio + .video operators #212

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

Merged
merged 2 commits into from
Jun 3, 2019
Merged

Add .audio + .video operators #212

merged 2 commits into from
Jun 3, 2019

Conversation

kkroening
Copy link
Owner
@kkroening kkroening commented Jun 3, 2019

This adds some shorthand operators for dealing with audio/video sub-streams.

Old:

input = ffmpeg.input('in.mp4')
audio = input['a'].filter("aecho", 0.8, 0.9, 1000, 0.3)
video = input['v'].hflip()
out = ffmpeg.output(audio, video, 'out.mp4')

New:

input = ffmpeg.input('in.mp4')
audio = input.audio.filter("aecho", 0.8, 0.9, 1000, 0.3)
video = input.video.hflip()
out = ffmpeg.output(audio, video, 'out.mp4')

The old method still works and is equivalent, but the new is probably more intuitive for most use cases.

@kkroening kkroening merged commit a3bac57 into master Jun 3, 2019
@kkroening kkroening deleted the av-ops branch June 3, 2019 06:53
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

Successfully merging this pull request may close these issues.

1 participant
0