Opened 6 years ago

Closed 6 years ago

#6727 closed defect (invalid)

[Vorbis parser @ 0x4cf1380] Invalid packet

Reported by: Vitaly Zdanevich Owned by:
Priority: normal Component: undetermined
Version: git-master Keywords: ogg vorbis
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

How to reproduce:
% ffmpeg -i input.ogg output.m4a
On Amazon Lambda! Tried on the underlying platform - Amazon Linux - without a problem.

Input file example
http://www.vorbis.com/music/Epoq-Lepidoptera.ogg
but also I tried few other ogg vorbis input files.

Full log output is here http://paste.ubuntu.com/25712791

In the output file I hear defects.

Attachments (1)

output-corrupted.m4a (1.3 MB ) - added by Vitaly Zdanevich 6 years ago.

Download all attachments as: .zip

Change History (10)

by Vitaly Zdanevich, 6 years ago

Attachment: output-corrupted.m4a added

comment:1 by Vitaly Zdanevich, 6 years ago

I compiled ffmpeg myself from git - result the same - works on Amazon Linux - artefacts in Amazon Lambda.

My first ffmpeg build was from http://johnvansickle.com/ffmpeg

Last edited 6 years ago by Vitaly Zdanevich (previous) (diff)

comment:2 by Vitaly Zdanevich, 6 years ago

Code (Python 3) of the Amazon Lambda function:

import subprocess

import boto3

bucket_audio = boto3.resource('s3').Bucket('my-bucket-name')

def main(event, context):
    print(
        subprocess.run('./ffmpeg -i Epoq-Lepidoptera.ogg /tmp/output.m4a -y',
            shell=True,
            stderr=subprocess.PIPE).stderr.decode()
        )

    with open('/tmp/output.m4a', 'br') as f:
        bucket_audio.put_object(
            Key='test_encoded_m4a_from_lambda.m4a',
            Body=f.read()
        )
Last edited 6 years ago by Vitaly Zdanevich (previous) (diff)

comment:3 by Carl Eugen Hoyos, 6 years ago

Keywords: m4a aac amazon-lambda removed

Please test the following and provide both command line and complete, uncut console output here on the bug tracker to make this a valid ticket, do not use external resources:

$ ffmpeg -i Epoq-Lepidoptera.ogg -t 25 out.wav

Do I understand correctly that out.wav sounds broken on playback?

Last edited 6 years ago by Carl Eugen Hoyos (previous) (diff)

comment:4 by Vitaly Zdanevich, 6 years ago

Tested - wav is also broken on playback, the duration is incomplete too.

$ ./ffmpeg -i ./Epoq-Lepidoptera.ogg -t 25 /tmp/out.wav -y

ffmpeg version N-87770-g1954e62 Copyright (c) 2000-2017 the FFmpeg developers
  built with gcc 4.8.5 (GCC) 20150623 (Red Hat 4.8.5-11)
  configuration: --prefix=/home/ec2-user/ffmpeg_build --extra-cflags=-I/home/ec2-user/ffmpeg_build/include --extra-ldflags='-L/home/ec2-user/ffmpeg_build/lib -ldl' --bindir=/home/ec2-user/bin --pkg-config-flags=--static --enable-static --disable-shared
  libavutil      55. 77.101 / 55. 77.101
  libavcodec     57.106.104 / 57.106.104
  libavformat    57. 82.104 / 57. 82.104
  libavdevice    57.  9.102 / 57.  9.102
  libavfilter     6.106.101 /  6.106.101
  libswscale      4.  7.103 /  4.  7.103
  libswresample   2.  8.100 /  2.  8.100
Input #0, ogg, from './Epoq-Lepidoptera.ogg':
  Duration: 00:05:02.57, start: 0.000000, bitrate: 115 kb/s
    Stream #0:0: Audio: vorbis, 44100 Hz, stereo, fltp, 128 kb/s
    Metadata:
      TITLE           : Lepidoptera
      ARTIST          : Epoq
      ALBUM           : Kahvi Collective
      DATE            : 2002
      COMMENT         : http://www.kahvi.org
Stream mapping:
  Stream #0:0 -> #0:0 (vorbis (native) -> pcm_s16le (native))
Press [q] to stop, [?] for help
Output #0, wav, to '/tmp/output.wav':
  Metadata:
    ISFT            : Lavf57.82.104
    Stream #0:0: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 44100 Hz, stereo, s16, 1411 kb/s
    Metadata:
      TITLE           : Lepidoptera
      ARTIST          : Epoq
      ALBUM           : Kahvi Collective
      DATE            : 2002
      COMMENT         : http://www.kahvi.org
      encoder         : Lavc57.106.104 pcm_s16le
[Vorbis parser @ 0x2bf8860] Invalid packet
    Last message repeated 17 times
[vorbis @ 0x2bfa2c0] Not a Vorbis I audio packet.
Error while decoding stream #0:0: Invalid data found when processing input
[Vorbis parser @ 0x2bf8860] Invalid packet
[vorbis @ 0x2bfa2c0] Not a Vorbis I audio packet.
Error while decoding stream #0:0: Invalid data found when processing input
[Vorbis parser @ 0x2bf8860] Invalid packet
    Last message repeated 1 times
[vorbis @ 0x2bfa2c0] Not a Vorbis I audio packet.
Error while decoding stream #0:0: Invalid data found when processing input
[Vorbis parser @ 0x2bf8860] Invalid packet
    Last message repeated 1 times
[vorbis @ 0x2bfa2c0] Not a Vorbis I audio packet.
Error while decoding stream #0:0: Invalid data found when processing input
size=    3624kB time=00:00:25.00 bitrate=1187.7kbits/s speed= 436x    
video:0kB audio:3624kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.002102%
Last edited 6 years ago by Vitaly Zdanevich (previous) (diff)

comment:5 by Carl Eugen Hoyos, 6 years ago

Does the following work?

$ ffmpeg -cpuflags 0 -i Epoq-Lepidoptera.ogg -t 25 out.wav

comment:6 by Vitaly Zdanevich, 6 years ago

Tried, full output from the AWS Lambda:

START RequestId: cbde1872-af1a-11e7-887f-013c75472a28 Version: $LATEST
b"ffmpeg version N-87770-g1954e62 Copyright (c) 2000-2017 the FFmpeg developers
  built with gcc 4.8.5 (GCC) 20150623 (Red Hat 4.8.5-11)
  configuration: --prefix=/home/ec2-user/ffmpeg_build --extra-cflags=-I/home/ec2-user/ffmpeg_build/include --extra-ldflags='-L/home/ec2-user/ffmpeg_build/lib -ldl' --bindir=/home/ec2-user/bin --pkg-config-flags=--static --enable-static --disable-shared
  libavutil      55. 77.101 / 55. 77.101
  libavcodec     57.106.104 / 57.106.104
  libavformat    57. 82.104 / 57. 82.104
  libavdevice    57.  9.102 / 57.  9.102
  libavfilter     6.106.101 /  6.106.101
  libswscale      4.  7.103 /  4.  7.103
  libswresample   2.  8.100 /  2.  8.100
Input #0, ogg, from 'Epoq-Lepidoptera.ogg':
  Duration: 00:05:02.57, start: 0.000000, bitrate: 115 kb/s
    Stream #0:0: Audio: vorbis, 44100 Hz, stereo, fltp, 128 kb/s
    Metadata:
      TITLE           : Lepidoptera
      ARTIST          : Epoq
      ALBUM           : Kahvi Collective
      DATE            : 2002
      COMMENT         : http://www.kahvi.org
Stream mapping:
  Stream #0:0 -> #0:0 (vorbis (native) -> pcm_s16le (native))
Press [q] to stop, [?] for help
Output #0, wav, to '/tmp/out.wav':
  Metadata:
    ISFT            : Lavf57.82.104
    Stream #0:0: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 44100 Hz, stereo, s16, 1411 kb/s
    Metadata:
      TITLE           : Lepidoptera
      ARTIST          : Epoq
      ALBUM           : Kahvi Collective
      DATE            : 2002
      COMMENT         : http://www.kahvi.org
      encoder         : Lavc57.106.104 pcm_s16le
[Vorbis parser @ 0x399f860] Invalid packet
    Last message repeated 17 times
[vorbis @ 0x39a12c0] Not a Vorbis I audio packet.
Error while decoding stream #0:0: Invalid data found when processing input
[Vorbis parser @ 0x399f860] Invalid packet
[vorbis @ 0x39a12c0] Not a Vorbis I audio packet.
Error while decoding stream #0:0: Invalid data found when processing input
[Vorbis parser @ 0x399f860] Invalid packet
    Last message repeated 1 times
[vorbis @ 0x39a12c0] Not a Vorbis I audio packet.
Error while decoding stream #0:0: Invalid data found when processing input
[Vorbis parser @ 0x399f860] Invalid packet
    Last message repeated 1 times
[vorbis @ 0x39a12c0] Not a Vorbis I audio packet.
Error while decoding stream #0:0: Invalid data found when processing input
size=    3624kB time=00:00:25.00 bitrate=1187.7kbits/s speed= 381x    
video:0kB audio:3624kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.002102%
"
END RequestId: cbde1872-af1a-11e7-887f-013c75472a28
REPORT RequestId: cbde1872-af1a-11e7-887f-013c75472a28	Duration: 376.74 ms	Billed Duration: 400 ms 	Memory Size: 1536 MB	Max Memory Used: 42 MB

The same audio artefacts.

I wrote a ticket to the AWS support.

comment:7 by Carl Eugen Hoyos, 6 years ago

You could test if the issue is also reproducible with version 9f357e2b

comment:8 by Vitaly Zdanevich, 6 years ago

I did:
git checkout 9f357e2b
./configure --enable-static --disable-shared
make
make install

Log from AWS Lambda:

START RequestId: 86b3c730-af2c-11e7-9bb8-5182dba2fd3f Version: $LATEST
b"ffmpeg version N-40355-g9f357e2bcd Copyright (c) 2000-2012 the FFmpeg developers
  built on Oct 12 2017 09:00:42 with gcc 4.8.5 20150623 (Red Hat 4.8.5-11)
  configuration: --enable-static --disable-shared
  libavutil      51. 49.100 / 51. 49.100
  libavcodec     54. 19.100 / 54. 19.100
  libavformat    54.  4.100 / 54.  4.100
  libavdevice    53.  4.100 / 53.  4.100
  libavfilter     2. 72.104 /  2. 72.104
  libswscale      2.  1.100 /  2.  1.100
  libswresample   0. 11.100 /  0. 11.100
Input #0, ogg, from 'Epoq-Lepidoptera.ogg':
  Duration: 00:05:02.57, start: 0.000000, bitrate: 115 kb/s
    Stream #0:0: Audio: vorbis, 44100 Hz, stereo, s16, 128 kb/s
    Metadata:
      TITLE           : Lepidoptera
      ARTIST          : Epoq
      ALBUM           : Kahvi Collective
      DATE            : 2002
      COMMENT         : http://www.kahvi.org
Output #0, wav, to '/tmp/out.wav':
  Metadata:
    encoder         : Lavf54.4.100
    Stream #0:0: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 44100 Hz, stereo, s16, 1411 kb/s
    Metadata:
      TITLE           : Lepidoptera
      ARTIST          : Epoq
      ALBUM           : Kahvi Collective
      DATE            : 2002
      COMMENT         : http://www.kahvi.org
Stream mapping:
  Stream #0:0 -> #0:0 (vorbis -> pcm_s16le)
Press [q] to stop, [?] for help
[vorbis @ 0x221e5e0] Invalid packet
[vorbis @ 0x221e5e0] Not a Vorbis I audio packet.
Error while decoding stream #0:0
[vorbis @ 0x221e5e0] Invalid packet
[vorbis @ 0x221e5e0] Not a Vorbis I audio packet.
Error while decoding stream #0:0
[vorbis @ 0x221e5e0] Invalid packet
[vorbis @ 0x221e5e0] Not a Vorbis I audio packet.
Error while decoding stream #0:0
[vorbis @ 0x221e5e0] Invalid packet
[vorbis @ 0x221e5e0] Not a Vorbis I audio packet.
Error while decoding stream #0:0
[vorbis @ 0x221e5e0] Invalid packet
[vorbis @ 0x221e5e0] Not a Vorbis I audio packet.
Error while decoding stream #0:0
[vorbis @ 0x221e5e0] Invalid packet
[vorbis @ 0x221e5e0] Not a Vorbis I audio packet.
Error while decoding stream #0:0
[vorbis @ 0x221e5e0] Invalid packet
[vorbis @ 0x221e5e0] Not a Vorbis I audio packet.
Error while decoding stream #0:0
[vorbis @ 0x221e5e0] Invalid packet
[vorbis @ 0x221e5e0] Not a Vorbis I audio packet.
Error while decoding stream #0:0
size=    4175kB time=00:00:25.00 bitrate=1368.0kbits/s    \r
video:0kB audio:4175kB global headers:0kB muxing overhead 0.001076%
"
END RequestId: 86b3c730-af2c-11e7-9bb8-5182dba2fd3f
REPORT RequestId: 86b3c730-af2c-11e7-9bb8-5182dba2fd3f	Duration: 255.45 ms	Billed Duration: 300 ms 	Memory Size: 1536 MB	Max Memory Used: 52 MB

But audio is much better - for the five minutes of sound I heard only one glitch-artefact.

comment:9 by Elon Musk, 6 years ago

Resolution: invalid
Status: newclosed
Note: See TracTickets for help on using tickets.