vlc-plugin-dvb: document and warn at launch
VLC's MPEG-TS demuxer (libts_plugin.so) ships in a separate package on Arch / CachyOS (vlc-plugin-dvb). Without it, VLC silently falls back to the PS demuxer and misidentifies our H.264 stream — the symptom is a green screen. mpv doesn't share this dependency. - README: list vlc-plugin-dvb under requirements, replace the "green screen, not yet diagnosed" gotcha with the diagnosis. - interactive.rs: when the user picks VLC, check for /usr/lib/vlc/plugins/demux/libts_plugin.so and print a warning to stderr if it's missing. Soft warning, not a hard error — VLC still spawns so the user can confirm the symptom for themselves. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
+25
-4
@@ -68,14 +68,35 @@ impl Player {
|
||||
url,
|
||||
],
|
||||
),
|
||||
Player::Vlc => crate::common::process::spawn_detached(
|
||||
"vlc",
|
||||
&["--network-caching=200", "--live-caching=200", url],
|
||||
),
|
||||
Player::Vlc => {
|
||||
warn_if_vlc_ts_demuxer_missing();
|
||||
crate::common::process::spawn_detached(
|
||||
"vlc",
|
||||
&["--network-caching=200", "--live-caching=200", url],
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// VLC's MPEG-TS demuxer ships in a separate package on Arch / CachyOS
|
||||
// (`vlc-plugin-dvb`). Without it VLC falls through to the PS demuxer
|
||||
// and shows a green screen.
|
||||
fn warn_if_vlc_ts_demuxer_missing() {
|
||||
const TS_DEMUX_PLUGIN: &str = "/usr/lib/vlc/plugins/demux/libts_plugin.so";
|
||||
if !std::path::Path::new(TS_DEMUX_PLUGIN).exists() {
|
||||
eprintln!();
|
||||
eprintln!(
|
||||
"Warning: VLC's MPEG-TS demuxer plugin ({TS_DEMUX_PLUGIN}) is missing."
|
||||
);
|
||||
eprintln!(
|
||||
" On Arch / CachyOS, install `vlc-plugin-dvb`. Without it,"
|
||||
);
|
||||
eprintln!(" VLC will show a green screen. mpv is unaffected.");
|
||||
eprintln!();
|
||||
}
|
||||
}
|
||||
|
||||
pub fn prompt_player() -> Result<Player> {
|
||||
let theme = ColorfulTheme::default();
|
||||
let choice = Select::with_theme(&theme)
|
||||
|
||||
Reference in New Issue
Block a user