vlc-plugin-ffmpeg: extend docs + runtime check
The previous vlc-plugin-dvb diagnosis was incomplete. On a laptop with only vlc-plugin-dvb installed, VLC reads the MPEG-TS container, sees the H.264 stream type in the PMT, then errors "Codec h264 ... is not supported" because libavcodec_plugin.so is also a split package and also wasn't pulled in by the base `vlc` install. Installing vlc-plugin-ffmpeg (which pulls ffmpeg4.4 as a compat dep) on the laptop made VLC play pixelpass cleanly via Intel iHD hardware decode. - README: list both plugin packages under requirements; rewrite the known-limitations line. - interactive.rs: extend the launch-time check to also probe for libavcodec_plugin.so; combine both into one warning that lists every missing piece and the single pacman invocation to fix. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
+33
-16
@@ -69,7 +69,7 @@ impl Player {
|
||||
],
|
||||
),
|
||||
Player::Vlc => {
|
||||
warn_if_vlc_ts_demuxer_missing();
|
||||
warn_if_vlc_plugins_missing();
|
||||
crate::common::process::spawn_detached(
|
||||
"vlc",
|
||||
&["--network-caching=200", "--live-caching=200", url],
|
||||
@@ -79,22 +79,39 @@ impl Player {
|
||||
}
|
||||
}
|
||||
|
||||
// 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!();
|
||||
// On Arch-family distros, the base `vlc` package omits two plugins
|
||||
// pixelpass needs: the MPEG-TS demuxer (`vlc-plugin-dvb`) and the
|
||||
// libavcodec-based H.264 decoder (`vlc-plugin-ffmpeg`). Missing either
|
||||
// produces a confusing error chain — warn at launch.
|
||||
fn warn_if_vlc_plugins_missing() {
|
||||
const REQUIRED: &[(&str, &str)] = &[
|
||||
(
|
||||
"/usr/lib/vlc/plugins/demux/libts_plugin.so",
|
||||
"vlc-plugin-dvb",
|
||||
),
|
||||
(
|
||||
"/usr/lib/vlc/plugins/codec/libavcodec_plugin.so",
|
||||
"vlc-plugin-ffmpeg",
|
||||
),
|
||||
];
|
||||
let missing: Vec<&(&str, &str)> = REQUIRED
|
||||
.iter()
|
||||
.filter(|(p, _)| !std::path::Path::new(p).exists())
|
||||
.collect();
|
||||
if missing.is_empty() {
|
||||
return;
|
||||
}
|
||||
eprintln!();
|
||||
eprintln!("Warning: VLC is missing plugins pixelpass needs:");
|
||||
for (path, pkg) in &missing {
|
||||
eprintln!(" - {path} (install `{pkg}`)");
|
||||
}
|
||||
eprintln!("On Arch / CachyOS / EndeavourOS: `sudo pacman -S {}`.", {
|
||||
let names: Vec<&str> = missing.iter().map(|(_, p)| *p).collect();
|
||||
names.join(" ")
|
||||
});
|
||||
eprintln!("mpv is unaffected.");
|
||||
eprintln!();
|
||||
}
|
||||
|
||||
pub fn prompt_player() -> Result<Player> {
|
||||
|
||||
Reference in New Issue
Block a user