GithubHelp home page GithubHelp logo

karansthr / playlist-length Goto Github PK

View Code? Open in Web Editor NEW
28.0 28.0 5.0 52 KB

A simple command line tool to get length of all the video and/or audio files in a directory and its sub-directories recursively

Home Page: https://karansthr.gitlab.io/fosstack/tips/videos-playlist-length-calculator/

License: MIT License

Python 100.00%
ffmpeg python-package

playlist-length's People

Contributors

karansthr avatar mohi7solanki avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

playlist-length's Issues

A process in the process pool was terminated abruptly while the future was running or pending

I finally got it running with python3.5 (tried for some time with python 2.7 but gave up).

I had to install python-magic and futures manually, but now I can run playlistlen --help without any import errors.

I'm getting this error now though:

$ playlistlen /volume1/video/Movies/

Filtering videos:   0%|                                                                                                                                                                                                | 0/4 [00:00<?, ?it/s]
Traceback (most recent call last):
  File "/volume1/@appstore/py3k/usr/local/bin/playlistlen", line 11, in <module>
    sys.exit(main())
  File "/volume1/@appstore/py3k/usr/local/lib/python3.5/site-packages/playlist_length/main.py", line 159, in main
    result = video_len_calculator(args.path, args.no_subdir)
  File "/volume1/@appstore/py3k/usr/local/lib/python3.5/site-packages/playlist_length/main.py", line 100, in video_len_calculator
    path = task.result()
  File "/volume1/@appstore/py3k/usr/local/lib/python3.5/concurrent/futures/_base.py", line 398, in result
    return self.__get_result()
  File "/volume1/@appstore/py3k/usr/local/lib/python3.5/concurrent/futures/_base.py", line 357, in __get_result
    raise self._exception
concurrent.futures.process.BrokenProcessPool: A process in the process pool was terminated abruptly while the future was running or pending.

Add caching

The result need to be stored on base of last modified date of directory,
example:
playlistlen ~/Videos -> gives x hours y minutes length content, then this result should be cache, and next time if someone run the command playlistlen ~/Videos then cached result should be displayed instead of calculating length of media again if the last modified time of that directory is not changed

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.