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
  • Issues
  • #137
Closed
Open
Issue created Oct 31, 2018 by Administrator@rootContributor

Support for concat 'demuxer' instead of concat filter?

Created by: ahshah

Hi folks,

Thank you for creating ffmpeg-python! I'm running a very simple concat operator using ffmpeg-python like so:

def concatVideos(args):
files = []
streams =[]
for fileName in os.listdir(args.directorySrc):
    files.append(fileName)
    fileName = os.path.join(args.directorySrc, fileName)
for f in files:
    streams.append(ffmpeg.input(fileName))

dest = '/home/user/full.mp4'
ffmpeg.concat(*streams).output(dest).run()

And its running super slow, here is the output i see from my script:

[Parsed_concat_0 @ 0x560af8a22460] Buffer queue overflow, dropping.=6348.7kbits/s speed=0.324x
 Last message repeated 17 times
[Parsed_concat_0 @ 0x560af8a22460] Buffer queue overflow, dropping.=5929.5kbits/s speed=0.328x
 Last message repeated 29 times
[Parsed_concat_0 @ 0x560af8a22460] Buffer queue overflow, dropping.=6091.4kbits/s speed=0.335x

When I run the same concatenation from command line:

 $ cat /tmp/filelist
 file '/mnt/smb/src/18.10.27_121205.mp4'
 file '/mnt/smb/src/18.10.27_123438.mp4'
 file '/mnt/smb/src/18.10.27_131923.mp4'
 $ ffmpeg -f concat -safe 0 -i /tmp/filelist  -c copy full.mp4

I get a much faster operation:

frame=10218 fps=2243 q=-1.0 Lsize=  522251kB time=00:02:50.43 bitrate=25101.8kbits/s speed=37.4x

Turns out the command line version is using the concat 'demuxer' which is significantly faster, this is documented here: https://trac.ffmpeg.org/wiki/Concatenate Curious if ffmpeg-python has any support for this type of speedy operation :)

Assignee
Assign to
Time tracking