Raspberry Pi 備忘録 / Mbedもあるよ!

Raspberry Pi であれこれやった事の記録

動画や音声周りの情報まとめ

ビデオ再生

バイスについて

  1. 4極アナログジャック 4極の順番は、根本から、 Video Ground Right Left です。

  2. HDMI

omxplayer

man

omxplayer -- Raspberry Pi command line OMX playerOMXPlayer is a commandline OMX player for the Raspberry Pi. It was developed as a testbed for the XBMC Raspberry PI implementation and is quite handy to use standalone.

非常に高速で、綺麗に表示される。

オーディオの指定は、 hdmi と local(アナログ) のみ。
USBオーディオなどは指定できない。

--loop で再すると、プロセスとして omxplayer.bin と omxplayer の2つが動く。
修了する場合は、両方を kill する。

mplayer

man

mplayer2 - movie player

オーディオの指定は、色々できる(雑)

webmの再生が可能です。

VLC

これから調査

オーディオ再生

バイスについて

Raspberry pi 2 modebl 2 と 3 で、可能なオーディオ再生方法。

  1. 4極アナログジャック 4極の順番は、根本から、 Video Ground Right Left です。

  2. HDMI

  3. USB DAC

  4. I2S DAC(未調査)

バイスの情報の取得
 $ aplay -l
**** ハードウェアデバイス PLAYBACK のリスト ****
カード 0: ALSA [bcm2835 ALSA], デバイス 0: bcm2835 ALSA [bcm2835 ALSA]
  サブデバイス: 8/8
  サブデバイス #0: subdevice #0
  サブデバイス #1: subdevice #1
  サブデバイス #2: subdevice #2
  サブデバイス #3: subdevice #3
  サブデバイス #4: subdevice #4
  サブデバイス #5: subdevice #5
  サブデバイス #6: subdevice #6
  サブデバイス #7: subdevice #7
カード 0: ALSA [bcm2835 ALSA], デバイス 1: bcm2835 ALSA [bcm2835 IEC958/HDMI]
  サブデバイス: 1/1
  サブデバイス #0: subdevice #0
カード 1: MicroII [Audio Advantage MicroII], デバイス 0: USB Audio [USB Audio]
  サブデバイス: 1/1
  サブデバイス #0: subdevice #0

など。

aplay

aplay -q -D plughw:0,1 bou.wav

などします。

mpg123

# USBでの再生
$ mpg123 -o alsa -a hw:1 -vC jazz_01.mp3

# アナログ or HDMI での再生
$ mpg123 -o alsa -a hw:0 -vC jazz_01.mp3

など

の場合だと、

0 : アナログかHDMIの優先設定されている方

1 : USB

になります。

優先設定は

$ amixer cset numid=3 1 # 1:アナログ, 2:HDMI

などして変えます。