Commit Graph

103 Commits

Author SHA1 Message Date
Robin Gareus
ec32d22cb3 Vapor: Prototype LV2 export extension 2024-01-06 20:22:39 +01:00
Robin Gareus
305606ed24 Document export-graph signal flow 2023-03-25 18:24:06 +01:00
Robin Gareus
4b5333a721 Disambiguate export formats with different encoder settings
Disambiguate export formats with different encoder
qualities, sample-formats or settings (wav/bwav).

This allows to export multipe mp3 with different bitrates.
2023-03-25 06:43:46 +01:00
Paul Davis
b35518e212 switch from boost::{shared,weak}_ptr to std::{shared,weak}_ptr
This is mostly a simple lexical search+replace but the absence of operator< for
std::weak_ptr<T> leads to some complications, particularly with Evoral::Sequence
and ExportPortChannel.
2023-03-24 14:19:15 -06:00
Robin Gareus
c635d15cf0 Use pipe with CmdPipeWriter (see b8d07b8) 2023-01-16 16:41:28 +01:00
Robin Gareus
b8d07b8be2 Export CmdPipeWriter: add option to use tmpfile
Investigate issues with mp3 export (#9193)
2023-01-16 05:10:32 +01:00
Robin Gareus
88a2c1123d Fix windows builds, export pipe (amend 7ffd7a8c) 2023-01-08 17:09:55 +01:00
Robin Gareus
7ffd7a8c62 Convert filename for Windows commandline 2023-01-07 22:36:17 +01:00
Robin Gareus
27e136dcfc Cont'd tweaks of ffmpeg export pipe 2023-01-05 03:32:40 +01:00
Robin Gareus
bb4394b8a5 Use pipe through ffmpeg, use glib to write output
This is intended to fix an issue with odd filenames on Windows,
particularly forward and backwards single quotes as part of a filename.

Previously the filename was passed as parameter to ffmpeg as
UTF-8 string to SystemExec::make_wargs, which is fragile on Windows
in absence of a execve() call.
2023-01-04 17:26:43 +01:00
Robin Gareus
211ff64e7d Prepare for ogg/opus encoding 2022-12-05 23:43:34 +01:00
Mads Kiilerich
5ff1f28af8 Introduce internal MP3 support using libsndfile 1.1.0+ 2022-11-04 21:22:02 +01:00
Mads Kiilerich
6531b24e9a ExportGraphBuilder: fix invalid use of SF_FORMAT as a bitfield
Apply SF_FORMAT_SUBMASK before comparing with the expected value.

It seems like it accidentally used to work correctly for all supported
libsndfile formats anyway.

But: It seems unfortunate to hardcode Vorbis in this place. Other
formats with quality control would have to be added to the list too. It
would be nice to do use something like has_codec_quality ...
2022-11-04 03:52:45 +01:00
Robin Gareus
0f2c3bf9c9 Fix mp3 export on big-endian systems 2022-06-20 16:05:28 +02:00
Robin Gareus
f6e67875f4 Implement MIDI ExportGraph processing 2022-05-16 04:54:17 +02:00
Robin Gareus
4c4ab9cf51 Prepare PortExportChannel API for MIDI export 2022-05-16 04:54:17 +02:00
Robin Gareus
8c7157df6c Ignore LD-environment for mp3 im/export
This fixes mp3 export on Linux/ARM (Raspberry Pi) with
system-wide dynamically linked ffmpeg. Otherwise the there
would be library conflicts with ardour-bundled libz and libcairo.
2022-04-01 18:19:59 +02:00
Robin Gareus
0937c7cabe Work-around emit Session::Exported signal for all exported files
This will eventually have to be fixed, currently split-channel
files are not correctly tagged and post process commands
are only emitted for the last file.

But fixing this is complicated, so meanwhile a workaround is used.
Eventually this commit should be [mostly] reverted!
2022-03-11 04:55:24 +01:00
Robin Gareus
7f3681c7ac Scale export-analysis dataset 2021-12-24 21:59:03 +01:00
Robin Gareus
a8c47da364 Fix realtime export loudness normalization
TmpFileRt::get_samples_written() returns the number of
samples written *to disk*. It is only valid after the FileFlushed
signal is emitted.

This fixes an assert() with Limiter and Analyzer being configured
with a too low total sample-count, leading to an overflow in
the analysis graph array.
2021-04-29 19:05:09 +02:00
Robin Gareus
725c00236c Disambiguate export formats with same loudness but different true-peal
Amend 75829d20f2
2021-04-16 04:29:16 +02:00
Robin Gareus
c4f0393cf9 Keep track of export-limiter redux 2021-04-12 23:15:30 +02:00
Robin Gareus
89a65f76b0 Update analysis duration when post-processing
This prevents the need to re-bin data in case silence is
trimmed at start or end of the export.
2021-04-12 23:15:30 +02:00
Robin Gareus
75829d20f2 Overhaul export loudness normalization
* Fix exporting multiple formats with different
  normalization settings or demo-noise settings
* Add true-peak limiter (based on x42-limiter dpl.lv2)
* Optionally use a limiter for loudness normalization
* Fall back to short-term loudness when normalizing
  material too short for integrating loudness.
2021-04-12 23:15:30 +02:00
Robin Gareus
9d119b5ac5 Allow export-graph for analysis only
This is in preparation for #8318 to allow loudness analysis
of an export-range without actually writing a file.
2020-07-19 20:43:35 +02:00
Robin Gareus
23feb0491e Remove using std::min/max from header 2020-06-18 01:05:48 +02:00
Robin Gareus
f89e72d86d Cont'd backend support for demo-noise 1e7207f9ec 2020-06-05 02:29:20 +02:00
Robin Gareus
1e7207f9ec Add export spec support for watermark/demo-noise 2020-06-04 21:20:32 +02:00
Robin Gareus
dd46dfe8d2 Fix potential deadlock when exporting w/normalizing
start_post_processing() may be called from the freewheeling
callback, when starting to normalize.
2020-03-06 21:34:55 +01:00
Robin Gareus
751f9f9654 Fix export alignment (#7916)
Ardour's playback is aligned to master-out:
 "When the playback clock reads 01:00:00:00, the sample corresponding
  to 01:00:00:00 is audible at the speaker(s)"

When exporting, and grabbing data from output ports, the signal
is offset by the master-bus physical playback latency. This was
compensated for, but lead to initial silence in the exported file.

New approach is to start capturing export data during pre-roll,
at the time when playback is written to the output buffers.

To also shaves off a common offset to make this work with
realtime export. Effectively this emulates processing with
disconnected master-output port, while still keeping any
latency of effects on the master-bus itself.

Last but not least: jack updates latencies when freewheeling,
(setting HW latency to zero). The callback arrives asynchronously
some time after enabling freewheeling, but after Export
Ports have been configured. Those callbacks are ignored.
2020-03-06 01:49:48 +01:00
Robin Gareus
1851440863 Fix realtime export of multiple time-spans
After exporting a time-span, the next time-span was started
directly from the rt-callback. This had various issues.
In particular with realtime export.

Post-processing of a realtime-export enables freewheeling
and is driven by freewheel callbacks. Freewheeling needs to be
safely disabled for an upcoming realtime export.

A similar issues existed when mixing realtime and non-realtime exports.
2020-03-06 01:49:44 +01:00
Robin Gareus
1b20e1ef1d Re-order includes
* external, system-wide first <>
* next "pbd/*"
...
2019-09-18 04:15:02 +02:00
Robin Gareus
a22f918d9d Update libardour GPL boilerplate and (C) from git log 2019-08-03 15:53:16 +02:00
Robin Gareus
df8097e31e Fix mp3 export
For reasons yet to be investigated, closing stderr when using a
pipe into ffmpeg results in ffmpeg's stderr being written
verbatim in the output file.
2019-03-07 23:51:01 +01:00
Robin Gareus
e1ffe7857f Use enum for exec stderr parameter (1/2) 2019-03-05 22:49:15 +01:00
Robin Gareus
267dfea02c Disable ffmpeg/metadata by default, use "tag-metadata" 2019-02-26 17:01:37 +01:00
Robin Gareus
bc9bf87dde Debug AudioGrapher::CmdPipeWriter<> command 2019-02-26 17:01:37 +01:00
Robin Gareus
04fe6d6fb4 Amend prev. commit, actually remove (1.0 - x) as was documented 2018-11-22 21:05:03 +01:00
Robin Gareus
7ed37d67ff Backwards compatible sndfile support
SFC_SET_COMPRESSION_LEVEL was only added in 2012 and only available in
libsndfile 1.0.26 or later.
2018-11-22 20:36:41 +01:00
Robin Gareus
d6a92dc521 Include session-metadata in external/ffmpeg export 2018-11-21 00:03:36 +01:00
Robin Gareus
7b709b3cea Implement vorbis encoder quality
This also prepares for codec-quality defaults, but
ExportFormatSpecification does not yet set those for previously unset
or new formats/presets.
2018-11-20 03:21:17 +01:00
Robin Gareus
5fa05b403c Prepare export-format codec-quality setting 2018-11-19 22:26:16 +01:00
Robin Gareus
df72e1ba4f Initial backend support for external export encoder
This adds an experimental pipe to ffmpeg to encode mp3. Currently
quality is hardcoded and various aspects remain to be implemented.
However, it is sufficient for initial testing.
2018-11-19 05:21:17 +01:00
Paul Davis
30b087ab3d globally change all use of "frame" to refer to audio into "sample".
Generated by tools/f2s. Some hand-editing will be required in a few places to fix up comments related to timecode
and video in order to keep the legible
2017-09-18 12:39:17 -04:00
Robin Gareus
22ff03ff60 fix copy/paste typo in prev. commit 2016-12-07 01:06:22 +01:00
Robin Gareus
b14ece32c2 Work around silence-trim config 0dBFS (7b1f97bf) 2016-12-07 01:03:46 +01:00
Robin Gareus
230fa064b2 Revert "Fix export silence threshold by using a constant value for now"
This reverts commit 6784923a05.
2016-12-07 00:56:14 +01:00
Tim Mayberry
6784923a05 Fix export silence threshold by using a constant value for now
All float values defined in the CONFIG_VARIABLE macro seem like they are cast
to at some stage before writing (another issue that needs addressing). The
default value for export-silence-threshold (-INFINITY) is converted to a value
of 0 and as a result nothing is exported with trim enabled.

Use the same fixed silence threshold as Mixbus until proper bounds checking and
GUI is in place.

Related: #6412
2016-12-06 13:41:17 +10:00
Robin Gareus
8c944c08ea Normalize API rename part 2 2016-07-18 17:37:13 +02:00
Robin Gareus
b64dcac17e No-Op: rename Normalizer to Intermediate
post-processing is no longer just Normalization. RealtimeExport
does Encoding - faster than realtime - using the same infrastructure.
2016-07-18 17:37:13 +02:00