Opened 3 years ago

Closed 3 years ago

Last modified 3 years ago

#9369 closed defect (fixed)

join audio files command never ends

Reported by: Admir Okovic Owned by:
Priority: normal Component: undetermined
Version: git-master Keywords: join audio
Cc: Admir Okovic Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

Summary of the bug:
I am trying to join two audio files and when i call following command ffmpeg does not stop it just keep running.
Command:

ffmpeg -y -i sideA.wav -i sideB.wav -filter_complex "[0:a][1:a]join=inputs=2[a]" -map "[a]" final.wav -loglevel debug

ffmpeg version 4.4
built on ... ubuntu 20.4

In output log i can not see any issues that will point on existing problem.
After few hours of debuging i realised that when i reorded files command works fine.
Working command:

ffmpeg -y -i sideB.wav -i sideA.wav -filter_complex "[0:a][1:a]join=inputs=2[a]" -map "[a]" final.wav -loglevel debug

Also i realised that when i add delay for one of the files(not both) command also works:
Working command with delay:

ffmpeg -y -i sideA.wav -i sideB.wav -filter_complex "[0:a]adelay=0[a0];[1:a]adelay=1[a1];[a0][a1]join=inputs=2[a]" -map "[a]" final.wav

My guess is that issue is with sideA file since there is no real audio its just some backgrounde noise but either way ffmpeg should not get stuck and block process.

Attachments (1)

Ffmpeg_issue.zip (18.3 KB ) - added by Admir Okovic 3 years ago.

Download all attachments as: .zip

Change History (6)

by Admir Okovic, 3 years ago

Attachment: Ffmpeg_issue.zip added

comment:1 by Michael Koch, 3 years ago

I can reproduce the problem with the Windows version, the console output is below.
This might be the same problem as in ticket 9152.

Michael

C:\Users\astro\Desktop\ffmpeg_test>ffmpeg -y -i sideA.wav -i sideB.wav -filter_complex "[0:a][1:a]join=inputs=2[a]" -map "[a]" final.wav
ffmpeg version 2021-08-08-git-ac0408522a-essentials_build-www.gyan.dev Copyright (c) 2000-2021 the FFmpeg developers

built with gcc 10.3.0 (Rev5, Built by MSYS2 project)
configuration: --enable-gpl --enable-version3 --enable-static --disable-w32threads --disable-autodetect --enable-fontconfig --enable-iconv --enable-gnutls --enable-libxml2 --enable-gmp --enable-lzma --enable-zlib --enable-libsrt --enable-libssh --enable-libzmq --enable-avisynth --enable-sdl2 --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxvid --enable-libaom --enable-libopenjpeg --enable-libvpx --enable-libass --enable-libfreetype --enable-libfribidi --enable-libvidstab --enable-libvmaf --enable-libzimg --enable-amf --enable-cuda-llvm --enable-cuvid --enable-ffnvcodec --enable-nvdec --enable-nvenc --enable-d3d11va --enable-dxva2 --enable-libmfx --enable-libgme --enable-libopenmpt --enable-libopencore-amrwb --enable-libmp3lame --enable-libtheora --enable-libvo-amrwbenc --enable-libgsm --enable-libopencore-amrnb --enable-libopus --enable-libspeex --enable-libvorbis --enable-librubberband
libavutil 57. 3.100 / 57. 3.100
libavcodec 59. 4.101 / 59. 4.101
libavformat 59. 4.101 / 59. 4.101
libavdevice 59. 0.100 / 59. 0.100
libavfilter 8. 1.103 / 8. 1.103
libswscale 6. 0.100 / 6. 0.100
libswresample 4. 0.100 / 4. 0.100
libpostproc 56. 0.100 / 56. 0.100

Guessed Channel Layout for Input Stream #0.0 : mono
Input #0, wav, from 'sideA.wav':

Metadata:

encoder : Lavf58.45.100

Duration: 00:00:02.24, bitrate: 128 kb/s
Stream #0:0: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 8000 Hz, mono, s16, 128 kb/s

Guessed Channel Layout for Input Stream #1.0 : mono
Input #1, wav, from 'sideB.wav':

Metadata:

encoder : Lavf58.45.100

Duration: 00:00:02.05, bitrate: 128 kb/s
Stream #1:0: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 8000 Hz, mono, s16, 128 kb/s

Stream mapping:

Stream #0:0 (pcm_s16le) -> join:input0
Stream #1:0 (pcm_s16le) -> join:input1
join -> Stream #0:0 (pcm_s16le)

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

Metadata:

ISFT : Lavf59.4.101

Stream #0:0: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 8000 Hz, stereo, s16, 256 kb/s (default)

Metadata:

encoder : Lavc59.4.101 pcm_s16le

size= 64kB time=00:00:02.04 bitrate= 256.3kbits/s speed=0.202x
video:0kB audio:64kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.119019%
Exiting normally, received signal 2.
Batchvorgang abbrechen (J/N)?

comment:2 by Michael Koch, 3 years ago

Version: unspecifiedgit-master

in reply to:  2 comment:3 by Admir Okovic, 3 years ago

Replying to Michael Koch:
Yes, its seems the same issue as you mentioned.I have few workarounds myself but i would like to know the root cause of this issue and will it be fixed

comment:4 by Elon Musk, 3 years ago

Resolution: fixed
Status: newclosed

in reply to:  4 comment:5 by Admir Okovic, 3 years ago

Replying to richardpl:

Fixed in c245963a218c1b9e2ced204071be51138ce739b5

Thanks for the fast response, it works now.

Note: See TracTickets for help on using tickets.