diff options
author | Martin Michlmayr <tbm@cyrius.com> | 2006-02-05 20:24:07 +0100 |
---|---|---|
committer | Martin Michlmayr <tbm@cyrius.com> | 2006-02-05 20:24:07 +0100 |
commit | 97d87e1fa0808cf747bf0a4fe3b39d1cbdb5efc8 (patch) | |
tree | c817c2371ea765b6fd6f9e47f4985209dd1937dd /jack_plugin_lame.py |
Import jack_3.1.1+cvs20050801.orig.tar.gz
[dgit import orig jack_3.1.1+cvs20050801.orig.tar.gz]
Diffstat (limited to 'jack_plugin_lame.py')
-rw-r--r-- | jack_plugin_lame.py | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/jack_plugin_lame.py b/jack_plugin_lame.py new file mode 100644 index 0000000..35a6248 --- /dev/null +++ b/jack_plugin_lame.py @@ -0,0 +1,32 @@ +### jack_plugin_lame: user-editable lame plugin for jack + +plugin_helpers = { + 'plugin_lame': { + 'type': "encoder", + 'target': "mp3", + 'inverse-quality': 1, + 'cmd': "lame --preset cbr %r --strictly-enforce-ISO %i %o", + 'vbr-cmd': "lame -V %q --vbr-new --nohist --strictly-enforce-ISO %i %o", + 'otf-cmd': "lame --preset cbr %r --strictly-enforce-ISO - %o", + 'vbr-otf-cmd': "lame -V %q --vbr-new --nohist --strictly-enforce-ISO - %o", + 'status_blocksize': 160, + 'bitrate_factor': 1, + 'status_start': "%", + 'percent_fkt': r""" +s = string.split(i['buf'], '\r') +if len(s) >= 2: s=s[-2] +if len(s) == 1: s=s[0] +if string.find(s, "%") >= 0: # status reporting starts here + y = string.split(s, "/") + y1 = string.split(y[1], "(")[0] + percent = float(y[0]) / float(y1) * 100.0 +elif string.find(s, "Frame:") >= 0: # older versions, like 3.13 + y = string.split(s, "/") + y0 = string.split(y[0], "[")[-1] + y1 = string.split(y[1], "]")[0] + percent = float(y0) / float(y1) * 100.0 +else: + percent = 0 +""", + }, +} |