{ "info": { "author": "Edward Anderson", "author_email": "edward.anderson@bfi.org.uk", "bugtrack_url": null, "classifiers": [], "description": "FFfilter\n========\n\nFilters media files by testing criteria against header metadata\nextracted by `ffprobe `__.\n\nInstall\n-------\n\n.. code:: bash\n\n pip install fffilter\n\nDependencies\n------------\n\n- **FFfilter** uses\n `subprocess `__ to\n access the system installation of **ffprobe**.\n- `colorama `__ will be\n automatically installed by **pip**.\n\nUse\n---\n\nCommand-line tool\n~~~~~~~~~~~~~~~~~\n\n``-s`` ``--show`` *[key]*\n^^^^^^^^^^^^^^^^^^^^^^^^^\n\n**Returns a tab-separated list of all values of [key].**\n\n.. code:: bash\n\n # Return the value(s) of display_aspect_ratio\n fffilter /path/to/file --show display_aspect_ratio\n\n.. code:: bash\n\n # Return a list of files, surfacing all possible values of given keys\n # (note that '-' must be first argument when receiving piped input if using --show)\n find . -name '*.mp4' | fffilter - --show codec_name codec_type display_aspect_ratio\n\n``-m`` ``--match`` *[key]* *[value]*\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\n**Lists files which match all criteria:**\n\n- matching files are listed on ``stdout``\n- non-matching files are listed on ``stderr``, printed over a red\n background\n\nSimply pass key and value pairs to repeating occurrences of the\n``--match`` parameter.\n\n.. code:: bash\n\n # Return absoulte path for file if its header declares 4:3 aspect\n fffilter /path/to/file --match display_aspect_ratio 4:3\n\n.. code:: bash\n\n # Filter a list of files for h.264-encoded full-HD mp4s\n find . -name '*.mp4' | fffilter --match codec_name h264 --match height 1080 --match width 1920 -\n\nModule\n~~~~~~\n\n.. code:: python\n\n from fffilter import fffilter\n\n path = 'media/some_file.mp4'\n\n # The show() method requires a path and a list of keys\n d = fffilter.show(path, ['codec_type', 'display_aspect_ratio'])\n\n # The match() method requires a path and either key=value pairs or a packed dictionary: **{'key':'value'}\n m = fffilter.match(path, codec_type='video', display_aspect_ratio='16:9')\n\n print(d)\n print(m)\n\n::\n\n {'display_aspect_ratio': [u'16:9'], 'codec_type': [u'audio', u'video']}\n True\n\nYou can also call ``ffprobe(path)`` to access a dictionary of the\ncomplete headers:\n\n.. code:: bash\n\n headers = fffilter.ffprobe(path)\n print(headers)\n\n::\n\n {u'streams': [{u'pix_fmt': u'yuv420p', u'sample_aspect_ratio': u'1:1', u'refs': 1, u'codec_type': u'video', u'coded_height': 720\n ...\n\nDisclaimer\n----------\n\nThis Python Package is not affiliated with\n`FFmpeg `__ or\n`FFprobe `__.\n\nCredits\n-------\n\n**FFfilter** was written by `Edward\nAnderson `__, British Film Institute.\n\nLicence\n-------\n\n`Attribution-NonCommercial-ShareAlike 4.0 International (CC BY-NC-SA\n4.0) `__", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "", "keywords": "", "license": "Attribution-NonCommercial-ShareAlike 4.0 International (CC BY-NC-SA 4.0)", "maintainer": "", "maintainer_email": "", "name": "FFfilter", "package_url": "https://pypi.org/project/FFfilter/", "platform": "", "project_url": "https://pypi.org/project/FFfilter/", "project_urls": null, "release_url": "https://pypi.org/project/FFfilter/0.0.3/", "requires_dist": null, "requires_python": "", "summary": "Filters media files by testing criteria against header metadata extracted by ffprobe.", "version": "0.0.3" }, "last_serial": 3004098, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "91829c4382f3d5c3353586fd873f8213", "sha256": "2473e5db9c78b0810b556735b338946b783ccc635202fb4a9ae7be6a74a1f5e4" }, "downloads": -1, "filename": "FFfilter-0.0.1-py2-none-any.whl", "has_sig": false, "md5_digest": "91829c4382f3d5c3353586fd873f8213", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": null, "size": 6526, "upload_time": "2017-07-06T16:43:03", "url": "https://files.pythonhosted.org/packages/86/6a/c0cd7266cd3109af49e0ff41d2868ecb833ea8db5722af132d137879286c/FFfilter-0.0.1-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "5f5e271f17c33dbb2daea0b0646df730", "sha256": "4ab2b549063effbc9c6b8bcf41918dcdc04926c5bd6349112e60c9528484fb8f" }, "downloads": -1, "filename": "FFfilter-0.0.1.tar.gz", "has_sig": false, "md5_digest": "5f5e271f17c33dbb2daea0b0646df730", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3704, "upload_time": "2017-07-06T16:43:06", "url": "https://files.pythonhosted.org/packages/c1/cc/6e0ad0c8ed008229eb5daa542798a821cbd8aede243fa59a62ddd4f245c0/FFfilter-0.0.1.tar.gz" } ], "0.0.2": [ { "comment_text": "", "digests": { "md5": "62b7eb84270395a26e4cfd56315a436e", "sha256": "3d254b603b66346a072a2123c0b9defc2dcfbe8e0fe1a70ac3138b7b7d776c69" }, "downloads": -1, "filename": "FFfilter-0.0.2.tar.gz", "has_sig": false, "md5_digest": "62b7eb84270395a26e4cfd56315a436e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4083, "upload_time": "2017-07-06T17:01:39", "url": "https://files.pythonhosted.org/packages/52/df/768dfddd07ce4471a2b93eceb22216b6248dafe8dbf9b026ba9d3cfa95a9/FFfilter-0.0.2.tar.gz" } ], "0.0.3": [ { "comment_text": "", "digests": { "md5": "d5a661461da9c77b108bd6f57b10c383", "sha256": "f00c4b9f3394497b091963d7092ed5669cc30ad8f41bd307ac94a38c7bebf44a" }, "downloads": -1, "filename": "FFfilter-0.0.3.tar.gz", "has_sig": false, "md5_digest": "d5a661461da9c77b108bd6f57b10c383", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4032, "upload_time": "2017-07-06T17:13:13", "url": "https://files.pythonhosted.org/packages/62/e0/cdecb38eb6aa056a9fe32df1f632cfcb3ec85d9a375ef147bca49d1a459a/FFfilter-0.0.3.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "d5a661461da9c77b108bd6f57b10c383", "sha256": "f00c4b9f3394497b091963d7092ed5669cc30ad8f41bd307ac94a38c7bebf44a" }, "downloads": -1, "filename": "FFfilter-0.0.3.tar.gz", "has_sig": false, "md5_digest": "d5a661461da9c77b108bd6f57b10c383", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4032, "upload_time": "2017-07-06T17:13:13", "url": "https://files.pythonhosted.org/packages/62/e0/cdecb38eb6aa056a9fe32df1f632cfcb3ec85d9a375ef147bca49d1a459a/FFfilter-0.0.3.tar.gz" } ] }