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
  • !24

Add splits positional argument to specify the number of split nodes

  • Review changes

  • Download
  • Email patches
  • Plain diff
Closed Administrator requested to merge github/fork/depau-forks/splitfix into feature/17 Jul 10, 2017
  • Overview 2
  • Commits 2
  • Pipelines 0
  • Changes 2

Created by: depau

import ffmpeg

i = ffmpeg.input("test.ogg")
s = i.split(5)
l = [s[i].output("out"+str(i)) for i in range(5)]

o = ffmpeg.merge_outputs(*l)
print(o.get_args())
['-i', 'test.ogg', '-filter_complex', '[0]split=5[s0][s1][s2][s3][s4]', '-map', '[s0]', 'out0', '-map', '[s1]', 'out1', '-map', '[s2]', 'out2', '-map', '[s3]', 'out3', '-map', '[s4]', 'out4']

Split filter is now used as split=5, which works. Should be done automatically, but this works for now. I didn't want to subclass stuff as I saw you're trying to avoid that as much as possible.

We could subclass FilterNode to SplitNode and override stream to take note of how many splits are actually being done.

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: github/fork/depau-forks/splitfix