mplayerで目視確認
それでもまだ不安があるので、DVカメラからファイルに落とした映像を見る。mplayerはどうやら最初からインストールされているようだ。mplayerには色々なフロントエンドがあるようだがすべて無視。ここで、音声はAlsaを利用する。実際最初は音が出なくてちょっと苦労した。
[a9a9@localhost dvgrab]$ mplayer -ao alsa:device=plughw=1.0 dvgrab-001.dv
前提としてAlsaデバイスがインストールされていて、カード番号が1、デバイス番号が0のオーディオから出力させた場合の例だと思って欲しい。ちなみに、alsaが使えるハードウエアのリストはaplayで見ることができる。
[root@localhost asound]# aplay -l **** ハードウェアデバイス PLAYBACK のリスト **** カード 1: I82801BAICH2 [Intel 82801BA-ICH2], デバイス 0: Intel ICH [Intel 82801BA-ICH2] サブデバイス: 1/1 サブデバイス #0: subdevice #0
mplayerで利用できるAlsa以外のオーディオデバイスについては、以下のようにHELPを出すことができる。alsaじゃなければossを使うのだろうかやはり。
[a9a9@localhost dvgrab]$ mplayer -ao help MPlayer SVN-r23784 rpm.livna.org (C) 2000-2007 MPlayer Team CPU: Intel Celeron 2/Pentium III Coppermine,Geyserville (Family: 6, Model: 8, Stepping: 6) CPUflags: MMX: 1 MMX2: 1 3DNow: 0 3DNow2: 0 SSE: 1 SSE2: 0 Compiled with runtime CPU detection. Available audio output drivers: oss OSS/ioctl audio output alsa ALSA-0.9.x-1.x audio output sdl SDLlib audio output mpegpes DVB audio output null Null audio output pcm RAW PCM/WAVE file writer audio output
ちなみに、alsaを利用した音声再生プログラムaplayの場合「デバイス名:card番号,デバイス番号」とカンマで区切るが、mplayerの場合は「alsa:device=デバイス名=card番号.デバイス番号」というように、ピリオドで区切るようだ。以下は、aplayの例
[a9a9@localhost dvgrab]# aplay -D plughw:1,0 -N /usr/share/system-config-soundcard/sound-sample.wav #/usr/share/system-config-soundcard/system-config-soundcard.playの内容から
ちなみに、最初に間違えてaplayのようにカードとデバイスをカンマ区切りで入力したところ、
mplayer -ao alsa:device=plughw:1,0 dvgrab-001.dv
以下のように怒られた。
Could not parse arguments at the position indicated below: device=plughw:1 ^ [AO_ALSA] -ao alsa commandline help: [AO_ALSA] Example: mplayer -ao alsa:device=hw=0.3 [AO_ALSA] Sets first card fourth hardware device. [AO_ALSA] Options: [AO_ALSA] noblock [AO_ALSA] Opens device in non-blocking mode. [AO_ALSA] device=<device-name> [AO_ALSA] Sets device (change , to . and : to =) Could not open/initialize audio device -> no sound. Audio: no sound
結構親切に説明してくれるようだ。