在 65536 字节的垃圾之后放弃搜索有效的 MPEG header

Giving up searching valid MPEG header after 65536 bytes of junk

我正在 运行 使用 OMXPlayer 在无头 Raspberrypi 上播放一些视频。但是,加载视频时有相当大的差距,所以我想尝试一下mpg123,应该很快。

我使用 VLC 将我的 m4v 视频转换为 MPG 格式。但是,当我想播放文件时,我总是会收到以下错误:

[src/libmpg123/parse.c:1204] error: Giving up searching valid MPEG header after 65536 bytes of junk.

为了进一步调试问题,我尝试了来自互联网的 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.

...该视频的文件名非常具有误导性,它没有音频。尝试一个实际包含音频的文件,比如

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