ffmpeg not seeing past junk in ogg files

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

ffmpeg not seeing past junk in ogg files

Silent Strider
Greetings,

I try to identify some music/sound files extracted from a game.

I noticed, that ffmpeg/ffprobe do ignore junk at the beginning of mp3
files (e.g. "Skipping 217 bytes of junk at 0"), but not on other, in
my case ogg files.

If trying to identify such a padded ogg file, neither ffmpeg nor
ffprobe deliver me the actual content. Only the message "Invalid data
found when processing input" is thrown.

I added functional files as attachment. The ogg_padded file is only
padded with 25x 0x00.

Is there a way to work around this problem? I tried setting the
probesize, formatprobesize and analyzeduration to tremendous values,
but this didn't help.

The command line shows this:
ffprobe version git-2019-12-26-b0d0d7e Copyright (c) 2007-2019 the
FFmpeg developers
   built with gcc 9.2.1 (GCC) 20191125
   configuration: --enable-gpl --enable-version3 --enable-sdl2
--enable-fontconfig --enable-gnutls --enable-iconv --enable-libass
--enable-libdav1d --enable-libbluray --enable-libfreetype
--enable-libmp3lame --enable-libopencore-amrnb
--enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus
--enable-libshine --enable-libsnappy --enable-libsoxr --enable-libtheora
--enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp
--enable-libx264 --enable-libx265 --enable-libxml2 --enable-libzimg
--enable-lzma --enable-zlib --enable-gmp --enable-libvidstab
--enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa
--enable-libspeex --enable-libxvid --enable-libaom --enable-libmfx
--enable-ffnvcodec --enable-cuvid --enable-d3d11va --enable-nvenc
--enable-nvdec --enable-dxva2 --enable-avisynth --enable-libopenmpt
--enable-amf
   libavutil      56. 37.100 / 56. 37.100
   libavcodec     58. 65.100 / 58. 65.100
   libavformat    58. 35.101 / 58. 35.101
   libavdevice    58.  9.101 / 58.  9.101
   libavfilter     7. 69.101 /  7. 69.101
   libswscale      5.  6.100 /  5.  6.100
   libswresample   3.  6.100 /  3.  6.100
   libpostproc    55.  6.100 / 55.  6.100
[mp3 @ 000002538defbf00] Skipping 217 bytes of junk at 0.
[mp3 @ 000002538defbf00] Estimating duration from bitrate, this may be
inaccurate
Input #0, mp3, from 'mp3_padded':
   Duration: 00:00:10.53, start: 0.000000, bitrate: 37 kb/s
     Stream #0:0: Audio: mp3, 48000 Hz, stereo, fltp, 37 kb/s

ffprobe version git-2019-12-26-b0d0d7e Copyright (c) 2007-2019 the
FFmpeg developers
   built with gcc 9.2.1 (GCC) 20191125
   configuration: --enable-gpl --enable-version3 --enable-sdl2
--enable-fontconfig --enable-gnutls --enable-iconv --enable-libass
--enable-libdav1d --enable-libbluray --enable-libfreetype
--enable-libmp3lame --enable-libopencore-amrnb
--enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus
--enable-libshine --enable-libsnappy --enable-libsoxr --enable-libtheora
--enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp
--enable-libx264 --enable-libx265 --enable-libxml2 --enable-libzimg
--enable-lzma --enable-zlib --enable-gmp --enable-libvidstab
--enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa
--enable-libspeex --enable-libxvid --enable-libaom --enable-libmfx
--enable-ffnvcodec --enable-cuvid --enable-d3d11va --enable-nvenc
--enable-nvdec --enable-dxva2 --enable-avisynth --enable-libopenmpt
--enable-amf
   libavutil      56. 37.100 / 56. 37.100
   libavcodec     58. 65.100 / 58. 65.100
   libavformat    58. 35.101 / 58. 35.101
   libavdevice    58.  9.101 / 58.  9.101
   libavfilter     7. 69.101 /  7. 69.101
   libswscale      5.  6.100 /  5.  6.100
   libswresample   3.  6.100 /  3.  6.100
   libpostproc    55.  6.100 / 55.  6.100
[ogg @ 0000026922d5bf00] 25 bytes of comment header remain
Input #0, ogg, from 'ogg_unpadded':
   Duration: 00:00:09.62, start: 0.000000, bitrate: 41 kb/s
     Stream #0:0: Audio: vorbis, 48000 Hz, mono, fltp, 70 kb/s

ffprobe version git-2019-12-26-b0d0d7e Copyright (c) 2007-2019 the
FFmpeg developers
   built with gcc 9.2.1 (GCC) 20191125
   configuration: --enable-gpl --enable-version3 --enable-sdl2
--enable-fontconfig --enable-gnutls --enable-iconv --enable-libass
--enable-libdav1d --enable-libbluray --enable-libfreetype
--enable-libmp3lame --enable-libopencore-amrnb
--enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus
--enable-libshine --enable-libsnappy --enable-libsoxr --enable-libtheora
--enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp
--enable-libx264 --enable-libx265 --enable-libxml2 --enable-libzimg
--enable-lzma --enable-zlib --enable-gmp --enable-libvidstab
--enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa
--enable-libspeex --enable-libxvid --enable-libaom --enable-libmfx
--enable-ffnvcodec --enable-cuvid --enable-d3d11va --enable-nvenc
--enable-nvdec --enable-dxva2 --enable-avisynth --enable-libopenmpt
--enable-amf
   libavutil      56. 37.100 / 56. 37.100
   libavcodec     58. 65.100 / 58. 65.100
   libavformat    58. 35.101 / 58. 35.101
   libavdevice    58.  9.101 / 58.  9.101
   libavfilter     7. 69.101 /  7. 69.101
   libswscale      5.  6.100 /  5.  6.100
   libswresample   3.  6.100 /  3.  6.100
   libpostproc    55.  6.100 / 55.  6.100
ogg_padded: Invalid data found when processing input

_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".

ogg_padded (66K) Download Attachment
mp3_padded (65K) Download Attachment
ogg_unpadded (66K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: ffmpeg not seeing past junk in ogg files

Carl Eugen Hoyos-2


> Am 27.12.2019 um 15:16 schrieb Silent Strider <[hidden email]>:

> I try to identify some music/sound files extracted from a game.
>
> I noticed, that ffmpeg/ffprobe do ignore junk at the beginning of mp3
> files (e.g. "Skipping 217 bytes of junk at 0"), but not on other, in
> my case ogg files.

mp3 is both an audio codec and a „raw“ format, meaning you can cut an mp3 file at any position and most media players will accept any part as a valid audio file.
There is no „raw“ vorbis format, the codec only exists within a container (like ogg).
Some containers like mpeg program and mpeg transport streams allow cutting (like mp3 streams). I am not sure if this is theoretically possible with ogg (it is for example not possible for avi, mov and mkv), but FFmpeg may not support random cuts for ogg, possibly because the FFmpeg developers were never big fans of the ogg format.

Carl Eugen
_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: ffmpeg not seeing past junk in ogg files

Carl Eugen Hoyos-2
In reply to this post by Silent Strider


> Am 27.12.2019 um 15:16 schrieb Silent Strider <[hidden email]>:
>
> ffprobe version git-2019-12-26-b0d0d7e Copyright (c) 2007-2019 the
> FFmpeg developers
>   built with gcc 9.2.1 (GCC) 20191125
>   configuration: --enable-gpl --enable-version3 --enable-sdl2
> --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass
> --enable-libdav1d --enable-libbluray --enable-libfreetype
> --enable-libmp3lame --enable-libopencore-amrnb
> --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus
> --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libtheora
> --enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp
> --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libzimg
> --enable-lzma --enable-zlib --enable-gmp --enable-libvidstab
> --enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa
> --enable-libspeex --enable-libxvid --enable-libaom --enable-libmfx
> --enable-ffnvcodec --enable-cuvid --enable-d3d11va --enable-nvenc
> --enable-nvdec --enable-dxva2 --enable-avisynth --enable-libopenmpt
> --enable-amf
>   libavutil      56. 37.100 / 56. 37.100
>   libavcodec     58. 65.100 / 58. 65.100
>   libavformat    58. 35.101 / 58. 35.101
>   libavdevice    58.  9.101 / 58.  9.101
>   libavfilter     7. 69.101 /  7. 69.101
>   libswscale      5.  6.100 /  5.  6.100
>   libswresample   3.  6.100 /  3.  6.100
>   libpostproc    55.  6.100 / 55.  6.100
> ogg_padded: Invalid data found when processing input

Does it work with the following command line?
$ ffmpeg -f ogg -i ogg_padded

Carl Eugen
_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: ffmpeg not seeing past junk in ogg files

Silent Strider
Am 27.12.2019 um 16:51 schrieb Carl Eugen Hoyos:

>
>> Am 27.12.2019 um 15:16 schrieb Silent Strider <[hidden email]>:
>>
>> ffprobe version git-2019-12-26-b0d0d7e Copyright (c) 2007-2019 the
>> FFmpeg developers
>>    built with gcc 9.2.1 (GCC) 20191125
>>    configuration: --enable-gpl --enable-version3 --enable-sdl2
>> --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass
>> --enable-libdav1d --enable-libbluray --enable-libfreetype
>> --enable-libmp3lame --enable-libopencore-amrnb
>> --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus
>> --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libtheora
>> --enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp
>> --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libzimg
>> --enable-lzma --enable-zlib --enable-gmp --enable-libvidstab
>> --enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa
>> --enable-libspeex --enable-libxvid --enable-libaom --enable-libmfx
>> --enable-ffnvcodec --enable-cuvid --enable-d3d11va --enable-nvenc
>> --enable-nvdec --enable-dxva2 --enable-avisynth --enable-libopenmpt
>> --enable-amf
>>    libavutil      56. 37.100 / 56. 37.100
>>    libavcodec     58. 65.100 / 58. 65.100
>>    libavformat    58. 35.101 / 58. 35.101
>>    libavdevice    58.  9.101 / 58.  9.101
>>    libavfilter     7. 69.101 /  7. 69.101
>>    libswscale      5.  6.100 /  5.  6.100
>>    libswresample   3.  6.100 /  3.  6.100
>>    libpostproc    55.  6.100 / 55.  6.100
>> ogg_padded: Invalid data found when processing input
> Does it work with the following command line?
> $ ffmpeg -f ogg -i ogg_padded
Interestingly, it does.  There is no information about skipped bytes at
all though:
[ogg @ 000002403d7ebf40] 25 bytes of comment header remain
Input #0, ogg, from 'ogg_padded':
   Duration: 00:00:09.62, start: 0.000000, bitrate: 41 kb/s
     Stream #0:0: Audio: vorbis, 48000 Hz, mono, fltp, 70 kb/s

Even in debug log level it doesn't tell:
[ogg @ 0000019ea2ddc040] Opening 'ogg_padded' for reading
[file @ 0000019ea2ddc940] Setting default whitelist 'file,crypto'
[ogg @ 0000019ea2ddc040] 25 bytes of comment header remain
[ogg @ 0000019ea2ddc040] Before avformat_find_stream_info() pos: 8676
bytes read:82799 seeks:2 nb_streams:1
[ogg @ 0000019ea2ddc040] All info found
[ogg @ 0000019ea2ddc040] After avformat_find_stream_info() pos: 8676
bytes read:82799 seeks:2 frames:1
Input #0, ogg, from 'ogg_padded':
   Duration: 00:00:09.62, start: 0.000000, bitrate: 41 kb/s
     Stream #0:0, 1, 1/48000: Audio: vorbis, 48000 Hz, mono, fltp, 70 kb/s
[AVIOContext @ 0000019ea2de5c80] Statistics: 82799 bytes read, 2 seeks

Thank you for the possibility. In the files I currently manage there are
only mp3 or ogg inside.


>
> Carl Eugen
> _______________________________________________
> ffmpeg-user mailing list
> [hidden email]
> https://ffmpeg.org/mailman/listinfo/ffmpeg-user
>
> To unsubscribe, visit link above, or email
> [hidden email] with subject "unsubscribe".


_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".