それマグで!

知識はカップより、マグでゆっくり頂きます。 takuya_1stのブログ

習慣に早くから配慮した者は、 おそらく人生の実りも大きい。
") }) jQuery.noConflict()(document).ready(function(){ /**ページャーが気に入らないので修正**/ //やるべきこと // pre・next のいれかえ jQuery('span.pager-next').insertAfter('span.pager-prev') // pre/next に矢印を入れる jQuery('a[rel=next]').text(jQuery('a[rel=next]').text()+"> ") jQuery('a[rel=prev]').text("< "+jQuery('a[rel=prev]').text()) // pre/next をヘッダにもってくる //jQuery(".date.first").css("display","inline-block") jQuery('div.permalink.pager').clone().insertAfter(".date.first") jQuery("header .pager a").css("padding","0px 15px"); //pre/next をAjaxで取得してタイトルを取る。 //取得したタイトルをpre/next のタイトルに jQuery('span.pager-next,span.pager-prev').css("display","inline-block") jQuery('span.pager-next,span.pager-prev').css("width","250px"); jQuery('span.pager-next,span.pager-prev').css("overflow", "hidden"); jQuery('span.pager-next,span.pager-prev').css("white-space", "nowrap"); jQuery('span.pager-next,span.pager-prev').css("text-overflow", "ellipsis"); jQuery("a[rel=next],a[rel=prev]").each(function(idx,e){ var anchor = e jQuery.get(anchor.href,null,function(html){ jQuery(anchor).text() var title = jQuery("
").html(html).find(".entry-title").text().trim() jQuery(anchor).attr("title", title); text = jQuery(anchor).text() text = text.slice(0,10); text = text.replace(/の記事/, "の記事 ["+title+"] "); jQuery(anchor).text(text) }) }); }); })

raspberry pi 4 は hdmi から音が出ない事がある。

raspberry pi 4 の debian/bookwarn で hdmi から音が出ない。

VLC の場合でもAnalogが選ばれてしまうことが多い。

Raspi4 では、HDMIとアナログがあるのでアナログが使われる。

ググると、この辺のオーディオ設定が初心者泣かせと書かれていた。わかる気がする。アナログ・オーディオのほうが汎用性が高いんだけど。使う人は減った。Raspi5 ではこの問題は起きない。アナログが排除された。

コマンドから選ぶ。

mpv の場合は、次のコマンドで、オーディオデバイスを一覧できる。

mpv --audio-device=help

一覧を出すとこんな感じ。

takuya@raspberrypi:~ $ mpv --audio-device=help
List of detected audio devices:
  'auto' (Autoselect device)
  'pulse/alsa_output.platform-bcm2835_audio.analog-stereo' (内部オーディオ Analog Stereo)
  'pulse/alsa_output.platform-fef00700.hdmi.hdmi-stereo' (内部オーディオ Digital Stereo (HDMI))
  'alsa' (Default (alsa))
  'alsa/sysdefault' (Default Audio Device)
  'alsa/lavrate' (Rate Converter Plugin Using Libav/FFmpeg Library)
  'alsa/samplerate' (Rate Converter Plugin Using Samplerate Library)
  'alsa/speexrate' (Rate Converter Plugin Using Speex Resampler)
  'alsa/jack' (JACK Audio Connection Kit)
  'alsa/oss' (Open Sound System)
  'alsa/speex' (Plugin using Speex DSP (resample, agc, denoise, echo, dereverb))
  'alsa/upmix' (Plugin for channel upmix (4,6,8))
  'alsa/vdownmix' (Plugin for channel downmix (stereo) with a simple spacialization)
  'alsa/plughw:CARD=vc4hdmi0,DEV=0' (vc4-hdmi-0, MAI PCM i2s-hifi-0/Hardware device with all software conversions)
  'alsa/sysdefault:CARD=vc4hdmi0' (vc4-hdmi-0, MAI PCM i2s-hifi-0/Default Audio Device)
  'alsa/hdmi:CARD=vc4hdmi0,DEV=0' (vc4-hdmi-0, MAI PCM i2s-hifi-0/HDMI Audio Output)
  'alsa/dmix:CARD=vc4hdmi0,DEV=0' (vc4-hdmi-0, MAI PCM i2s-hifi-0/Direct sample mixing device)
  'alsa/usbstream:CARD=vc4hdmi0' (vc4-hdmi-0/USB Stream Output)
  'alsa/plughw:CARD=vc4hdmi1,DEV=0' (vc4-hdmi-1, MAI PCM i2s-hifi-0/Hardware device with all software conversions)
  'alsa/sysdefault:CARD=vc4hdmi1' (vc4-hdmi-1, MAI PCM i2s-hifi-0/Default Audio Device)
  'alsa/hdmi:CARD=vc4hdmi1,DEV=0' (vc4-hdmi-1, MAI PCM i2s-hifi-0/HDMI Audio Output)
  'alsa/dmix:CARD=vc4hdmi1,DEV=0' (vc4-hdmi-1, MAI PCM i2s-hifi-0/Direct sample mixing device)
  'alsa/usbstream:CARD=vc4hdmi1' (vc4-hdmi-1/USB Stream Output)
  'alsa/plughw:CARD=Headphones,DEV=0' (bcm2835 Headphones, bcm2835 Headphones/Hardware device with all software conversions)
  'alsa/sysdefault:CARD=Headphones' (bcm2835 Headphones, bcm2835 Headphones/Default Audio Device)
  'alsa/dmix:CARD=Headphones,DEV=0' (bcm2835 Headphones, bcm2835 Headphones/Direct sample mixing device)
  'alsa/usbstream:CARD=Headphones' (bcm2835 Headphones/USB Stream Output)
  'jack' (Default (jack))
  'sdl' (Default (sdl))

オーディオ出力先を指定。

再生機器をHDMIに指定して、再生すると次のようになる。

DISPLAY=:0 mpv  --fullscreen --audio-device=pulse/alsa_output.platform-fef00700.hdmi.hdmi-stereo

認識していれば、ALSAを選べば良いようです。

DISPLAY=:0 mpv  --fullscreen --audio-device=alsa/sysdefault

認識していないとき

raspi-config で pulse を選べば動くはずなんだが。

この辺はわからないので、明示してALSAを使うほうが無難。

ちなみに、PipeWireを設定した場合は、次のようなデバイス一覧になる。

List of detected audio devices:
  'auto' (Autoselect device)
  'pipewire' (Default (pipewire))
  'pipewire/alsa_output.platform-bcm2835_audio.stereo-fallback' (内部オーディオ Stereo)
  'pipewire/alsa_output.platform-fef00700.hdmi.hdmi-stereo' (内部オーディオ Digital Stereo (HDMI))
  'pulse/alsa_output.platform-bcm2835_audio.stereo-fallback' (内部オーディオ Stereo)
  'pulse/alsa_output.platform-fef00700.hdmi.hdmi-stereo' (内部オーディオ Digital Stereo (HDMI))

ALSAはあるけどpulse に加えて、pipewireが出てくる。

hdmi を使うときはオーディオ注意

あれこれと変更点があって、素直に行かない気はするけど。昔は問題なく動いてたものが、動かなくなるのは辛いけど、Raspiでてから10年も経つし、あれこれ変わってきてるのは仕方がない。

慎重に見れば、まぁ大丈夫でしょう。