Opened 3 years ago

Closed 3 years ago

#2863 closed defect (needs_more_info)

libwavpack: Output too short

Reported by: lachs0r Owned by:
Priority: normal Component: avcodec
Version: git-master Keywords: libwavpack
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

When trying to convert audio files with a certain length to WavPack? using the libwavpack encoder, the resulting file is shorter than expected and tools like wvgain complain about an incorrect number of samples.

ffmpeg outputs a warning when that happens, e.g.: [libwavpack @ 0x2335b00] 1 frames left in the queue on closing

Log:

ffmpeg -y -i 404.wav -c:a libwavpack -ss 228.06 -to 442.85 out.wv -report
ffmpeg version N-55519-g7ec7d62 Copyright (c) 2000-2013 the FFmpeg developers
  built on Aug 14 2013 11:31:24 with gcc 4.8 (SUSE Linux)
  configuration: --prefix=/usr --libdir=/usr/lib64 --enable-gpl --enable-version3 --enable-nonfree --enable-static --disable-shared --enable-pic --enable-libvorbis --enable-libmp3lame --enable-libwavpack --enable-avresample
  libavutil      52. 42.100 / 52. 42.100
  libavcodec     55. 27.100 / 55. 27.100
  libavformat    55. 13.102 / 55. 13.102
  libavdevice    55.  3.100 / 55.  3.100
  libavfilter     3. 82.100 /  3. 82.100
  libavresample   1.  1.  0 /  1.  1.  0
  libswscale      2.  4.100 /  2.  4.100
  libswresample   0. 17.103 /  0. 17.103
  libpostproc    52.  3.100 / 52.  3.100
Splitting the commandline.
Reading option '-y' ... matched as option 'y' (overwrite output files) with argument '1'.
Reading option '-i' ... matched as input file with argument '404.wav'.
Reading option '-c:a' ... matched as option 'c' (codec name) with argument 'libwavpack'.
Reading option '-ss' ... matched as option 'ss' (set the start time offset) with argument '228.06'.
Reading option '-to' ... matched as option 'to' (record or transcode stop time) with argument '442.85'.
Reading option 'out.wv' ... matched as output file.
Reading option '-report' ... matched as option 'report' (generate a report) with argument '1'.
Finished splitting the commandline.
Parsing a group of options: global .
Applying option y (overwrite output files) with argument 1.
Applying option report (generate a report) with argument 1.
Successfully parsed a group of options.
Parsing a group of options: input file 404.wav.
Successfully parsed a group of options.
Opening an input file: 404.wav.
[wav @ 0x35672c0] Format wav probed with size=2048 and score=99
[wav @ 0x35672c0] File position before avformat_find_stream_info() is 80
[wav @ 0x35672c0] parser not found for codec pcm_s16le, packets or times may be invalid.
[wav @ 0x35672c0] probing stream 0 pp:4
[wav @ 0x35672c0] probing stream 0 pp:3
[wav @ 0x35672c0] probing stream 0 pp:2
[wav @ 0x35672c0] probing stream 0 pp:1
[wav @ 0x35672c0] probed stream 0
[wav @ 0x35672c0] parser not found for codec pcm_s16le, packets or times may be invalid.
[wav @ 0x35672c0] max_analyze_duration 5000000 reached at 5015510 microseconds
[wav @ 0x35672c0] File position after avformat_find_stream_info() is 897104
Guessed Channel Layout for  Input Stream #0.0 : stereo
Input #0, wav, from '404.wav':
  Metadata:
    encoder         : Lavf55.13.102
  Duration: 00:35:50.40, bitrate: 1411 kb/s
    Stream #0:0, 218, 1/44100: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 44100 Hz, stereo, s16, 1411 kb/s
Successfully opened the file.
Parsing a group of options: output file out.wv.
Applying option c:a (codec name) with argument libwavpack.
Applying option ss (set the start time offset) with argument 228.06.
Applying option to (record or transcode stop time) with argument 442.85.
Successfully parsed a group of options.
Opening an output file: out.wv.
Successfully opened the file.
detected 4 logical cores
[graph 0 input from stream 0:0 @ 0x3579940] Setting 'time_base' to value '1/44100'
[graph 0 input from stream 0:0 @ 0x3579940] Setting 'sample_rate' to value '44100'
[graph 0 input from stream 0:0 @ 0x3579940] Setting 'sample_fmt' to value 's16'
[graph 0 input from stream 0:0 @ 0x3579940] Setting 'channel_layout' to value '0x3'
[graph 0 input from stream 0:0 @ 0x3579940] tb:1/44100 samplefmt:s16 samplerate:44100 chlayout:0x3
[audio format for output stream 0:0 @ 0x3579ec0] Setting 'sample_fmts' to value 's32'
[audio format for output stream 0:0 @ 0x3579ec0] auto-inserting filter 'auto-inserted resampler 0' between the filter 'Parsed_anull_0' and the filter 'audio format for output stream 0:0'
[AVFilterGraph @ 0x35581a0] query_formats: 5 queried, 9 merged, 3 already done, 0 delayed
[auto-inserted resampler 0 @ 0x357cf80] ch:2 chl:stereo fmt:s16 r:44100Hz -> ch:2 chl:stereo fmt:s32 r:44100Hz
Output #0, wv, to 'out.wv':
  Metadata:
    encoder         : Lavf55.13.102
    Stream #0:0, 0, 1/90000: Audio: wavpack (libwavpack), 44100 Hz, stereo, s32, 128 kb/s
Stream mapping:
  Stream #0:0 -> #0:0 (pcm_s16le -> libwavpack)
Press [q] to stop, [?] for help
size=    5646kB time=00:00:46.81 bitrate= 988.0kbits/s    
size=   12936kB time=00:01:42.53 bitrate=1033.5kbits/s    
size=   20328kB time=00:02:38.26 bitrate=1052.2kbits/s    
[output stream 0:0 @ 0x357af00] EOF on sink link output stream 0:0:default.
No more output streams to write to, finishing.
size=   27489kB time=00:03:34.73 bitrate=1048.7kbits/s    
video:0kB audio:27489kB subtitle:0 global headers:0kB muxing overhead 0.000330%
[libwavpack @ 0x3577f20] 1 frames left in the queue on closing
19073 frames successfully decoded, 0 decoding errors
[AVIOContext @ 0x35787e0] Statistics: 2 seeks, 1053 writeouts
[AVIOContext @ 0x356f8a0] Statistics: 78151680 bytes read, 0 seeks

Change History (4)

comment:1 Changed 3 years ago by cehoyos

  • Keywords libwavpack added; wavpack removed

Is a specific sample required to reproduce this problem?

comment:2 Changed 3 years ago by lachs0r

I’ve been able to reproduce it with many different input files, but it doesn’t happen with every file.

I think it happens when the last block to write is shorter than the configured WavPack? block size, but I’m not sure.

comment:3 Changed 3 years ago by cehoyos

Please provide (or point to) a sample.

comment:4 Changed 3 years ago by cehoyos

  • Resolution set to needs_more_info
  • Status changed from new to closed

Please reopen this ticket if you can provide a sample.

Note: See TracTickets for help on using tickets.