Opened 2 years ago

Last modified 21 months ago

#9758 new defect

Voc file decoded incompletely

Reported by: Desperado Owned by:
Priority: normal Component: undetermined
Version: unspecified Keywords:
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

I try to convert a 9MB voc file from an old game to MP3 format like this:

ffmpeg -i ./File0001.voc fixed2.mp3

Ffmpeg estimates the length of the voc file with over an hour, but the output file is only 3 seconds long:

ffmpeg version N-102754-g604924a069-tessus https://evermeet.cx/ffmpeg/ Copyright (c) 2000-2021 the FFmpeg developers

built with Apple clang version 11.0.0 (clang-1100.0.33.17)
configuration: --cc=/usr/bin/clang --prefix=/opt/ffmpeg --extra-version=tessus --enable-avisynth --enable-fontconfig --enable-gpl --enable-libaom --enable-libass --enable-libbluray --enable-libdav1d --enable-libfreetype --enable-libgsm --enable-libmodplug --enable-libmp3lame --enable-libmysofa --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenh264 --enable-libopenjpeg --enable-libopus --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvmaf --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-libzimg --enable-libzmq --enable-libzvbi --enable-version3 --pkg-config-flags=--static --disable-ffplay
libavutil 57. 0.100 / 57. 0.100
libavcodec 59. 1.101 / 59. 1.101
libavformat 59. 3.100 / 59. 3.100
libavdevice 59. 0.100 / 59. 0.100
libavfilter 8. 0.102 / 8. 0.102
libswscale 6. 0.100 / 6. 0.100
libswresample 4. 0.100 / 4. 0.100
libpostproc 56. 0.100 / 56. 0.100

[voc @ 0x7fa520700240] Estimating duration from bitrate, this may be inaccurate
Guessed Channel Layout for Input Stream #0.0 : mono
Input #0, voc, from './File0001.voc':

Duration: 01:08:11.70, start: 0.000000, bitrate: 177 kb/s
Stream #0:0: Audio: pcm_u8, 22222 Hz, mono, u8, 177 kb/s

Stream mapping:

Stream #0:0 -> #0:0 (pcm_u8 (native) -> mp3 (libmp3lame))

Press [q] to stop, ? for help
Output #0, mp3, to 'fixed2.mp3':

Metadata:

TSSE : Lavf59.3.100

Stream #0:0: Audio: mp3, 22050 Hz, mono, s16p

Metadata:

encoder : Lavc59.1.101 libmp3lame

size= 11kB time=00:00:02.58 bitrate= 33.3kbits/s speed=24.8x
video:0kB audio:10kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 2.141571%

I tried this on Mac and a friend also tested this under Windows.

Change History (6)

comment:1 by Balling, 23 months ago

We would need File0001.voc.

in reply to:  1 comment:2 by Desperado, 23 months ago

Replying to Balling:

We would need File0001.voc.

Thanks for the answer!

You can download it from here:

https://drive.google.com/file/d/1CBcr3tSuR7XnYokDlqn01YahcsVF1vsU/view

I mistyped the size btw it's 90 MB.
I wonder if this is a standard conform voc file. My theory is that it has one header and multiple data blocks and ffmpeg only extracts the first one, but I'm no voc expert.

comment:3 by pross, 22 months ago

The length (1h08m11s) is an estimate based on the file size. The file only contains 3 seconds of standard VOC audio packets. The remaining packets are "other" data that ffmpeg skips over during playback:

skip: type=0xc, size=177
skip: type=0xa7, size=10988711
skip: type=0x74, size=7631988
skip: type=0x75, size=7631988
skip: type=0x73, size=7697779
skip: type=0x3b, size=5587514
skip: type=0x7f, size=10196105
skip: type=0xb6, size=480591
skip: type=0x55, size=6198654
skip: type=0xa2, size=8351622
skip: type=0x73, size=7566195
skip: type=0x70, size=7895664
skip: type=0x8d, size=10518896
skip: type=0x44, size=4407870

in reply to:  3 comment:4 by Desperado, 22 months ago

Replying to pross:

The length (1h08m11s) is an estimate based on the file size. The file only contains 3 seconds of standard VOC audio packets. The remaining packets are "other" data that ffmpeg skips over during playback:

skip: type=0xc, size=177
skip: type=0xa7, size=10988711
skip: type=0x74, size=7631988
skip: type=0x75, size=7631988
skip: type=0x73, size=7697779
skip: type=0x3b, size=5587514
skip: type=0x7f, size=10196105
skip: type=0xb6, size=480591
skip: type=0x55, size=6198654
skip: type=0xa2, size=8351622
skip: type=0x73, size=7566195
skip: type=0x70, size=7895664
skip: type=0x8d, size=10518896
skip: type=0x44, size=4407870

Thanks for the answer. Are you sure that the "other data" cannot be decoded in the same manner as the first 3 seconds? For example, if you restarted the decoding one byte after the end of the 3 second block, would it work?

If not, do you see any other obvious audio data in the "other" data?

Regards

comment:5 by pross, 22 months ago

If not, do you see any other obvious audio data in the "other" data?

its data, it could be anything.

can you provide more information about the source of the file? which game did it come from?

in reply to:  5 comment:6 by Desperado, 21 months ago

Replying to pross:

If not, do you see any other obvious audio data in the "other" data?

its data, it could be anything.

can you provide more information about the source of the file? which game did it come from?

Afaik it's from an old PC Game called "Strawberry Magic". It has a file ADVENT.RES from which this voc was extracted with the usual tools. Other audio files could not be extracted. For ADVENT.RES, this link may work:

https://drive.google.com/file/d/1Pi0fmd86k3fTFITs5o444ejo3U0a7bTk/view?usp=sharing

Note: See TracTickets for help on using tickets.