mpv-player / mpv

🎥 Command line video player
https://mpv.io
Other
28.83k stars 2.93k forks source link

Mute/Unmute with SPDIF Functionality #3806

Open optimiz opened 8 years ago

optimiz commented 8 years ago

Is it possible to allow the mute function to clamp and unclamp the audio stream so that it actually mutes/unmutes audio output via SPDIF/HDMI passthrough? To clarify: This is not a volume issue, it's an output issue. Please advise, thank you.

mpv version and platform

Reproduction steps

  1. Configure SPDIF passthrough (via HDMI here).
  2. Press 'm' to mute audio.

Expected behavior

Audio passthrough should suspend when muted and resume when unmuted.

Actual behavior

Audio continues to play. MUTE: YES displayed onscreen. Log shows [cplayer] No volume control available, even though it's not a volume issue, it's an output issue similar to how toggling the -no-audio option would effect output; since, for SPDIF, mute/unmute should effect whether the audio stream itself is passed through or not.

Arguably, the requested behavior already exists for SPDIF if you count cycling through available audio tracks until you reach Audio: No as the equivalent of mute and cycling back to an audio track as the equivalent of unmute. But that seems like such a kludge.

Log file

mpv_spdif_mute.txt

ghost commented 8 years ago

We could just send a stream of null bytes, but I'm not sure if receivers would like that. I think there's also something like pause frames for iec958, but couldn't find additional information on it.