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:
parent
18c1cb920a
commit
60cb65998c
3 changed files with 200 additions and 90 deletions
16
aux.py
16
aux.py
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue