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

Fix conflicts between the format option and some codec options

  • Review changes

  • Download
  • Email patches
  • Plain diff
Open Naoto Kondo requested to merge github/fork/buresu/fix-format-option into master Jan 02, 2020
  • Overview 0
  • Commits 1
  • Pipelines 1
  • Changes 11

Environments

ffmpeg 4.2.2
ffmpeg-python 0.2.0

Details

The ffmpeg-python's format option conflicts with some ffmpeg codec options. https://www.ffmpeg.org/ffmpeg-codecs.html#Hap https://www.ffmpeg.org/ffmpeg-codecs.html#jpeg2000

For instance,

ffmpeg.input('test.mp4').output('out.mov', vcodec='hap', format='hap_q').run()

the above code returns the following error.

[NULL @ 0x7fc69c80ea00] Requested output format 'hap_q' is not a suitable output format
out.mov: Invalid argument
Traceback (most recent call last):
  File "encoder.py", line 180, in <module>
    ffmpeg.input('test.mp4').output('out.mov', vcodec='hap', format='hap_q').run()
  File "/usr/local/lib/python3.7/site-packages/ffmpeg/_run.py", line 325, in run
    raise Error('ffmpeg', out, err)
ffmpeg._run.Error: ffmpeg error (see stderr output for detail)

Looking at the ffmpeg documentation, the format option is -f and -fmt. https://www.ffmpeg.org/ffmpeg.html#toc-Main-options

I think it's better to use the same option as ffmpeg. But this PR breaks old code, so we should to be careful.

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: github/fork/buresu/fix-format-option