Rewrite using a modular command assembler; new features include:

- "extract audio" workflow: video -> wav|ogg
 - majorly cleaned up code
 - both --audio and --video codec options now accept "copy" and "drop"
 - dropped ogv support
This commit is contained in:
Overwatch 2014-08-27 21:19:41 +02:00
parent 18c1cb920a
commit 60cb65998c
3 changed files with 200 additions and 90 deletions

16
aux.py
View file

@ -1,6 +1,8 @@
#! /bin/env python3
# encoding: utf-8
import os
import pathlib
import queue
import subprocess
import sys
@ -147,3 +149,17 @@ def parse_fps(raw):
return float(num) / float(den)
return float(raw)
# --------------------------------------------------
def to_Path(raw_path):
'''
Returns pathlib.Path pointing to raw_path, handling "~/" correctly.
To be removed after python:3.5 move.
'''
if raw_path.startswith('~'):
raw_path = os.path.expanduser(raw_path)
return pathlib.Path(raw_path)