mirror of
https://github.com/storytold/effectcraft.git
synced 2026-11-17 10:07:14 +00:00
Merge pull request #3773 from storytold/refactor/interchange-current-shared-film
interchange: stage current shared Film format dependency cutover
This commit is contained in:
+7
-1
@@ -155,4 +155,10 @@ under [`docs/brand/LICENSE-brand.txt`](docs/brand/LICENSE-brand.txt). Forks and
|
||||
| `docs/brand/artcraft-mark.png` | ArtCraft Team | Original work: first-party ArtCraft brand mark (ArtCraft symbol ("A" mark), blue) | ArtCraft brand terms, not open source (`docs/brand/LICENSE-brand.txt`) |
|
||||
| `docs/brand/artcraft-mark.svg` | ArtCraft Team | Original work: first-party ArtCraft brand mark (ArtCraft symbol ("A" mark), blue) | ArtCraft brand terms, not open source (`docs/brand/LICENSE-brand.txt`) |
|
||||
|
||||
- Appearance theme previews, drawn procedurally from original shapes: `crates/ui-egui/src/panels/settings.rs` (original work, MIT OR Apache-2.0).
|
||||
- Appearance theme previews, drawn procedurally from original shapes: `crates/ui-egui/src/panels/settings.rs` (original work, MIT OR Apache-2.0).
|
||||
|
||||
## Synthetic test audio
|
||||
|
||||
| Asset | Author | Source | Licence |
|
||||
|---|---|---|---|
|
||||
| `crates/media/tests/fixtures/pce61-ffmpeg.aac-fixture` | Dylan M. Taylor | Original sine waves; reproducible recipe in `crates/media/tests/fixtures/README.md` | MIT OR Apache-2.0 |
|
||||
|
||||
Generated
+735
-238
File diff suppressed because it is too large
Load Diff
+8
-8
@@ -98,15 +98,15 @@ craft-video = { version = "0.1.0", git = "https://github.com/storytold/craft-lib
|
||||
|
||||
# footage decoding: FilmCraft's pure-Rust crates, pinned to a revision (plan/adr/0001).
|
||||
# Only `crates/media`, `crates/export` and `crates/interchange` may depend on these.
|
||||
filmcraft-codecs = { git = "https://github.com/storytold/filmcraft", rev = "d5ead4ba1ee2f1cd13cb86a4239aee2730a3d9f5" }
|
||||
filmcraft-media = { git = "https://github.com/storytold/filmcraft", rev = "d5ead4ba1ee2f1cd13cb86a4239aee2730a3d9f5" }
|
||||
filmcraft-frame = { git = "https://github.com/storytold/filmcraft", rev = "d5ead4ba1ee2f1cd13cb86a4239aee2730a3d9f5" }
|
||||
filmcraft-color = { git = "https://github.com/storytold/filmcraft", rev = "d5ead4ba1ee2f1cd13cb86a4239aee2730a3d9f5" }
|
||||
filmcraft-time = { git = "https://github.com/storytold/filmcraft", rev = "d5ead4ba1ee2f1cd13cb86a4239aee2730a3d9f5" }
|
||||
filmcraft-codecs = { git = "https://github.com/storytold/filmcraft", rev = "3f137a7ed420cac79b32145f5243b7f98b31f71c" }
|
||||
filmcraft-media = { git = "https://github.com/storytold/filmcraft", rev = "3f137a7ed420cac79b32145f5243b7f98b31f71c" }
|
||||
filmcraft-frame = { git = "https://github.com/storytold/filmcraft", rev = "3f137a7ed420cac79b32145f5243b7f98b31f71c" }
|
||||
filmcraft-color = { git = "https://github.com/storytold/filmcraft", rev = "3f137a7ed420cac79b32145f5243b7f98b31f71c" }
|
||||
filmcraft-time = { git = "https://github.com/storytold/filmcraft", rev = "3f137a7ed420cac79b32145f5243b7f98b31f71c" }
|
||||
# timeline interchange (EDL, FCP7 XML, FCPXML, OTIO) for Premiere Pro interop (crates/interchange only)
|
||||
filmcraft-interchange = { git = "https://github.com/storytold/filmcraft", rev = "d5ead4ba1ee2f1cd13cb86a4239aee2730a3d9f5" }
|
||||
filmcraft-project = { git = "https://github.com/storytold/filmcraft", rev = "d5ead4ba1ee2f1cd13cb86a4239aee2730a3d9f5" }
|
||||
filmcraft-geom = { git = "https://github.com/storytold/filmcraft", rev = "d5ead4ba1ee2f1cd13cb86a4239aee2730a3d9f5" }
|
||||
filmcraft-interchange = { git = "https://github.com/storytold/filmcraft", rev = "3f137a7ed420cac79b32145f5243b7f98b31f71c" }
|
||||
filmcraft-project = { git = "https://github.com/storytold/filmcraft", rev = "3f137a7ed420cac79b32145f5243b7f98b31f71c" }
|
||||
filmcraft-geom = { git = "https://github.com/storytold/filmcraft", rev = "3f137a7ed420cac79b32145f5243b7f98b31f71c" }
|
||||
|
||||
# gpu (the same wgpu eframe / egui-wgpu use)
|
||||
wgpu = { version = "30.0.1", features = ["fragile-send-sync-non-atomic-wasm"] }
|
||||
|
||||
@@ -54,6 +54,7 @@ fn still(p: &mut fp::Project, path: &str) -> fp::ItemId {
|
||||
codec: "png".into(),
|
||||
pixel_format: String::new(),
|
||||
color: Default::default(),
|
||||
color_assumed: None,
|
||||
has_alpha: false,
|
||||
bitrate: None,
|
||||
hdr: None,
|
||||
@@ -75,7 +76,7 @@ fn still(p: &mut fp::Project, path: &str) -> fp::ItemId {
|
||||
identity: None,
|
||||
};
|
||||
let name = path.rsplit('/').next().unwrap().to_string();
|
||||
p.add_item(&name, fp::Label::Iris, fp::ItemKind::Media(clip), None)
|
||||
p.add_item(&name, fp::Label::Iris, fp::ItemKind::Media(Box::new(clip)), None)
|
||||
}
|
||||
|
||||
/// V1: red for 2 s; V2: blue at 50 % opacity and 50 % scale; a cross dissolve from red to green
|
||||
|
||||
@@ -365,7 +365,7 @@ impl Exporter<'_> {
|
||||
let mut clip = media_clip(fp::MediaRef::File { path: path.clone() }, info);
|
||||
clip.offline = f.missing;
|
||||
let bin = self.bin(it.and_then(|i| i.parent));
|
||||
let id = self.fp.add_item(&name, fp::Label::Iris, fp::ItemKind::Media(clip), bin);
|
||||
let id = self.fp.add_item(&name, fp::Label::Iris, fp::ItemKind::Media(Box::new(clip)), bin);
|
||||
self.media.insert(path, id);
|
||||
id
|
||||
}
|
||||
@@ -384,7 +384,7 @@ impl Exporter<'_> {
|
||||
Some(b)
|
||||
}
|
||||
};
|
||||
let id = self.fp.add_item(name, fp::Label::Violet, fp::ItemKind::Media(clip), bin);
|
||||
let id = self.fp.add_item(name, fp::Label::Violet, fp::ItemKind::Media(Box::new(clip)), bin);
|
||||
self.media.insert(r.path.clone(), id);
|
||||
id
|
||||
}
|
||||
@@ -405,7 +405,7 @@ impl Exporter<'_> {
|
||||
);
|
||||
let clip = media_clip(fp::MediaRef::Generator(Generator::ColorMatte { color: [color[0], color[1], color[2], 1.0] }), info);
|
||||
let bin = self.bin(it.and_then(|i| i.parent));
|
||||
let id = self.fp.add_item(&name, fp::Label::Rose, fp::ItemKind::Media(clip), bin);
|
||||
let id = self.fp.add_item(&name, fp::Label::Rose, fp::ItemKind::Media(Box::new(clip)), bin);
|
||||
self.media.insert(key, id);
|
||||
id
|
||||
}
|
||||
@@ -540,6 +540,9 @@ impl Exporter<'_> {
|
||||
comment: if m.chapter.is_empty() { String::new() } else { m.comment.clone() },
|
||||
kind: if m.chapter.is_empty() { fp::MarkerKind::Comment } else { fp::MarkerKind::Chapter },
|
||||
color: fp::Label::Green,
|
||||
custom_color: None,
|
||||
author: String::new(),
|
||||
url: m.url.clone(),
|
||||
})
|
||||
.collect();
|
||||
if let Some(seq) = self.fp.sequence_mut(sid) {
|
||||
@@ -733,6 +736,7 @@ fn media_info(name: &str, kind: MediaKind, duration: Tick, video: Option<VideoSp
|
||||
codec,
|
||||
pixel_format: String::new(),
|
||||
color: Default::default(),
|
||||
color_assumed: None,
|
||||
has_alpha,
|
||||
bitrate: None,
|
||||
hdr: None,
|
||||
@@ -755,6 +759,15 @@ fn media_clip(media: fp::MediaRef, info: MediaInfo) -> fp::MediaClip {
|
||||
mod tests {
|
||||
use super::*;
|
||||
|
||||
#[test]
|
||||
fn synthesized_video_metadata_does_not_claim_an_inferred_color_profile() {
|
||||
let info = media_info("clip", MediaKind::Movie, Tick::ZERO, Some((1920, 1080, FrameRate::new(24, 1), 1.0, "raw".into(), true)), false);
|
||||
let video = info.video.unwrap();
|
||||
assert_eq!((video.width, video.height), (1920, 1080));
|
||||
assert!(video.color_assumed.is_none());
|
||||
assert!(video.has_alpha);
|
||||
}
|
||||
|
||||
/// A folder's bin is the same one each time it is asked for (a cached folder once answered
|
||||
/// `None`, so a folder's second item went to the project root); a non-item has no bin.
|
||||
#[test]
|
||||
|
||||
@@ -201,8 +201,8 @@ const EDL_MEDIA_TIME_NOTE: &str = "EDL source timecodes were imported as media t
|
||||
/// The largest start timecode, in frames, a file may have: a day at 1000 fps.
|
||||
const MAX_FILE_TIMECODE: i64 = 24 * 3600 * 1000;
|
||||
|
||||
/// The paths an EDL reader guessed (media it flags offline: a line without `SOURCE FILE` names
|
||||
/// only its clip) that are not inside the list's folder: a clip name of `../x.mov` or an absolute
|
||||
/// The paths an EDL reader guessed (identified by its `Tape Name` metadata: a line without
|
||||
/// `SOURCE FILE` names only its clip) that are not inside the list's folder: a clip name of `../x.mov` or an absolute
|
||||
/// one would link a file elsewhere on the disk. They stay placeholders. A `SOURCE FILE` path is
|
||||
/// the list's own choice and is kept, also when another clip guesses the same path.
|
||||
fn guessed_outside(project: &fp::Project, base_dir: Option<&str>) -> HashSet<String> {
|
||||
@@ -219,7 +219,9 @@ fn guessed_outside(project: &fp::Project, base_dir: Option<&str>) -> HashSet<Str
|
||||
if let fp::ItemKind::Media(m) = &it.kind
|
||||
&& let fp::MediaRef::File { path } = &m.media
|
||||
{
|
||||
if m.offline && !inside(path) {
|
||||
// Film reserves `offline` for an explicit user action now. Its EDL reader sets
|
||||
// Tape Name only on reel/clip-name guesses, never on SOURCE FILE references.
|
||||
if it.metadata.contains_key("Tape Name") && !inside(path) {
|
||||
guessed.insert(path.clone());
|
||||
} else {
|
||||
named.insert(path.clone());
|
||||
|
||||
@@ -34,6 +34,7 @@ fn info(kind: filmcraft_media::MediaKind, video: bool, audio: bool) -> filmcraft
|
||||
codec: "png".into(),
|
||||
pixel_format: String::new(),
|
||||
color: Default::default(),
|
||||
color_assumed: None,
|
||||
has_alpha: false,
|
||||
bitrate: None,
|
||||
hdr: None,
|
||||
@@ -60,7 +61,7 @@ fn media(p: &mut fp::Project, name: &str, path: &str, kind: filmcraft_media::Med
|
||||
proxy: None,
|
||||
identity: None,
|
||||
};
|
||||
p.add_item(name, fp::Label::Iris, fp::ItemKind::Media(clip), bin)
|
||||
p.add_item(name, fp::Label::Iris, fp::ItemKind::Media(Box::new(clip)), bin)
|
||||
}
|
||||
|
||||
fn rate() -> filmcraft_time::FrameRate {
|
||||
@@ -882,3 +883,17 @@ fn import_finds_each_clips_transitions_without_scanning_the_track() {
|
||||
let mid = m.layers.iter().find(|l| near(l.in_point, t(100.0 - 0.08))).expect("clip 250 extended into its incoming transition");
|
||||
assert!(near(mid.out_point, t(100.4 + 0.08)), "{}", mid.out_point.seconds());
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn edl_explicit_source_file_allows_the_same_path_as_an_outside_guess() {
|
||||
let edl = b"TITLE: CUT\nFCM: NON-DROP FRAME\n\n001 A001 V C 00:00:00:00 00:00:01:00 00:00:00:00 00:00:01:00\n* FROM CLIP NAME: ../shared.mov\n\n002 A002 V C 00:00:00:00 00:00:01:00 00:00:01:00 00:00:02:00\n* FROM CLIP NAME: named.mov\n* SOURCE FILE: /shared.mov\n";
|
||||
let mut asked = Vec::new();
|
||||
let mut probe_all = |path: &str| {
|
||||
asked.push(path.to_string());
|
||||
probe(path)
|
||||
};
|
||||
let mut p = Project::default();
|
||||
let opts = ImportOptions { name: "hand.edl".into(), edl_frame_rate: Some(25.0), base_dir: Some("/work".into()) };
|
||||
import(&mut p, edl, None, &opts, &mut probe_all).unwrap();
|
||||
assert_eq!(asked, ["/shared.mov"], "explicit SOURCE FILE permits the shared path, probed once");
|
||||
}
|
||||
|
||||
+31
@@ -0,0 +1,31 @@
|
||||
# Synthetic AAC layout fixture
|
||||
|
||||
`pce61-ffmpeg.aac-fixture` contains only original mathematical sine tones generated for these tests by Dylan M. Taylor. No recorded audio or third-party source/assets were copied; the generated fixture is covered by this repository's license. FFmpeg is a generation tool, not a runtime test dependency.
|
||||
|
||||
Generator: FFmpeg 7.1.5 (Debian 7.1.5-0+deb13u1, AAC encoder Lavc61.19.101).
|
||||
SHA-256: `07c460636dce4aa4163df8ef35f3b76f1214c38bf217aacd23243e608d87071e`.
|
||||
|
||||
The seven PCM inputs are FL500Hz, FR700Hz, FC300Hz, LFE60Hz, BC900Hz, SL1100Hz, SR1300Hz, each amplitude0.25 at48kHz for2seconds. The real encoder emits its own PCE and matching element tags; unlike the previous synthetic configuration rewrite, no LFE element is mislabeled as an unlisted SCE.
|
||||
|
||||
Reproduce using FFmpeg/ffprobe and Python3:
|
||||
|
||||
```sh
|
||||
ffmpeg -hide_banner -loglevel error -f lavfi -i 'aevalsrc=0.25*sin(2*PI*500*t)|0.25*sin(2*PI*700*t)|0.25*sin(2*PI*300*t)|0.25*sin(2*PI*60*t)|0.25*sin(2*PI*900*t)|0.25*sin(2*PI*1100*t)|0.25*sin(2*PI*1300*t):s=48000:d=2:c=6.1' -c:a aac -b:a 672k pce61.m4a
|
||||
ffprobe -v error -show_streams -show_packets -show_data -of json pce61.m4a > pce61.json
|
||||
python3 - <<'PY'
|
||||
import json, struct
|
||||
x = json.load(open('pce61.json'))
|
||||
def raw(text):
|
||||
return bytes.fromhex(''.join(line.split(': ', 1)[1].split(' ', 1)[0].replace(' ', '')
|
||||
for line in text.strip().splitlines()))
|
||||
asc = raw(x['streams'][0]['extradata'])
|
||||
units = [raw(p['data']) for p in x['packets']]
|
||||
assert len(units) == 95
|
||||
output = bytearray(b'PCE1')
|
||||
for record in [asc, *units]:
|
||||
output += struct.pack('>I', len(record)) + record
|
||||
open('pce61-ffmpeg.aac-fixture', 'wb').write(output)
|
||||
PY
|
||||
```
|
||||
|
||||
Envelope: ASCII `PCE1`, then a big-endian32-bit length and ASC bytes, then95 length-prefixed raw AAC access units. Container priming trim is deliberately not retained, matching the existing tests' encoder units; measurements start0.5seconds into decoded audio. Other encoder versions can yield different bytes; preserve actual PCE/AU consistency and all existing tone-gain assertions.
|
||||
Binary file not shown.
@@ -0,0 +1,7 @@
|
||||
asset: pce61-ffmpeg.aac-fixture
|
||||
title: Synthetic seven-channel AAC PCE tone fixture
|
||||
author: Dylan M. Taylor
|
||||
source: crates/media/tests/fixtures/README.md (reproducible generation recipe)
|
||||
license: MIT OR Apache-2.0
|
||||
added: 2026-11-16
|
||||
notes: Original sine-wave signals, no recorded audio or copied assets. Encoded using FFmpeg 7.1.5. SHA-256 07c460636dce4aa4163df8ef35f3b76f1214c38bf217aacd23243e608d87071e.
|
||||
@@ -1,7 +1,8 @@
|
||||
//! Multichannel AAC reaches stereo by where each channel plays, whatever order its channel
|
||||
//! configuration decodes in (#1701). Fixtures are tones encoded with craft-audio's AAC encoder (no
|
||||
//! ffmpeg needed, so nothing is skipped), with the configuration rewritten where the coded
|
||||
//! elements fit another: configurations 11 and 12 code the same elements as the encoder's 7- and
|
||||
//! configuration decodes in (#1701). Fixtures are tones encoded with craft-audio's AAC encoder,
|
||||
//! plus a checked-in genuine FFmpeg-generated 6.1-channel fixture (no external tool at test time, nothing skipped).
|
||||
//! The configuration is rewritten only where the coded elements fit another: configurations 11
|
||||
//! and 12 code the same elements as the encoder's 7- and
|
||||
//! 8-channel output, and a program config element can name any of them.
|
||||
|
||||
use std::f64::consts::PI;
|
||||
@@ -9,7 +10,7 @@ use std::io::Cursor;
|
||||
use std::path::PathBuf;
|
||||
use std::sync::Arc;
|
||||
|
||||
use craft_audio::aac::{AudioSpecificConfig, Encoder, EncoderConfig, ProgramConfig};
|
||||
use craft_audio::aac::{AudioSpecificConfig, Encoder, EncoderConfig};
|
||||
use effectcraft_media::{MediaPool, probe, probe_bytes};
|
||||
use effectcraft_time::Tick;
|
||||
|
||||
@@ -59,13 +60,6 @@ fn lc(config: u8) -> Option<AudioSpecificConfig> {
|
||||
Some(AudioSpecificConfig::lc(3, config))
|
||||
}
|
||||
|
||||
fn pce(front: Vec<(bool, u8)>, side: Vec<(bool, u8)>, back: Vec<(bool, u8)>, lfe: Vec<u8>, comment: &[u8]) -> Option<AudioSpecificConfig> {
|
||||
let pce = ProgramConfig { object_type: 1, sf_index: 3, front, side, back, lfe, comment: comment.to_vec(), ..Default::default() };
|
||||
let mut asc = AudioSpecificConfig::lc(3, 0);
|
||||
asc.pce = Some(pce);
|
||||
Some(asc)
|
||||
}
|
||||
|
||||
use Ch::*;
|
||||
|
||||
fn cases() -> Vec<Case> {
|
||||
@@ -80,15 +74,9 @@ fn cases() -> Vec<Case> {
|
||||
Case { name: "config12", content: &[C, L, R, Ls, Rs, Ls, Rs, Lfe], asc: lc(12) },
|
||||
// the encoder's own 6.1: a PCE listing the centre first
|
||||
Case { name: "pce61-centre-first", content: &[C, L, R, Ls, Rs, Cs, Lfe], asc: None },
|
||||
// ffmpeg's 6.1 PCE: front pair and centre, a side SCE, a back pair and SCE, no LFE
|
||||
// element, its channels in ffmpeg's order L R C LFE Cs Ls Rs. The decoder places the
|
||||
// encoder's SCE 0 in the front SCE, pair 0 front, pair 1 back, SCE 1 in the back SCE (tag
|
||||
// 1) and the LFE in the side SCE left over (tag 5).
|
||||
Case {
|
||||
name: "pce61-ffmpeg",
|
||||
content: &[C, L, R, Cs, Ls, Rs, Lfe],
|
||||
asc: pce(vec![(true, 0), (false, 0)], vec![(false, 5)], vec![(true, 1), (false, 1)], vec![], b"Lavc62.28.102"),
|
||||
},
|
||||
// A genuine FFmpeg-generated 6.1-channel PCE and matching coded elements; rewriting only the ASC of
|
||||
// our encoder's LFE0 stream to claim a side SCE5 would make an invalid access unit.
|
||||
Case { name: "pce61-ffmpeg", content: &[C, L, R, Cs, Ls, Rs, Lfe], asc: None },
|
||||
]
|
||||
}
|
||||
|
||||
@@ -110,6 +98,32 @@ fn encode(content: &[Ch], adts: bool) -> (Vec<u8>, Vec<Vec<u8>>) {
|
||||
(enc.audio_specific_config(), units)
|
||||
}
|
||||
|
||||
/// Preserve the fixture's real element types/tags instead of changing only its ASC.
|
||||
/// The envelope and reproducible tone-generation recipe are in `tests/fixtures/README.md`.
|
||||
fn encode_case(case: &Case) -> (Vec<u8>, Vec<Vec<u8>>) {
|
||||
if case.name == "pce61-ffmpeg" {
|
||||
let bytes = include_bytes!("../fixtures/pce61-ffmpeg.aac-fixture");
|
||||
assert_eq!(&bytes[..4], b"PCE1");
|
||||
let mut rest = &bytes[4..];
|
||||
let mut record = || {
|
||||
let len = u32::from_be_bytes(rest[..4].try_into().unwrap()) as usize;
|
||||
let (data, tail) = rest[4..].split_at(len);
|
||||
rest = tail;
|
||||
data.to_vec()
|
||||
};
|
||||
let asc = record();
|
||||
let mut units = Vec::new();
|
||||
// The generated fixture contains 95 access units (including encoder priming).
|
||||
for _ in 0..95 {
|
||||
units.push(record());
|
||||
}
|
||||
assert!(rest.is_empty(), "fixture has no unparsed records");
|
||||
return (asc, units);
|
||||
}
|
||||
let (asc, units) = encode(case.content, false);
|
||||
(case.asc.as_ref().map_or(asc, |a| a.to_bytes().expect("ASC")), units)
|
||||
}
|
||||
|
||||
fn mp4(asc: Vec<u8>, channels: u32, units: &[Vec<u8>]) -> Vec<u8> {
|
||||
mp4_after(None, asc, channels, units)
|
||||
}
|
||||
@@ -211,8 +225,7 @@ fn lfe_is_coded(case: &Case, bytes: Vec<u8>) {
|
||||
#[test]
|
||||
fn every_aac_layout_mixes_by_speaker_in_mp4() {
|
||||
for case in cases() {
|
||||
let (asc, units) = encode(case.content, false);
|
||||
let asc = case.asc.as_ref().map_or(asc, |a| a.to_bytes().expect("ASC"));
|
||||
let (asc, units) = encode_case(&case);
|
||||
let bytes = mp4(asc, case.content.len() as u32, &units);
|
||||
lfe_is_coded(&case, bytes.clone());
|
||||
let p = write(&format!("{}.mp4", case.name), &bytes);
|
||||
@@ -228,8 +241,7 @@ fn every_aac_layout_mixes_by_speaker_in_mp4() {
|
||||
#[test]
|
||||
fn matroska_aac_layouts_mix_by_speaker() {
|
||||
for case in cases().into_iter().filter(|c| matches!(c.name, "config12" | "pce61-centre-first" | "pce61-ffmpeg")) {
|
||||
let (asc, units) = encode(case.content, false);
|
||||
let asc = case.asc.as_ref().map_or(asc, |a| a.to_bytes().expect("ASC"));
|
||||
let (asc, units) = encode_case(&case);
|
||||
let p = write(&format!("{}.mkv", case.name), &mkv(asc, case.content.len() as u32, &units));
|
||||
check(case.name, case.content, &mix(&MediaPool::new(), &probe(&p).expect("probe")));
|
||||
}
|
||||
@@ -254,8 +266,7 @@ fn an_empty_audio_track_lends_its_configuration_to_no_other() {
|
||||
let case = cases().into_iter().find(|c| c.name == name).expect("case");
|
||||
let n = case.content.len() as u32;
|
||||
let empty = Some((AudioSpecificConfig::lc(3, empty).to_bytes().expect("ASC"), n));
|
||||
let (asc, units) = encode(case.content, false);
|
||||
let asc = case.asc.as_ref().map_or(asc, |a| a.to_bytes().expect("ASC"));
|
||||
let (asc, units) = encode_case(&case);
|
||||
let p = write(&format!("{name}-after-empty.mp4"), &mp4_after(empty.clone(), asc.clone(), n, &units));
|
||||
check(&format!("{name} MP4"), case.content, &mix(&MediaPool::new(), &probe(&p).expect("probe")));
|
||||
let p = write(&format!("{name}-after-empty.mkv"), &mkv_after(empty, asc, n, &units));
|
||||
|
||||
Reference in New Issue
Block a user