diff --git a/README.md b/README.md new file mode 100644 index 0000000..f23a6ed --- /dev/null +++ b/README.md @@ -0,0 +1,33 @@ +# MediaCurator + +MediaCurator is a Python command line tool to manage a media database. +* List all the video's and their codecs with or without filters +* Batch recode videos based on filters: extentions, codecs ... + +## Installation + +This package will only work on Linux and requires FFMPEG installed. For now it will be distributed on github on [GitHub](https://github.com/fabquenneville/MediaCurator.git) + +Installation: +```bash +git clone https://github.com/fabquenneville/MediaCurator.git +cd MediaCurator +pip install -r requirements.txt + +``` + +## Usage + +```bash +./converter.py list -any -old -dir /mnt/media/TV\ Shows/ >> ../medlist.txt +./converter.py convert -del -any -mpeg4 -dir "/mnt/media/Movies/" +./converter.py convert -del -all_avi -verbose -dir "/mnt/media/Movies/" +``` + +## Contributing +Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change. + +Please make sure to update tests as appropriate. + +## License +[GNU GPLv3](https://choosealicense.com/licenses/gpl-3.0/) \ No newline at end of file diff --git a/converter.py b/converter.py index 9f31bdb..e02834b 100755 --- a/converter.py +++ b/converter.py @@ -129,6 +129,12 @@ def get_videolist(parentdir): if "-mpeg4" in sys.argv: videolist = get_mpeg4(videolist) + + if "-wmv3" in sys.argv: + videolist = get_wmv3(videolist) + + if "-x264" in sys.argv: + videolist = get_x264(videolist) return videolist @@ -138,8 +144,11 @@ def get_old(videolist_temp): def get_mpeg4(videolist_temp): return [video for video in videolist_temp if get_codec(video) in ["mpeg4", "msmpeg4v3"]] -def get_mpeg4(videolist_temp): - return [video for video in videolist_temp if get_codec(video) in ["mpeg4"]] +def get_wmv3(videolist_temp): + return [video for video in videolist_temp if get_codec(video) in ["wmv3"]] + +def get_x264(videolist_temp): + return [video for video in videolist_temp if get_codec(video) in ["x264"]] def get_codec(filename): try: