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
  • #200
Closed
Open
Issue created May 04, 2019 by Administrator@rootContributor

Asyncio support async/await

Created by: akolpakov

Now I'm working on Asynchronous application. And using asyncio library which is built in python3. And uses async/await syntax.

Good to have possibility to return ffmpeg process as a coroutine and use it in a asyncio way.

For example:

process = await (
    ffmpeg
    .input('input.mp4')
    .output('pipe:', format='rawvideo', pix_fmt='rgb24')['v']
    .run_asyncio(pipe_stdout=True, quiet=False)
)

while True:
    frame_bytes = await process.stdout.read(video_frame_size)
    if len(frame_bytes) == 0:
        break

await process.wait()

It would be very handy for asynchronous applications.

Assignee
Assign to
Time tracking