Movies2HDD
A simple set of python scripts and libraries to work with movies. I use it with my DreamBox.
 All Classes Namespaces Files Functions Variables Pages
convert.py
Go to the documentation of this file.
1 #! /usr/bin/env python3
2 """A simple script to convert a movie. It uses the movies2hdd library."""
3 
4 print ("Movies2HDD's convertMovie tool Copyright (C) 2013 Niklas Sombert")
5 print ("This program comes with ABSOLUTELY NO WARRANTY.")
6 print ("This is free software, and you are welcome to redistribute it")
7 print ("under certain conditions.")
8 
9 print ("")
10 
11 print ("This is _deprecated_! It will be removed when other components are ready to be used...")
12 
13 print ("")
14 
15 print("Loading libraries...")
16 from movies2hdd import Movies2HDD
17 import sys
18 import shutil
19 movie = sys.argv[1]
20 print("Moving "+movie+" to /tmp ...")
21 shutil.move(movie, "/tmp/")
22 print("Converting it...")
23 movie = movie.replace(".ts", "")
24 Movies2HDD.convertMovie(Movies2HDD(), movie)
25 print("Moving "+movie+".mpg back...")
26 shutil.move("/tmp/"+movie+".mpg", ".")