I'm running some videos on a headless Raspberrypi using OMXPlayer. However, there is quite a gap when loading the video so I wanted to try out mpg123
which is supposed to be quite fast.
I used VLC to convert my m4v video to an MPG format. However when I want to play the file I do consistently get the following error:
[src/libmpg123/parse.c:1204] error: Giving up searching valid MPEG header after 65536 bytes of junk.
In order to further debug the issue I tried an mpg file from the internet:
I'm using the mpg123 version 1.23.8
.
My Pi:
uname -a
Linux raspi 4.19.66+ #1253 Thu Aug 15 11:37:30 BST 2019 armv6l GNU/Linux
Log
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.
... that video has a very misleading filename, it has no audio. try a file which actually contains audio, like
wget "https://images.wikia.com/monchbox/images/0/01/Beep-sound.ogg"
ffmpeg -i Beep-sound.ogg beep.mpg
mpg123 beep.mpg
... if you can be arsed, would be nice if you could complain to the filesamples.com sysadmin about the misleading filename, and the mpg123 developers about the shitty error message presented when the mpg file doesn't contain audio :o