{ "info": { "author": "Werner Robitza", "author_email": "werner.robitza@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Topic :: Multimedia :: Video" ], "description": "FFmpeg Quality Metrics\n======================\n\n`PyPI version `__\n\nSimple script for calculating quality metrics with FFmpeg.\n\nCurrently supports PSNR, SSIM and VMAF.\n\nAuthor: Werner Robitza werner.robitza@gmail.com\n\nContents:\n\n- `Requirements <#requirements>`__\n- `Installation <#installation>`__\n- `Usage <#usage>`__\n- `Running with Docker <#running-with-docker>`__\n- `Output <#output>`__\n- `License <#license>`__\n\n--------------\n\nRequirements\n------------\n\n- Python 3.6\n- FFmpeg:\n\n - download a static build from `their\n website `__)\n - put the ``ffmpeg`` executable in your ``$PATH``\n\nOptionally, you may install FFmpeg with ``libvmaf`` support to run VMAF\nscore calculation:\n\n- Install `Homebrew `__\n- Install `this\n tap `__\n- Run ``brew install ffmpeg --with-libvmaf``.\n\nInstallation\n------------\n\n::\n\n pip install ffmpeg_quality_metrics\n\nOr clone this repository, then run the tool with\n``python -m ffmpeg_quality_metrics``\n\nUsage\n-----\n\nIn the simplest case, if you have a distorted (encoded, maybe scaled)\nversion and the reference:\n\n::\n\n ffmpeg_quality_metrics distorted.mp4 reference.avi\n\nThe distorted file will be automatically scaled to the resolution of the\nreference.\n\nSee ``ffmpeg_quality_metrics -h``:\n\n::\n\n usage: ffmpeg_quality_metrics [-h] [-n] [-v] [-ev] [-m MODEL_PATH] [-p]\n [-dps]\n [-of {json,csv}]\n dist ref\n\n positional arguments:\n dist input file, distorted\n ref input file, reference\n\n optional arguments:\n -h, --help show this help message and exit\n -n, --dry-run Do not run command, just show what would be done\n (default: False)\n -v, --verbose Show verbose output (default: False)\n -ev, --enable-vmaf Enable VMAF computation; calculates VMAF as well as\n SSIM and PSNR (default: False)\n -m MODEL_PATH, --model-path MODEL_PATH\n Set path to VMAF model file (.pkl) (default: None)\n -p, --phone-model Enable VMAF phone model (default: False)\n -dp, --disable-psnr-ssim\n Disable PSNR/SSIM computation. Use VMAF to get YUV\n estimate. (default: False)\n -s, --scaling-algorithm {fast_bilinear,bilinear,bicubic,experimental,neighbor,area,bicublin,gauss,sinc,lanczos,spline}\n Scaling algorithm for ffmpeg (default: bicubic)\n -of {json,csv}, --output-format {json,csv}\n output in which format (default: json)\n\nRunning with Docker\n-------------------\n\nIf you don\u2019t want to deal with dependencies, build the image with\nDocker:\n\n::\n\n docker build -t ffmpeg_quality_metrics .\n\nThis installs ``ffmpeg`` with all dependencies. You can then run the\ncontainer, which basically calls the Python script. To help you with\nmounting the volumes (since your videos are not stored in the\ncontainer), you can run a helper script:\n\n::\n\n ./docker_run.sh\n\nCheck the output of the above command for more help.\n\nOutput\n------\n\nJSON or CSV, including individual fields for Y, U, V, and averages, as\nwell as frame numbers.\n\nJSON example:\n\n::\n\n \u279c ffmpeg_quality_metrics test/dist-854x480.mkv test/ref-1280x720.mkv --enable-vmaf\n {\n \"vmaf\": [\n {\n \"adm2\": 0.70704,\n \"motion2\": 0.0,\n \"ms_ssim\": 0.89698,\n \"psnr\": 18.58731,\n \"ssim\": 0.92415,\n \"vif_scale0\": 0.53962,\n \"vif_scale1\": 0.71805,\n \"vif_scale2\": 0.75205,\n \"vif_scale3\": 0.77367,\n \"vmaf\": 15.44212,\n \"n\": 1\n },\n {\n \"adm2\": 0.7064,\n \"motion2\": 0.35975,\n \"ms_ssim\": 0.89806,\n \"psnr\": 18.60299,\n \"ssim\": 0.9247,\n \"vif_scale0\": 0.54025,\n \"vif_scale1\": 0.71961,\n \"vif_scale2\": 0.75369,\n \"vif_scale3\": 0.77607,\n \"vmaf\": 15.85038,\n \"n\": 2\n },\n {\n \"adm2\": 0.70505,\n \"motion2\": 0.35975,\n \"ms_ssim\": 0.89879,\n \"psnr\": 18.6131,\n \"ssim\": 0.92466,\n \"vif_scale0\": 0.5391,\n \"vif_scale1\": 0.71869,\n \"vif_scale2\": 0.75344,\n \"vif_scale3\": 0.77616,\n \"vmaf\": 15.63546,\n \"n\": 3\n }\n ],\n \"psnr\": [\n {\n \"n\": 1,\n \"mse_avg\": 536.71,\n \"mse_y\": 900.22,\n \"mse_u\": 234.48,\n \"mse_v\": 475.43,\n \"psnr_avg\": 20.83,\n \"psnr_y\": 18.59,\n \"psnr_u\": 24.43,\n \"psnr_v\": 21.36\n },\n {\n \"n\": 2,\n \"mse_avg\": 535.29,\n \"mse_y\": 896.98,\n \"mse_u\": 239.4,\n \"mse_v\": 469.49,\n \"psnr_avg\": 20.84,\n \"psnr_y\": 18.6,\n \"psnr_u\": 24.34,\n \"psnr_v\": 21.41\n },\n {\n \"n\": 3,\n \"mse_avg\": 535.04,\n \"mse_y\": 894.89,\n \"mse_u\": 245.8,\n \"mse_v\": 464.43,\n \"psnr_avg\": 20.85,\n \"psnr_y\": 18.61,\n \"psnr_u\": 24.22,\n \"psnr_v\": 21.46\n }\n ],\n \"ssim\": [\n {\n \"n\": 1,\n \"ssim_y\": 0.934,\n \"ssim_u\": 0.96,\n \"ssim_v\": 0.942,\n \"ssim_avg\": 0.945\n },\n {\n \"n\": 2,\n \"ssim_y\": 0.934,\n \"ssim_u\": 0.96,\n \"ssim_v\": 0.943,\n \"ssim_avg\": 0.946\n },\n {\n \"n\": 3,\n \"ssim_y\": 0.934,\n \"ssim_u\": 0.959,\n \"ssim_v\": 0.943,\n \"ssim_avg\": 0.945\n }\n ],\n \"input_file_dist\": \"test/dist-854x480.mkv\",\n \"input_file_ref\": \"test/ref-1280x720.mkv\"\n }\n\nCSV example:\n\n::\n\n \u279c ffmpeg_quality_metrics test/dist-854x480.mkv test/ref-1280x720.mkv --enable-vmaf -of csv\n n,adm2,motion2,ms_ssim,psnr,ssim,vif_scale0,vif_scale1,vif_scale2,vif_scale3,vmaf,mse_avg,mse_u,mse_v,mse_y,psnr_avg,psnr_u,psnr_v,psnr_y,ssim_avg,ssim_u,ssim_v,ssim_y,input_file_dist,input_file_ref\n 1,0.70704,0.0,0.89698,18.58731,0.92415,0.53962,0.71805,0.75205,0.77367,15.44212,536.71,234.48,475.43,900.22,20.83,24.43,21.36,18.59,0.945,0.96,0.942,0.934,test/dist-854x480.mkv,test/ref-1280x720.mkv\n 2,0.7064,0.35975,0.89806,18.60299,0.9247,0.54025,0.71961,0.75369,0.77607,15.85038,535.29,239.4,469.49,896.98,20.84,24.34,21.41,18.6,0.946,0.96,0.943,0.934,test/dist-854x480.mkv,test/ref-1280x720.mkv\n 3,0.70505,0.35975,0.89879,18.6131,0.92466,0.5391,0.71869,0.75344,0.77616,15.63546,535.04,245.8,464.43,894.89,20.85,24.22,21.46,18.61,0.945,0.959,0.943,0.934,test/dist-854x480.mkv,test/ref-1280x720.mkv\n\nLicense\n-------\n\nffmpeg_quality_metrics, Copyright (c) 2019 Werner Robitza\n\nPermission is hereby granted, free of charge, to any person obtaining a\ncopy of this software and associated documentation files (the\n\u201cSoftware\u201d), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be included\nin all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \u201cAS IS\u201d, WITHOUT WARRANTY OF ANY KIND, EXPRESS\nOR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\nIN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\nCLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\nTORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\nSOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/slhck/ffmpeg-quality-metrics", "keywords": "", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "ffmpeg_quality_metrics", "package_url": "https://pypi.org/project/ffmpeg_quality_metrics/", "platform": "", "project_url": "https://pypi.org/project/ffmpeg_quality_metrics/", "project_urls": { "Homepage": "https://github.com/slhck/ffmpeg-quality-metrics" }, "release_url": "https://pypi.org/project/ffmpeg_quality_metrics/0.3.6/", "requires_dist": null, "requires_python": "", "summary": "Calculate quality metrics with FFmpeg (SSIM, PSNR, VMAF)", "version": "0.3.6" }, "last_serial": 5975707, "releases": { "0.3.1": [ { "comment_text": "", "digests": { "md5": "d2760de45f7b752d8029e077aa30b261", "sha256": "084f8c0c35fdddfd7505afa515012331d7a61728fbb2a0cf3633beed8b570b4b" }, "downloads": -1, "filename": "ffmpeg_quality_metrics-0.3.1.tar.gz", "has_sig": false, "md5_digest": "d2760de45f7b752d8029e077aa30b261", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9548, "upload_time": "2019-05-25T11:31:39", "url": "https://files.pythonhosted.org/packages/99/dc/73ab8cc3ad4593c28c0f7aaced4eaf38154c71d1ea415474b8303d38c972/ffmpeg_quality_metrics-0.3.1.tar.gz" } ], "0.3.2": [ { "comment_text": "", "digests": { "md5": "7950d060c87a8dc0eca428f0c084ad92", "sha256": "1c374679478979528fe5e995c8e4913374f3e7c6d4f69ca38d43900fad4f150c" }, "downloads": -1, "filename": "ffmpeg_quality_metrics-0.3.2.tar.gz", "has_sig": false, "md5_digest": "7950d060c87a8dc0eca428f0c084ad92", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9647, "upload_time": "2019-05-25T11:44:06", "url": "https://files.pythonhosted.org/packages/55/06/75b68fd8b8ccbc6a0af6e20ee925d8ed79a0e906be92e2ad55ec3274220e/ffmpeg_quality_metrics-0.3.2.tar.gz" } ], "0.3.3": [ { "comment_text": "", "digests": { "md5": "82efabd3fcd32761fa4f420b1dbed76f", "sha256": "10bc5414145e76781dfb5bf645c9764d72d5a5cba16d4d89204403d8009b9f60" }, "downloads": -1, "filename": "ffmpeg_quality_metrics-0.3.3.tar.gz", "has_sig": false, "md5_digest": "82efabd3fcd32761fa4f420b1dbed76f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9703, "upload_time": "2019-05-25T16:03:13", "url": "https://files.pythonhosted.org/packages/d3/9b/a3cc665e31889fd205f524f5b26be7e0e7d17dc327f9a0a6bbe54f1511e7/ffmpeg_quality_metrics-0.3.3.tar.gz" } ], "0.3.5": [ { "comment_text": "", "digests": { "md5": "29b122d366b997df5096c87bcdc85470", "sha256": "f3cdbbd57e6dbd22353f6941d0fda905e2ffbb073f6148639b45555812a048ce" }, "downloads": -1, "filename": "ffmpeg_quality_metrics-0.3.5.tar.gz", "has_sig": false, "md5_digest": "29b122d366b997df5096c87bcdc85470", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9853, "upload_time": "2019-09-09T17:07:57", "url": "https://files.pythonhosted.org/packages/55/0b/1ab4de6c29507e83c04bf7003c15eb2b0064cdbdb2fb4b94fa9e6bb1d002/ffmpeg_quality_metrics-0.3.5.tar.gz" } ], "0.3.6": [ { "comment_text": "", "digests": { "md5": "2fafa8025deb53ef4bfe1ba51641dd64", "sha256": "b0797f5bf75384b5fc0e75e49e96bb26a8df95acf0a5424cc95d742617cc0ba1" }, "downloads": -1, "filename": "ffmpeg_quality_metrics-0.3.6.tar.gz", "has_sig": false, "md5_digest": "2fafa8025deb53ef4bfe1ba51641dd64", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9796, "upload_time": "2019-10-15T09:00:51", "url": "https://files.pythonhosted.org/packages/60/2e/8c5da37e6ffd05d0ddba7d38399dcf027f2f5139387b322936b481c20c5c/ffmpeg_quality_metrics-0.3.6.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "2fafa8025deb53ef4bfe1ba51641dd64", "sha256": "b0797f5bf75384b5fc0e75e49e96bb26a8df95acf0a5424cc95d742617cc0ba1" }, "downloads": -1, "filename": "ffmpeg_quality_metrics-0.3.6.tar.gz", "has_sig": false, "md5_digest": "2fafa8025deb53ef4bfe1ba51641dd64", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9796, "upload_time": "2019-10-15T09:00:51", "url": "https://files.pythonhosted.org/packages/60/2e/8c5da37e6ffd05d0ddba7d38399dcf027f2f5139387b322936b481c20c5c/ffmpeg_quality_metrics-0.3.6.tar.gz" } ] }