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
  • #733
Closed
Open
Issue created Jan 05, 2023 by Kevin M@sylikc

Sorted keys causes arguments to get jumbled

https://github.com/kkroening/ffmpeg-python/blob/df129c7ba30aaa9ffffb81a48f53aa7253b0b4e6/ffmpeg/_utils.py#L97

Is there a reason this function has to sort keys?

I ask because, ffmpeg is pretty sensitive to the ordering of keys. I'm trying to run this command:

probe = ffmpeg.probe("o2.mp4", skip_frame="nokey", select_streams="v", show_frames=None, show_entries="frame=pts_time,pkt_dts_time,best_effort_timestamp_time")

The argument order is causing it to come out as

ffprobe -show_format -show_streams -of json -select_streams v -show_entries frame=pts_time,pkt_dts_time,best_effort_timestamp_time -show_frames -skip_frame nokey o2.mp4

But the order that's needed to actually do the filtering is

ffprobe -show_format -show_streams -of json -select_streams v -show_frames -skip_frame nokey -show_entries frame=pts_time,pkt_dts_time,best_effort_timestamp_time o2.mp4

show_entries has to be last for the filtering to actually apply

Can sorted() be removed without breaking something else?

Assignee
Assign to
Time tracking