{"id":20494630,"url":"https://github.com/codelucas/vsummarize","last_synced_at":"2025-04-13T17:43:03.058Z","repository":{"id":14016010,"uuid":"16717726","full_name":"codelucas/vsummarize","owner":"codelucas","description":"[OUT OF DATE] I only made this repo public since I'm out of Github credit, don't use it.","archived":false,"fork":false,"pushed_at":"2022-06-21T21:14:32.000Z","size":27262,"stargazers_count":21,"open_issues_count":4,"forks_count":5,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-27T08:45:07.094Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"MovingBlocks/TerasologyLauncher","license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/codelucas.png","metadata":{"files":{"readme":"README.rst","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-02-11T03:13:15.000Z","updated_at":"2025-03-07T19:28:26.000Z","dependencies_parsed_at":"2022-09-20T12:43:24.682Z","dependency_job_id":null,"html_url":"https://github.com/codelucas/vsummarize","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codelucas%2Fvsummarize","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codelucas%2Fvsummarize/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codelucas%2Fvsummarize/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codelucas%2Fvsummarize/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/codelucas","download_url":"https://codeload.github.com/codelucas/vsummarize/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248710435,"owners_count":21149189,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-15T17:42:15.919Z","updated_at":"2025-04-13T17:43:03.012Z","avatar_url":"https://github.com/codelucas.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"Pythonic Video summarization\n----------------------------\n\nSick of nlp text summarization? Presenting: **video summarization**!\n\nWe take advantage of youtube's comment timestamp video references to generate\na summarized + shorter video from any youtube video.\n\nA glance:\n---------\n\n.. code-block:: pycon\n\n    \u003e\u003e\u003e import vsummarize\n\n    \u003e\u003e\u003e data = vsummarize.summarize('http://youtube.com/watch?v=...', output='shorter.mp4')\n\nAfter this command, the physical summarized ``.mp4`` is now in the output path \nyou provided. We return some meta data incase you need it.\n\nTimestamps from youtube comments are included and are important b/c our \nalgorithm generates summaries via the comments and their timestamps.\n\n.. code-block:: pycon\n\n    \u003e\u003e\u003e print data.hot_clips\n    [('0:12', '0:16'), ..., ('12:31', '13:01')]\n\n    \u003e\u003e\u003e print data.timestamps \n    ['0:12', '0:12', '0:14', ..., '12:31']\n\n    \u003e\u003e\u003e print data.duration # in seconds\n    65 \n\nA demo:\n-------\n\nI tested this software on a 1 hour long Obama speech.\n\nOriginal video (59 minutes): http://www.youtube.com/watch?v=hed1nP9X7pI\n\nSummarized video (3:30 minutes): http://www.youtube.com/watch?v=aDYDN9lsSHg\n\nA lot of the time, (even in my product www.shorten.tv), \nyou just want a list of hot video clips instead of physically summarizing\na video into a new ``.mp4`` because of the resource consumption.\n\nTo do this, simply ignore the output video file parameter.\n\n.. code-block:: pycon\n\n    \u003e\u003e\u003e data = vsummarize.summarize('http://youtube.com/watch?v=...')\n\n    \u003e\u003e\u003e print data.hot_clips\n    [('0:12', '0:16'), ..., ('12:31', '13:01')]\n\n\nThe physical, summarized ``.mp4`` has NOT been generated. We just\nretrieved a set of meta data of what would have happened if we did\nsummarize it.\n\nTo actually generate a summary, we use **ffmpeg + moviepy**\nalong with the above ``.hot_clips`` video sequences to stitch together the video.\n\nFeatures\n--------\n\n- ``.mp4`` video summarization\n- youtube comments timestamp extraction\n- youtube video hot timestamp extraction\n- youtube video hot sub-clip extraction\n\nGet it now\n----------\n\nBecause I use both OSX and Ubuntu, I have clear instructions on setting\nup this project in both platforms. However, I can't guarantee\nanything for the other platforms besides give installation advice.\n\nWe use ``moviepy``, the python video manipulation library, which in turn depends \non the ``ffmpeg`` library.\n\nBe sure you have `pip \u003chttp://www.pip-installer.org/\u003e`_.\n\nThe installation instructions are as follows:\n\n**OSX**:\n\n::\n\n    $ brew install ffmpeg\n\n\n**Ubuntu**:\n\n::\n\n    $ curl -O http://ffmpeg.gusari.org/static/64bit/ffmpeg.static.64bit.2014-02-28.tar.gz\n    $ tar -zxvf ffmpeg.static.64bit.2014-02-28.tar.gz \n    $ sudo mv ffmpeg ffprobe /usr/local/bin/.\n    $ rm ffmpeg.static.64bit.2014-02-28.tar.gz \n\n\nAnd lastly, don't forget to install ``vSummarize`` itself!\n\n::\n\n    $ pip install vsummarize\n\n\n**This app uses the google gdata api**. I have a file named ``settings.py`` which contains\nmy personal api keys. I've removed that file from this repo for obvious\nreasons but i've included a file called ``rename_to_settings.py`` which has two api key\nvalues for you to cleanly fill out. Also, please rename that file to ``settings.py`` after\nyou are finished!\n\n\nWarning\n-------\n\nBecause this is such a resource intensive task \u0026 lib (especially if you are\nactually using the summarized ``.mp4`` generation feature), you may notice on a few\nvideos the ``.mp4`` generation fail due to an *OS memory exception*. This means\nthat you don't have the RAM for ``ffmpeg`` to fork processes to subchunk out your video.\n\n\nLicense\n-------\n\nAuthored and maintained by `Lucas Ou-Yang`_.\nShoutout to `Zulko`_ for helping code and giving advice to \nsome parts of this project.\n\nWe use `moviepy`_ and `ffmpeg`_ for video manipulation.\nWe also use google's youtube api.\nPlease feel free to `email \u0026 contact me`_ if you run into issues or just would like\nto talk about the future of this library!\n\n.. _`Lucas Ou-Yang`: http://codelucas.com\n.. _`email \u0026 contact me`: mailto:lucasyangpersonal@gmail.com\n.. _`moviepy`: https://github.com/Zulko/moviepy \n.. _`ffmpeg`: http://www.ffmpeg.org/ \n.. _`Zulko`: https://github.com/Zulko\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodelucas%2Fvsummarize","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcodelucas%2Fvsummarize","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodelucas%2Fvsummarize/lists"}