我正在使用 OMXPlayer 在無頭 Raspberrypi 上運行一些視頻。但是,加載視頻時有很大的差距,所以我想嘗試一下mpg123應該很快的。
我使用 VLC 將我的 m4v 視頻轉換為 MPG 格式。但是,當我想播放該檔案時,我總是會收到以下錯誤:
[src/libmpg123/parse.c:1204] error: Giving up searching valid MPEG header after 65536 bytes of junk.
為了進一步除錯問題,我嘗試了來自 Internet 的 mpg 檔案:
我正在使用mpg123 version 1.23.8.
我的圓周率:
uname -a
Linux raspi 4.19.66 #1253 Thu Aug 15 11:37:30 BST 2019 armv6l GNU/Linux
日志
pi@raspi:~/button $ wget https://filesamples.com/samples/video/mpg/sample_960x400_ocean_with_audio.mpg
pi@raspi:~/Button $ mv sample_960x400_ocean_with_audio.mpg ocean.mpg
$ mpg123 -vvv ocean.mpg
High Performance MPEG 1.0/2.0/2.5 Audio Player for Layers 1, 2 and 3
version 1.23.8; written and copyright by Michael Hipp and others
free software (LGPL) without any warranty but with best wishes
Decoder: generic
Trying output module: alsa, device: <nil>
Using default module dir: /usr/lib/arm-linux-gnueabihf/mpg123
Module dir: /usr/lib/arm-linux-gnueabihf/mpg123
Module path: ./output_alsa.so
Chosen output module: alsa
playlist in normal order:
ocean.mpg
Note: Disabling all formats.
Note: output support for 8000 Hz, 1 channels: 0x77ff
Note: Want to enable format 8000/1 for encodings 0x77ff.
Note: output support for 8000 Hz, 2 channels: 0x77ff
Note: Want to enable format 8000/2 for encodings 0x77ff.
Note: output support for 11025 Hz, 1 channels: 0x77ff
Note: Want to enable format 11025/1 for encodings 0x77ff.
Note: output support for 11025 Hz, 2 channels: 0x77ff
Note: Want to enable format 11025/2 for encodings 0x77ff.
Note: output support for 12000 Hz, 1 channels: 0x77ff
Note: Want to enable format 12000/1 for encodings 0x77ff.
Note: output support for 12000 Hz, 2 channels: 0x77ff
Note: Want to enable format 12000/2 for encodings 0x77ff.
Note: output support for 16000 Hz, 1 channels: 0x77ff
Note: Want to enable format 16000/1 for encodings 0x77ff.
Note: output support for 16000 Hz, 2 channels: 0x77ff
Note: Want to enable format 16000/2 for encodings 0x77ff.
Note: output support for 22050 Hz, 1 channels: 0x77ff
Note: Want to enable format 22050/1 for encodings 0x77ff.
Note: output support for 22050 Hz, 2 channels: 0x77ff
Note: Want to enable format 22050/2 for encodings 0x77ff.
Note: output support for 24000 Hz, 1 channels: 0x77ff
Note: Want to enable format 24000/1 for encodings 0x77ff.
Note: output support for 24000 Hz, 2 channels: 0x77ff
Note: Want to enable format 24000/2 for encodings 0x77ff.
Note: output support for 32000 Hz, 1 channels: 0x77ff
Note: Want to enable format 32000/1 for encodings 0x77ff.
Note: output support for 32000 Hz, 2 channels: 0x77ff
Note: Want to enable format 32000/2 for encodings 0x77ff.
Note: output support for 44100 Hz, 1 channels: 0x77ff
Note: Want to enable format 44100/1 for encodings 0x77ff.
Note: output support for 44100 Hz, 2 channels: 0x77ff
Note: Want to enable format 44100/2 for encodings 0x77ff.
Note: output support for 48000 Hz, 1 channels: 0x77ff
Note: Want to enable format 48000/1 for encodings 0x77ff.
Note: output support for 48000 Hz, 2 channels: 0x77ff
Note: Want to enable format 48000/2 for encodings 0x77ff.
Audio driver: alsa
Audio device: (null)
Audio capabilities:
(matrix of [S]tereo or [M]ono support for sample format and rate in Hz)
| s16 | u16 | s32 | u32 | s24 | u24 | f32 | s8 | u8 | ulaw | alaw |
------|-------|-------|-------|-------|-------|-------|-------|-------|-------|-------|-------|
8000 | M/S | M/S | M/S | M/S | M/S | M/S | M/S | M/S | M/S | M/S | M/S |
11025 | M/S | M/S | M/S | M/S | M/S | M/S | M/S | M/S | M/S | M/S | M/S |
12000 | M/S | M/S | M/S | M/S | M/S | M/S | M/S | M/S | M/S | M/S | M/S |
16000 | M/S | M/S | M/S | M/S | M/S | M/S | M/S | M/S | M/S | M/S | M/S |
22050 | M/S | M/S | M/S | M/S | M/S | M/S | M/S | M/S | M/S | M/S | M/S |
24000 | M/S | M/S | M/S | M/S | M/S | M/S | M/S | M/S | M/S | M/S | M/S |
32000 | M/S | M/S | M/S | M/S | M/S | M/S | M/S | M/S | M/S | M/S | M/S |
44100 | M/S | M/S | M/S | M/S | M/S | M/S | M/S | M/S | M/S | M/S | M/S |
48000 | M/S | M/S | M/S | M/S | M/S | M/S | M/S | M/S | M/S | M/S | M/S |
Terminal control enabled, press 'h' for listing of keys and functions.
Playing MPEG stream 1 of 1: ocean.mpg ...
Note: Junk at the beginning (0x000001b3)
Note: Junk at the beginning (0xffe01800)
Note: Junk at the beginning (0xf3418000)
Note: Junk at the beginning (0xfb800000)
Note: Junk at the beginning (0xfb800000)
Note: Junk at the beginning (0xfb800000)
Note: Junk at the beginning (0xfb800000)
Note: Junk at the beginning (0xfb800000)
Note: Junk at the beginning (0xfb800000)
Note: Junk at the beginning (0xfb800000)
Note: Junk at the beginning (0xfb800000)
Note: Junk at the beginning (0xfb800000)
Note: Junk at the beginning (0xffe01800)
Note: Junk at the beginning (0xf3418000)
Note: Junk at the beginning (0xffe01800)
Note: Junk at the beginning (0xf3418000)
Note: Junk at the beginning (0xffe01800)
Note: Junk at the beginning (0xf3418000)
Note: Junk at the beginning (0xffe01800)
Note: Junk at the beginning (0xf3418000)
Note: Junk at the beginning (0xfa5800d7)
Note: Junk at the beginning (0xf4b001af)
Note: Junk at the beginning (0xffe01800)
Note: Junk at the beginning (0xf3418000)
Note: Junk at the beginning (0xfa5800d7)
Note: Junk at the beginning (0xf4b04bff)
Note: Junk at the beginning (0xfa5800d7)
Note: Junk at the beginning (0xf4b04bff)
Note: Junk at the beginning (0xfa5800d7)
Note: Junk at the beginning (0xfa5800d7)
Note: Junk at the beginning (0xf4b001af)
Note: Junk at the beginning (0xffe01800)
Note: Junk at the beginning (0xf3418000)
Note: Junk at the beginning (0xf4b001af)
Note: Junk at the beginning (0xf4b001af)
Note: Junk at the beginning (0xfa5800d7)
Note: Junk at the beginning (0xfa5800d7)
Note: Junk at the beginning (0xfa5800d7)
Note: Junk at the beginning (0xfa5800d7)
Note: Junk at the beginning (0xfa5800d7)
Note: Junk at the beginning (0xf4b001af)
Note: Junk at the beginning (0xf4b001af)
Note: Junk at the beginning (0xf4b001af)
Note: Junk at the beginning (0xf4b001af)
Note: Junk at the beginning (0xffe01800)
Note: Junk at the beginning (0xf3418000)
Note: Junk at the beginning (0xffe01800)
Note: Junk at the beginning (0xf3418000)
Note: Junk at the beginning (0xf662680c)
[src/libmpg123/parse.c:1204] error: Giving up searching valid MPEG header after 65536 bytes of junk.
[0:01] Decoding of ocean.mpg finished.
uj5u.com熱心網友回復:
...該視頻的檔案名非常容易誤導,它沒有音頻。嘗試一個實際包含音頻的檔案,比如
wget "https://images.wikia.com/monchbox/images/0/01/Beep-sound.ogg"
ffmpeg -i Beep-sound.ogg beep.mpg
mpg123 beep.mpg
...如果你能被激怒,如果你能向 filesamples.com 系統管理員抱怨誤導性檔案名,以及 mpg123 開發人員抱怨 mpg 檔案不包含音頻時出現的糟糕錯誤訊息,那就太好了:o
轉載請註明出處,本文鏈接:https://www.uj5u.com/qiye/445484.html
