Repository navigation
Fix #396, #397: keep every audio track, read DST embroidery designs - #401
Conversation
Video to video mapped only the first audio stream, so a film with several languages kept one. MediaInfo now lists every audio stream, and each is mapped and either copied (the target takes its codec) or encoded with its own options (-c:a:N, -b:a:N for its channel count, -ac:a:N); the streams' language tags come along. FLV and DV hold a single track and keep the first; video to audio still takes the first.
The vector engine draws a .dst design's stitches as SVG polylines at real size, a palette colour per thread (DST stores no thread colours), and renders it to PNG, JPG or PDF from there. Records are decoded with the same bits as pyembroidery's DstReader: stitches, jumps, colour changes, sequin-mode switches and the end. AutoCAD sheet sets also use .dst: a file without the "LA:" header fails with that reason. Settings schema 33 teaches existing vector donuts the extension.
IsTracing took every vector-engine step into SVG, except from SVGZ, for tracing; DST → SVG draws the stitches as lines and joins SVGZ there.
KnifeLemon
left a comment
There was a problem hiding this comment.
Thanks @cre8ive-marketing! Both parts look right to me. Mapping every audio track with its own -c:a:N/-b:a:N/-ac:a:N keeps the one-track case exactly as before, FLV and DV keep the first, and video → audio is unchanged. The DST records decode with the standard bit layout, and failing an AutoCAD sheet set with a reason is a nice touch. I ran the new tests here too, including the three-language MKV with FFmpeg 9.0.2.
Two things we'll handle on our side when merging, no need to push:
- Settings schema: several open PRs add a migration, so we give each the next free number when it goes in (
CurrentSchemaVersion, thev33step and the test that starts from 32). - The changed bullet in
docs/ENGINES.mdgets re-wrapped like the lines around it.
#396 closes with this; #397 stays open for writing embroidery formats, as you said.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…own words The .dst step follows main's schema 37 and its test starts from 37. The DST header comment explains the record bytes itself, and the ENGINES.md audio-track bullet is wrapped to the file's width. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Merged, thanks @cre8ive-marketing! When bringing it up to main we gave its settings migration schema 38 and described the DST record layout in our own words in |
What does this change?
Two open enhancement issues, one commit each, with tests and a line in
docs/ENGINES.md.-map 0:a:0), so a film with three languages kept one.MediaInfonow lists every audio stream (AudioTracks), and each is mapped and either copied (the target takes its codec) or encoded with its own options:-c:a:N,-b:a:Nfor that track's channel count,-ac:a:N. The streams' language tags come along. FLV and DV hold one track and keep the first, and video → audio still takes the first..dstembroideryVector/DstEmbroidery.cs), a palette colour per thread since DST stores no thread colours, and renders PNG, JPG or PDF from there. Records are decoded with the same bits as pyembroidery'sDstReader: stitch, jump, colour change, sequin-mode switch, end. AutoCAD sheet sets also use.dst, so a file without theLA:header fails with that reason.Settings schema 33 teaches existing vector donuts
.dst. Like #393, it will need renumbering after #351. Happy to do that, or leave it to you.How was it tested?
dotnet format --verify-no-changesdotnet test: with FFmpeg 9.0.2 and rhwp 0.8.7: Core 456, Engines 1449, Setup 145, Cli 27, Platform 48 pass. App: 806 pass, 1 fail,SingleInstanceTests.Arguments_reach_a_first_instance_that_starts_listening_late, a timing test under the full run's load; it passes 3/3 alone and this PR doesn't touch it.AudioTracksTests:DstEmbroideryTests:.dstfails with the reasonDstFormatTests(Core): the format entry, and the upgrade with and without a user's own claim on.dst.The DST bit layout was checked against pyembroidery's reader rather than only against the test's own encoder.
TracingTests.IsTracingtreated every vector-engine step into SVG, except from SVGZ, as tracing. DST → SVG draws the stitches and joins SVGZ in that exception, soTracing_is_never_a_step_towards_a_format_that_has_another_routestill checks every other route.Screenshots (UI changes)
No UI changes.
Checklist
src/Filee.App/Assets/i18n/*.jsonfiles (none added)THIRD-PARTY-NOTICES.md(none; pyembroidery was only read to check the format)Fixes #396. Addresses #397: PNG, JPG and PDF are done; writing other embroidery formats such as PES or DSZ isn't part of this, so the issue can stay open for that.