我可以用 pacat 或 paplay 播放哪种音频格式?

我可以用 pacat 或 paplay 播放哪种音频格式?

我可以用 pacat 或 paplay 播放哪种音频格式?我的系统上有一些音频文件带有后缀*.m4a

    file jd2/downloads/KH2FM\ Roxas\ Battle\ Theme\ -\ The\ Other\ Promise/KH2FM\ Roxas\ Battle\ Theme\ -\ The\ Other\ Promise\ \(128kbit_AAC\).m4a 
jd2/downloads/KH2FM Roxas Battle Theme - The Other Promise/KH2FM Roxas Battle Theme - The Other Promise (128kbit_AAC).m4a: ISO Media, MP4 Base Media v1 [IS0 14496-12:2003]

我的系统上没有音频播放器。

 paplay -p jd2/downloads/KH2FM\ Roxas\ Battle\ Theme\ -\ The\ Other\ Promise/KH2FM\ Roxas\ Battle\ Theme\ -\ The\ Other\ Promise\ \(128kbit_AAC\).m4a 
Failed to open audio file.

命令

   pacat -pv jd2/downloads/KH2FM\ Roxas\ Battle\ Theme\ -\ The\ Other\ Promise/KH2FM\ Roxas\ Battle\ Theme\ -\ The\ Other\ Promise\ \(128kbit_AAC\).m4a 
Opening a playback stream with sample specification 's16le 2ch 44100Hz' and channel map 'front-left,front-right'.
Connection established.
Stream successfully created.
Buffer metrics: maxlength=4194304, tlength=352800, prebuf=349276, minreq=3528
Using sample spec 's16le 2ch 44100Hz', channel map 'front-left,front-right'.
Connected to device alsa_output.pci-0000_00_1b.0.analog-stereo (index: 0, suspended: no).
Stream started.
^CGot signal, exiting.cy: 2306533 usec.        

发出嘶嘶声。

通常我用 mpv 播放此类文件。

但我很好奇。:D

答案1

m4a 是一个可能是 AAC 或 ALAC 压缩文件的容器。Apple。它可能包含 DRM,如果包含,则可能无法播放。

来自手册:

描述

paplay 是一款用于在 PulseAudio 声音服务器上播放音频文件的简单工具。它能够识别 libsndfile 支持的所有音频文件格式。

来源:

          SF_FORMAT_WAV          = 0x010000,     /* Microsoft WAV format (little endian). */
          SF_FORMAT_AIFF         = 0x020000,     /* Apple/SGI AIFF format (big endian). */
          SF_FORMAT_AU           = 0x030000,     /* Sun/NeXT AU format (big endian). */
          SF_FORMAT_RAW          = 0x040000,     /* RAW PCM data. */
          SF_FORMAT_PAF          = 0x050000,     /* Ensoniq PARIS file format. */
          SF_FORMAT_SVX          = 0x060000,     /* Amiga IFF / SVX8 / SV16 format. */
          SF_FORMAT_NIST         = 0x070000,     /* Sphere NIST format. */
          SF_FORMAT_VOC          = 0x080000,     /* VOC files. */
          SF_FORMAT_IRCAM        = 0x0A0000,     /* Berkeley/IRCAM/CARL */
          SF_FORMAT_W64          = 0x0B0000,     /* Sonic Foundry's 64 bit RIFF/WAV */
          SF_FORMAT_MAT4         = 0x0C0000,     /* Matlab (tm) V4.2 / GNU Octave 2.0 */
          SF_FORMAT_MAT5         = 0x0D0000,     /* Matlab (tm) V5.0 / GNU Octave 2.1 */
          SF_FORMAT_PVF          = 0x0E0000,     /* Portable Voice Format */
          SF_FORMAT_XI           = 0x0F0000,     /* Fasttracker 2 Extended Instrument */
          SF_FORMAT_HTK          = 0x100000,     /* HMM Tool Kit format */
          SF_FORMAT_SDS          = 0x110000,     /* Midi Sample Dump Standard */
          SF_FORMAT_AVR          = 0x120000,     /* Audio Visual Research */
          SF_FORMAT_WAVEX        = 0x130000,     /* MS WAVE with WAVEFORMATEX */
          SF_FORMAT_SD2          = 0x160000,     /* Sound Designer 2 */
          SF_FORMAT_FLAC         = 0x170000,     /* FLAC lossless file format */
          SF_FORMAT_CAF          = 0x180000,     /* Core Audio File format */
          SF_FORMAT_WVE          = 0x190000,     /* Psion WVE format */
          SF_FORMAT_OGG          = 0x200000,     /* Xiph OGG container */
          SF_FORMAT_MPC2K        = 0x210000,     /* Akai MPC 2000 sampler */
          SF_FORMAT_RF64         = 0x220000,     /* RF64 WAV file */

相关内容