aboutsummaryrefslogtreecommitdiff
path: root/stream/src/stream_info.rs
diff options
context:
space:
mode:
authormetamuffin <metamuffin@disroot.org>2025-04-16 00:09:35 +0200
committermetamuffin <metamuffin@disroot.org>2025-04-16 00:09:35 +0200
commit39dee6820db4581fa41cfac8bcfdd399a96f5319 (patch)
treec605156a6757e5623fae36635722758947e0db65 /stream/src/stream_info.rs
parent50dc0e7bea02d7fc5b38edb7f943e19bd8c0285b (diff)
downloadjellything-39dee6820db4581fa41cfac8bcfdd399a96f5319.tar
jellything-39dee6820db4581fa41cfac8bcfdd399a96f5319.tar.bz2
jellything-39dee6820db4581fa41cfac8bcfdd399a96f5319.tar.zst
transcode impl but broken
Diffstat (limited to 'stream/src/stream_info.rs')
-rw-r--r--stream/src/stream_info.rs13
1 files changed, 9 insertions, 4 deletions
diff --git a/stream/src/stream_info.rs b/stream/src/stream_info.rs
index 43c536a..c3746c6 100644
--- a/stream/src/stream_info.rs
+++ b/stream/src/stream_info.rs
@@ -79,7 +79,12 @@ fn stream_formats(t: &TrackEntry) -> Vec<StreamFormatInfo> {
codec: t.codec_id.to_string(),
remux: true,
bitrate: 10_000_000., // TODO
- containers: containers_by_codec(&t.codec_id),
+ containers: {
+ let mut x = containers_by_codec(&t.codec_id);
+ // TODO remove this
+ x.retain_mut(|x| *x != StreamContainer::MPEG4);
+ x
+ },
bit_depth: t.audio.as_ref().and_then(|a| a.bit_depth.map(|e| e as u8)),
samplerate: t.audio.as_ref().map(|a| a.sampling_frequency),
channels: t.audio.as_ref().map(|a| a.channels as usize),
@@ -101,8 +106,8 @@ fn stream_formats(t: &TrackEntry) -> Vec<StreamFormatInfo> {
("V_AV1", CONF.encoders.av1.is_some()),
("V_VP8", CONF.encoders.vp8.is_some()),
("V_VP9", CONF.encoders.vp9.is_some()),
- ("V_AVC", CONF.encoders.avc.is_some()),
- ("V_HEVC", CONF.encoders.hevc.is_some()),
+ ("V_MPEG4/ISO/AVC", CONF.encoders.avc.is_some()),
+ ("V_MPEGH/ISO/HEVC", CONF.encoders.hevc.is_some()),
] {
if enable {
formats.push(StreamFormatInfo {
@@ -146,7 +151,7 @@ fn containers_by_codec(codec: &str) -> Vec<StreamContainer> {
use StreamContainer::*;
match codec {
"V_VP8" | "V_VP9" | "V_AV1" | "A_OPUS" | "A_VORBIS" => vec![Matroska, WebM],
- "V_AVC" | "A_AAC" => vec![Matroska, MPEG4],
+ "V_MPEG4/ISO/AVC" | "A_AAC" => vec![Matroska, MPEG4],
"S_TEXT/UTF8" | "S_TEXT/WEBVTT" => vec![Matroska, WebVTT, WebM, JVTT],
_ => vec![Matroska],
}