Added more filters and README
This commit is contained in:
parent
d29bf1ab9e
commit
1c383a582e
33
README.md
Normal file
33
README.md
Normal file
@ -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/)
|
||||||
13
converter.py
13
converter.py
@ -129,6 +129,12 @@ def get_videolist(parentdir):
|
|||||||
|
|
||||||
if "-mpeg4" in sys.argv:
|
if "-mpeg4" in sys.argv:
|
||||||
videolist = get_mpeg4(videolist)
|
videolist = get_mpeg4(videolist)
|
||||||
|
|
||||||
|
if "-wmv3" in sys.argv:
|
||||||
|
videolist = get_wmv3(videolist)
|
||||||
|
|
||||||
|
if "-x264" in sys.argv:
|
||||||
|
videolist = get_x264(videolist)
|
||||||
|
|
||||||
return videolist
|
return videolist
|
||||||
|
|
||||||
@ -138,8 +144,11 @@ def get_old(videolist_temp):
|
|||||||
def get_mpeg4(videolist_temp):
|
def get_mpeg4(videolist_temp):
|
||||||
return [video for video in videolist_temp if get_codec(video) in ["mpeg4", "msmpeg4v3"]]
|
return [video for video in videolist_temp if get_codec(video) in ["mpeg4", "msmpeg4v3"]]
|
||||||
|
|
||||||
def get_mpeg4(videolist_temp):
|
def get_wmv3(videolist_temp):
|
||||||
return [video for video in videolist_temp if get_codec(video) in ["mpeg4"]]
|
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):
|
def get_codec(filename):
|
||||||
try:
|
try:
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user