Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • F ffmpeg-python
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 402
    • Issues 402
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 34
    • Merge requests 34
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Karl Kroening
  • ffmpeg-python
  • Merge requests
  • !20

Add support for multi-output filters; implement `split` filter

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Karl Kroening requested to merge feature/17 into master Jul 06, 2017
  • Overview 10
  • Commits 17
  • Pipelines 0
  • Changes 10

The split operator now does the right thing:

import ffmpeg

overlay_file = ffmpeg.input('overlay.png')
split = (ffmpeg
    .input('input.mp4')
    .hflip()
    .split()
)
(ffmpeg
    .concat(
        split[0].vflip(),
        split[1]
    )
    .output('out.mp4')
)
screen shot 2017-07-06 at 3 55 28 am

This paves the way to having both multi-input and multi-output components. To access particular outputs of a multi-output node, use either the .stream function or bracket shorthand:

split = in.split()
split0 = split.stream(0)
split1 = split[1]

I decided to forego the automatic split stuff for now. It was probably more work to add multi-output support right away, but I think it's more correct in the long run. The automatic splitting will eventually happen as a pre-processing step and produce the same kind of graph as though the split were inserted manually.

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: feature/17