Opened 7 years ago

Closed 6 years ago

Last modified 6 years ago

#6603 closed defect (fixed)

Regression bug when using amerge filter and WAV files.

Reported by: Atarikid Owned by: Marton Balint
Priority: important Component: ffmpeg
Version: git-master Keywords: regression
Cc: Marton Balint Blocked By:
Blocking: Reproduced by developer: yes
Analyzed by developer: yes

Description

I found a regression bug with the latest builds 3.3.0 or higher. Works fine with 3.2.2 and lower.

When using amerge with WAV files, FFmpeg always throws an error. Using any other audio file (read: non .WAV) it works fine.

Here is the full ffmpeg output

stef-MacBook-Pro:~ stef $ /Users/stef/Desktop/ffmpeg-multibit265 -i /Users/stef/Desktop/issue/test.mp4 -c:a aac -ab 128k -c:v libx264 -crf 20 -r 25 -s 480x270 -aspect 16:9 -pix_fmt yuv420p -filter_complex "amovie=/Users/stef/Desktop/issue/_left.wav[0];amovie=/Users/stef/Desktop/issue/_right.wav[1];[0][1]amerge=inputs=2" -sn -y /Users/stef/Movies/test.mov
ffmpeg version 3.3 Copyright (c) 2000-2017 the FFmpeg developers

built with Apple LLVM version 8.1.0 (clang-802.0.42)
configuration: --prefix=/Volumes/tempdisk/sw --as=yasm --enable-gpl --enable-version3 --enable-pthreads --disable-ffplay --disable-ffserver --disable-shared --enable-static --enable-libvpx --disable-decoder=libvpx --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvorbis --enable-libx264 --enable-libx265 --enable-libxvid --enable-zlib --enable-avfilter --enable-fontconfig --enable-libfreetype --enable-libass --enable-libvidstab --enable-libsnappy --enable-filters --enable-postproc --enable-runtime-cpudetect --disable-indev=qtkit --disable-indev=x11grab_xcb
libavutil 55. 58.100 / 55. 58.100
libavcodec 57. 89.100 / 57. 89.100
libavformat 57. 71.100 / 57. 71.100
libavdevice 57. 6.100 / 57. 6.100
libavfilter 6. 82.100 / 6. 82.100
libswscale 4. 6.100 / 4. 6.100
libswresample 2. 7.100 / 2. 7.100
libpostproc 54. 5.100 / 54. 5.100

Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/Users/stef/Desktop/issue/test.mp4':

Metadata:

major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
creation_time : 2017-08-20T17:16:53.000000Z
encoder : Lavf57.76.100

Duration: 00:00:03.07, start: -0.001451, bitrate: 536 kb/s

Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 480x270 [SAR 1:1 DAR 16:9], 439 kb/s, 25 fps, 25 tbr, 12800 tbn, 50 tbc (default)
Metadata:

creation_time : 2017-08-20T17:16:53.000000Z
handler_name : VideoHandler

Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 96 kb/s (default)
Metadata:

creation_time : 2017-08-20T17:16:53.000000Z
handler_name : SoundHandler

[Parsed_amovie_0 @ 0x7feec7d009e0] Channel layout is not set in output stream 0, guessed channel layout is 'mono'
[Parsed_amovie_1 @ 0x7feec7d03e00] Channel layout is not set in output stream 0, guessed channel layout is 'mono'
Stream mapping:

amerge (graph 0) -> Stream #0:0 (aac)
Stream #0:0 -> #0:1 (h264 (native) -> h264 (libx264))

Press [q] to stop, ? for help
[Parsed_amovie_0 @ 0x7feec7f30340] Channel layout is not set in output stream 0, guessed channel layout is 'mono'
[Parsed_amovie_1 @ 0x7feec7c18760] Channel layout is not set in output stream 0, guessed channel layout is 'mono'
[Parsed_amerge_2 @ 0x7feec7e02c40] Input channel layouts overlap: output layout will be determined by the number of distinct input channels
[aac @ 0x7feec9801200] more samples than frame size (avcodec_encode_audio2)
Audio encoding failed

The [Parsed_amovie are nothing serious. It is the [aac @ 0x7fa3c0808c00] more samples than frame size (avcodec_encode_audio2) that is holding it.

Note:
If changing -c:a aac to -c:a pcm_s16le it works fine. Set it to any other audio codec it fails as it does with aac.

Again, when using FFmpeg 3.2.2 it is working fine as expected.

Attached the needed file to reproduce the issue.

Attachments (1)

issuefiles.zip (583.4 KB ) - added by Atarikid 7 years ago.
Files to reproduce the amerge issue

Download all attachments as: .zip

Change History (12)

by Atarikid, 7 years ago

Attachment: issuefiles.zip added

Files to reproduce the amerge issue

comment:1 by Atarikid, 7 years ago

BTW the above was tested with FFmpeg 3.3 and also the latest daily build.

comment:2 by Marton Balint, 7 years ago

Cc: Marton Balint added

Can you bisect this to a specific commit?

comment:3 by Atarikid, 7 years ago

Not sure why you meant. The issue is very clear and an example source file is provided to reproduce it 100%

comment:4 by Atarikid, 7 years ago

Last edited 7 years ago by Atarikid (previous) (diff)

comment:5 by Atarikid, 7 years ago

Last edited 7 years ago by Atarikid (previous) (diff)

comment:7 by Carl Eugen Hoyos, 7 years ago

Keywords: regression added
Priority: normalimportant

comment:8 by Atarikid, 6 years ago

Any ETA for a fix?

comment:9 by Marton Balint, 6 years ago

Owner: set to Marton Balint
Status: newopen

Patch posted to ffmpeg-devel.

comment:10 by Marton Balint, 6 years ago

Analyzed by developer: set
Reproduced by developer: set
Resolution: fixed
Status: openclosed

Pushed fix to git master.

Note: See TracTickets for help on using tickets.