View Bug Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0001771 | DCP-o-matic | Bugs | public | 2020-06-20 21:40 | 2023-11-20 16:47 |
Reporter | carl | Assigned To | |||
Priority | normal | Severity | minor | Reproducibility | always |
Status | confirmed | Resolution | open | ||
Summary | 0001771: Audio artefacts at ends of audio files | ||||
Description | WAVs come from a post house split into reels, but prepared for 23.976. Then DCP-o-matic resamples them and there are discontinuities when one resampler is flushed and the next started.
When
Maybe some This was going fine in | ||||
Tags | No tags attached. | ||||
Branch | |||||
Estimated weeks required | |||||
Estimated work required | Major | ||||
|
Another idea might be Extend
where there are one or more of each, 1 decoder per 1 content. Then extend the Piece API so that it does everything currently done by calls into the content from Player. Content would be:
Tricky bits with this are:
Going reasonably OK in |
|
Probably easiest to manually rebase |
|
Made |
|
Did some work in |
|
The AudioDecoder has a Resampler. Say you have two pieces of content that are being resampled but should connect seamlessly:
When 1's decoder finishes it flushes its resampler, 2 makes a new one. This causes a slight discontinuity. ==> move the Resampler somewhere else (e.g. the player) - it used to be like this until fa4d252 ==> keep the same resampler When 1 finishes maybe it doesn't flush its resampler. Without the flush we actually emit audio up to a bit before the end of 1, then start decoding 2 and pushing its samples into the same resampler. Then stuff comes out of the resampler and this stuff should be at a time just before 2 starts, so the player discards it (since it's outside the bounds of content 2). ==> move this discarding of data back a bit Player::audio's data comes from AudioDecoder::Data emitting - so can't we stop that emitting out-of-bounds data? But the data would also be out of bounds as far as AudioDecoder is concerned, because it only knows about the one piece of content. ==> somehow coalesce the content or make it look coalesced take4 does this by changing Piece to allow multiple content with a single "special" decoder which coalesces the output of multiple "real" decoders so that their output ends up in a single AudioDecoder and hence a ===> coalesce the content at a different level, e.g. make the existing decoder able to take multiple files ...but you need a decoder for each one to discard the headers and get to the actual samples. To maintain the Player::audio semantics of "discard outside Piece::{position,end}" Piece must have multiple bits of content. But Player also decides what to pass() based on Pieces, so that means the piece must manage multiple decoders (or have a proxy decoder which does). The real question perhaps is, even after this all this preparation, where will the Resampler end up? ===> just have one AudioDecoder shared between multiple (e.g.) FFmpegDecoders? But Resamplers are managed one-per-stream; when the AD sees data from a stream it hasn't seen before it makes a Resampler. ===> Move Resampler into Piece? Piece would need _positions. Maybe workable? ===> Just noticed the stuff in FFmpegDecoder::flush to round lengths up to the next video frame and so on. Then the resamplers are flushed... dubious... but maybe OK (the video frame round-up will have to go). AudioDecoder would not resample; would store stream positions in content frames. Piece soon becomes a sort of decoder; e.g. when the last of its decoders flushes it needs to flush the resamplers; Player must listen to Though in fact it's probably neater if Player listents to |
|
More and more this seems like a crazy amount of work for a relatively small bug; to trigger it requires not only post-production at the wrong frame rate (as if the content were not intended for DCP) but also in reels (as if it were for DCP). There's also a high risk of things breaking as a result. Pros of merging before 2.16.0:
Cons:
Although if the idea is to release 2.18.0 soon it may not be so bad if there's a divergence. |
|
State as of now is that most tests pass; one notable exception is content_test6. It seems like we should do the stuff in |
|
Either way this definitely feels now like far too much for 2.16.0. |
Date Modified | Username | Field | Change |
---|---|---|---|
2020-06-20 21:40 | carl | New Bug | |
2020-06-20 21:44 | carl | Description Updated | |
2020-06-20 21:44 | carl | Estimated work required | => Undecided |
2020-06-21 20:09 | carl | Description Updated | |
2020-06-23 21:03 | carl | Note Added: 0003848 | |
2020-06-23 21:03 | carl | Note Edited: 0003848 | |
2020-06-23 23:27 | carl | Note Edited: 0003848 | |
2020-07-05 23:34 | carl | Status | new => confirmed |
2020-07-05 23:35 | carl | Note Edited: 0003848 | |
2020-08-18 23:29 | carl | Estimated work required | Undecided => Major |
2021-04-22 21:31 | carl | Tag Attached: alpha-1-blocker | |
2021-04-22 22:38 | carl | Note Added: 0004287 | |
2021-04-22 23:32 | carl | Note Added: 0004291 | |
2021-04-24 23:07 | carl | Note Added: 0004296 | |
2021-04-26 23:53 | carl | Note Added: 0004300 | |
2021-04-26 23:53 | carl | Note Edited: 0004300 | |
2021-04-26 23:54 | carl | Note Edited: 0004300 | |
2021-04-26 23:54 | carl | Note Edited: 0004300 | |
2021-04-26 23:55 | carl | Note Edited: 0004300 | |
2021-04-26 23:55 | carl | Note Edited: 0004300 | |
2021-05-05 22:48 | carl | Note Added: 0004307 | |
2021-05-06 00:17 | carl | Note Edited: 0004307 | |
2021-05-06 23:27 | carl | Note Added: 0004310 | |
2021-05-06 23:27 | carl | Note Edited: 0004310 | |
2021-05-06 23:28 | carl | Note Added: 0004311 | |
2021-05-06 23:28 | carl | Target Version | 2.16.0 => 2.18.0 |
2021-05-06 23:28 | carl | Tag Detached: alpha-1-blocker | |
2022-09-10 21:39 | carl | Target Version | 2.18.0 => |
2023-09-26 22:15 | carl | Priority | immediate => normal |