nyanpasu64
6f284951fd
Switch user-facing code to OvgenError
2018-12-18 20:53:23 -08:00
nyanpasu64
bbdf79ffe5
Terminate ffmpeg/ffplay when cancelling GUI ovgen
2018-12-18 20:53:23 -08:00
nyanpasu64
1b63f66d47
Add Ovgen progress callbacks, switch to Arguments parameter
2018-12-18 20:53:23 -08:00
nyanpasu64
be3355b0c8
Eliminate BrokenPipeError when closing ffplay
2018-12-18 20:53:23 -08:00
nyanpasu64
cd0a998a66
Make always-dumped CorrelationTriggerConfig attributes required
...
- Update default_config() template to coincide with `always_dump`
(add buffer_falloff).
- Make `use_edge_trigger` required.
Breaks unit tests.
2018-12-06 12:33:07 -08:00
nyanpasu64
ffd92f4622
Split trigger/render_ms ( #79 )
...
Keep Config.trigger/render_width, but raise warning if encountered.
2018-12-06 12:11:39 -08:00
nyanpasu64
6d312f5de4
Improve config organization and defaults ( #84 )
...
`Config` defaults are optional attributes.
`default_config` defaults are template values.
2018-12-06 11:04:22 -08:00
nyanpasu64
d52f68a875
Appease Mypy (partly)
2018-12-05 05:14:04 -08:00
nyanpasu64
a78c3712c9
Switch from keyword_dataclasses to attrs, fix Python 3.7
...
keyword_dataclasses works on 3.6 and 3.6 only. attrs works everywhere.
Validators and converters are not used yet.
2018-11-26 18:00:30 -08:00
nyanpasu64
7da8de91a7
Add Config.render_subfps parameter to reduce CPU usage ( #77 )
...
- All frames are triggered, but only 1 in `render_subfps` frames are rendered.
- When subsampling FPS, render frames from the future to alleviate lag.
- Reorder Config, move `fps` and `render_subfps` closer to
`render_subsampling` (easier to use for me).
- Simplify output-related test code.
2018-11-25 04:43:43 -08:00
nyanpasu64
6a30cfbc83
Make Config.channels mandatory
...
See #38
2018-11-17 22:35:59 -08:00
nyanpasu64
b755cb0f12
Fix default config: Disable trigger_subsampling, increase resolution
2018-11-17 16:10:00 -08:00
nyanpasu64
0acea45908
Add separate trigger and render_subsampling configs
2018-11-17 16:10:00 -08:00
nyanpasu64
705efec0e9
Include renderer.get_frame() in renderer benchmark
2018-11-16 18:30:21 -08:00
nyanpasu64
1e471f08c4
Don't create outputs if benchmarking is enabled
2018-11-16 18:26:23 -08:00
nyanpasu64
7ce15a7f89
Merge branch 'render-refactor'
2018-11-16 17:11:52 -08:00
nyanpasu64
6d480f3f2b
Add region to collapse extra_outputs
2018-11-12 02:00:17 -08:00
nyanpasu64
f794728a99
Update comments and TODO
2018-11-12 00:46:56 -08:00
nyanpasu64
f18cc9119b
Remove unused CorrelationTrigger.save_window
2018-11-05 16:02:42 -08:00
nyanpasu64
88a79a97e8
Remove Renderer.set_colors(), move into constructor
...
Makes it simpler to create an impl which constructs all canvases
within __init__, not on first frame.
2018-11-05 15:45:38 -08:00
nyanpasu64
342752febf
Move LayoutConfig and RendererLayout to new file
2018-11-03 22:53:47 -07:00
nyanpasu64
bc042c29d7
Choose between playback and encode via CLI, not config
2018-10-31 00:32:43 -07:00
nyanpasu64
ef4c4e5011
twiddle default settings
2018-10-30 18:01:38 -07:00
nyanpasu64
0ee3f6af92
Remove LocalPostTriggerConfig from default_config (due to speed hit)
2018-10-30 18:01:38 -07:00
nyanpasu64
a8a58cb3c0
Make LocalPostTrigger quit if edge correlation is negative
2018-10-30 18:01:38 -07:00
nyanpasu64
c15334fe54
Make PostTrigger normalize input data by peaks
...
Without normalization, the stronger the data is,
the larger correlation it has with the edge trigger.
The parabolic cost function is more effective at low signal strengths.
2018-10-30 18:01:38 -07:00
nyanpasu64
3beaee923c
[wip] Add PostTrigger and LocalPostTrigger
...
A post-processing trigger should have subsampling=1,
and no more post triggers.
LocalPostTrigger uses a parabolic cost function for shifting to find
edges. It doesn't work well and needs tweaking.
2018-10-30 18:01:38 -07:00
nyanpasu64
6c4e128031
Add PerFrameCache class to cache period over multiple triggers
2018-10-30 18:01:38 -07:00
nyanpasu64
aae4646157
Properly terminate output processes (including exceptions)
2018-08-28 03:21:49 -07:00
nyanpasu64
115222b1c9
Add Config.end_time parameter
...
Useful for truncating video rendering (via FFmpegOutput), since Ctrl+C
results in broken video files.
2018-08-27 20:58:31 -07:00
nyanpasu64
ba17f64618
[wip] Fix loading YAML config from another directory
...
Bugs: FFmpeg writes to file named "-"
2018-08-27 04:48:35 -07:00
nyanpasu64
de22e277f0
Make Config.subsampling optional ( #38 )
2018-08-26 22:10:38 -07:00
nyanpasu64
95895d8a07
Reorganize Config, add global trigger_width and render_width
...
`trigger/render_width` are grouped with `width_ms`, because they modify
`width_ms`.
`trigger/render_width/trigger` are grouped together, since `channels`
can override them.
2018-08-26 01:47:23 -07:00
nyanpasu64
93af9a9a58
Add `show_internals` option to show 'window' or 'buffer'
2018-08-26 00:16:47 -07:00
nyanpasu64
494ce2bf69
Add ability to load legacy YAML files
...
Add Ignored and Alias fields to Config and CorrelationTriggerConfig.
2018-08-25 22:44:42 -07:00
nyanpasu64
a7b1c06114
Rename Channel.nsamp to window_samp
2018-08-25 18:50:57 -07:00
nyanpasu64
878d03517d
Remove debug prints, render buffer (not window).
2018-08-25 17:48:24 -07:00
nyanpasu64
88355f5cb0
Reorganize Config class.
...
Reasoning: subsampling does not affect trigger duration. Only width_ms
and channels[].width_ratio are involved.
2018-08-25 17:44:41 -07:00
nyanpasu64
a2051cc988
[wip] Add trigger_falloff parameter
2018-08-25 16:35:15 -07:00
nyanpasu64
f62b3ce471
Add debugging option to show buffers (Config.show_buffer)
2018-08-25 15:59:24 -07:00
nyanpasu64
aa3e4fb8e1
Rename RENDER_PROFILING to PRINT_TIMESTAMP
2018-08-25 15:46:39 -07:00
nyanpasu64
dbebff7439
Remove unused local variable
2018-08-25 03:16:40 -07:00
nyanpasu64
162cb453fd
Fix nsamp used for rendering, when render_subsampling > 1
2018-08-24 01:47:23 -07:00
nyanpasu64
8a781c9d3a
Disable Ovgenpy print(time) when RENDER_PROFILING=False
2018-08-24 01:04:42 -07:00
nyanpasu64
3c97c0dbcf
Raise error when constructing Ovgen with 0 channels
2018-08-24 01:03:17 -07:00
nyanpasu64
5c38445d56
Move Ovgen renderer construction to private method
2018-08-24 01:02:13 -07:00
nyanpasu64
1dc071a7de
Raise error when calling Ovgen.play() more than once
2018-08-24 00:27:06 -07:00
nyanpasu64
6d028c1dc5
Fix FPS calculation when begin_time is not 0
2018-08-24 00:25:58 -07:00
nyanpasu64
e9c0a21469
Remove unused Config.wav_prefix and update tests
...
It was intended that Channel.wav_path was stored and loaded relative to
Config.wav_prefix, but this was never implemented (neither saving nor
loading.)
This change simplifies code, and eliminates some inconsistency (Config.
master_audio was never planned to be relative to Config.wav_prefix).
2018-08-20 01:13:47 -07:00
nyanpasu64
b4104185f4
Make begin_time optional, defaulting to 0
2018-08-19 15:33:47 -07:00