amix filter hanging

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

amix filter hanging

Jonathan Girven
I am trying to merge the audio of my video with a music track, whilst
keeping the picture part the same. To do this I am trying to use the
amix filter, but FFmpeg seems to hang when I run the command. Am I
doing something wrong?

$ ffmpeg -y -i aae635a604ff16c9a320376398ac121b_0.000_5.015.mp4 -i
full_dillon_in_pro_audio.mp3 -filter_complex
"[1:a][0:a]amix=inputs=2[m]" -map 0:v -map [m] -c:v libx264 -preset
ultrafast -c:a aac 4615491572977860225_PLzGS5hkLTwTfxlgkk0.mp4

ffmpeg version N-86394-g66cf78e Copyright (c) 2000-2017 the FFmpeg developers
  built with gcc 4.9.2 (Debian 4.9.2-10)
  configuration: --prefix=/usr/local
--extra-cflags=-I/usr/local/include --extra-ldflags=-L/usr/local/lib
--bindir=/usr/local/bin --disable-doc --disable-static --enable-shared
--disable-ffplay --extra-libs=-ldl --enable-version3
--enable-libfreetype --enable-libx264 --enable-gpl --enable-openssl
--enable-nonfree --disable-debug
  libavutil      55. 63.100 / 55. 63.100
  libavcodec     57. 96.101 / 57. 96.101
  libavformat    57. 72.101 / 57. 72.101
  libavdevice    57.  7.100 / 57.  7.100
  libavfilter     6. 91.100 /  6. 91.100
  libswscale      4.  7.101 /  4.  7.101
  libswresample   2.  8.100 /  2.  8.100
  libpostproc    54.  6.100 / 54.  6.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from
'aae635a604ff16c9a320376398ac121b_0.000_5.015.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder         : Lavf57.71.100
  Duration: 00:00:05.04, start: 0.000000, bitrate: 656 kb/s
    Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p,
1280x720 [SAR 1:1 DAR 16:9], 522 kb/s, 30 fps, 30 tbr, 15360 tbn, 60
tbc (default)
    Metadata:
      handler_name    : VideoHandler
    Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz,
stereo, fltp, 127 kb/s (default)
    Metadata:
      handler_name    : SoundHandler
[mp3 @ 0xf20a60] Estimating duration from bitrate, this may be inaccurate
Input #1, mp3, from 'full_dillon_in_pro_audio.mp3':
  Metadata:
    title           : Dillon in Pro Audio
    artist          : Jingle Punks
    album           : YouTube Audio Library
    genre           : Dance & Electronic
    encoder         : Google
  Duration: 00:01:18.84, start: 0.000000, bitrate: 320 kb/s
    Stream #1:0: Audio: mp3, 44100 Hz, stereo, s16p, 320 kb/s
Stream mapping:
  Stream #0:1 (aac) -> amix:input1 (graph 0)
  Stream #1:0 (mp3) -> amix:input0 (graph 0)
  Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264))
  amix (graph 0) -> Stream #0:1 (aac)
Press [q] to stop, [?] for help
[libx264 @ 0xf338e0] using SAR=1/1
[libx264 @ 0xf338e0] using cpu capabilities: MMX2 SSE2Fast SSSE3
SSE4.2 AVX FMA3 AVX2 LZCNT BMI2
[libx264 @ 0xf338e0] profile Constrained Baseline, level 3.1
[libx264 @ 0xf338e0] 264 - core 148 - H.264/MPEG-4 AVC codec -
Copyleft 2003-2016 - http://www.videolan.org/x264.html - options:
cabac=0 ref=1 deblock=0:0:0 analyse=0:0 me=dia subme=0 psy=1
psy_rd=1.00:0.00 mixed_ref=0 me_range=16 chroma_me=1 trellis=0
8x8dct=0 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=0
threads=12 lookahead_threads=2 sliced_threads=0 nr=0 decimate=1
interlaced=0 bluray_compat=0 constrained_intra=0 bframes=0 weightp=0
keyint=250 keyint_min=25 scenecut=0 intra_refresh=0 rc=crf mbtree=0
crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=0
Output #0, mp4, to '4615491572977860225_PLzGS5hkLTwTfxlgkk0.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder         : Lavf57.72.101
    Stream #0:0(und): Video: h264 (libx264) ([33][0][0][0] / 0x0021),
yuv420p(progressive), 1280x720 [SAR 1:1 DAR 16:9], q=-1--1, 30 fps,
15360 tbn, 30 tbc (default)
    Metadata:
      handler_name    : VideoHandler
      encoder         : Lavc57.96.101 libx264
    Side data:
      cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: -1
    Stream #0:1: Audio: aac (LC) ([64][0][0][0] / 0x0040), 44100 Hz,
stereo, fltp, 128 kb/s (default)
    Metadata:
      encoder         : Lavc57.96.101 aac
<hang for more than 10 minutes>

I can email the files if helpful.
_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://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: amix filter hanging

Jonathan Girven
I am still finding that the amix filter hangs in the current git master branch.
I thought I would share links to some example files if anyone was interested
in trying to reproduce the issue:

BigBuckBunny_320x180_t10.mp4

full_dillon_in_pro_audio.mp3

Here is the output from the command I am using:

$ ffmpeg -y -i BigBuckBunny_320x180_t10.mp4 -i full_dillon_in_pro_audio.mp3 -filter_complex "[1:a][0:a]amix=inputs=2[m]" -map 0:v -map [m] -c:v libx264 -preset ultrafast -c:a aac output.mp4
ffmpeg version N-87042-gf8d0689 Copyright (c) 2000-2017 the FFmpeg developers
  built with gcc 4.9.2 (Debian 4.9.2-10)
  configuration: --prefix=/usr/local --extra-cflags=-I/usr/local/include --extra-ldflags=-L/usr/local/lib --bindir=/usr/local/bin --disable-doc --disable-static --enable-shared --disable-ffplay --extra-libs=-ldl --enable-version3 --enable-libfreetype --enable-libx264 --enable-gpl --enable-openssl --enable-nonfree --disable-debug
  libavutil      55. 74.100 / 55. 74.100
  libavcodec     57.103.100 / 57.103.100
  libavformat    57. 77.100 / 57. 77.100
  libavdevice    57.  7.101 / 57.  7.101
  libavfilter     6.100.100 /  6.100.100
  libswscale      4.  7.103 /  4.  7.103
  libswresample   2.  8.100 /  2.  8.100
  libpostproc    54.  6.100 / 54.  6.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'BigBuckBunny_320x180_t10.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    title           : Big Buck Bunny
    artist          : Blender Foundation
    composer        : Blender Foundation
    date            : 2008
    encoder         : Lavf57.68.100
  Duration: 00:00:10.01, start: 0.000000, bitrate: 277 kb/s
    Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 320x180 [SAR 1:1 DAR 16:9], 143 kb/s, 24 fps, 24 tbr, 12288 tbn, 48 tbc (default)
    Metadata:
      handler_name    : VideoHandler
    Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 127 kb/s (default)
    Metadata:
      handler_name    : SoundHandler
[mp3 @ 0x1cbb740] Estimating duration from bitrate, this may be inaccurate
Input #1, mp3, from 'full_dillon_in_pro_audio.mp3':
  Metadata:
    title           : Dillon in Pro Audio
    artist          : Jingle Punks
    album           : YouTube Audio Library
    genre           : Dance & Electronic
    encoder         : Google
  Duration: 00:01:18.84, start: 0.000000, bitrate: 320 kb/s
    Stream #1:0: Audio: mp3, 44100 Hz, stereo, s16p, 320 kb/s
Stream mapping:
  Stream #0:1 (aac) -> amix:input1 (graph 0)
  Stream #1:0 (mp3) -> amix:input0 (graph 0)
  Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264))
  amix (graph 0) -> Stream #0:1 (aac)
Press [q] to stop, [?] for help
[libx264 @ 0x1cd7b80] using SAR=1/1
[libx264 @ 0x1cd7b80] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 AVX2 LZCNT BMI2
[libx264 @ 0x1cd7b80] profile Constrained Baseline, level 1.2
[libx264 @ 0x1cd7b80] 264 - core 148 - H.264/MPEG-4 AVC codec - Copyleft 2003-2017 - http://www.videolan.org/x264.html - options: cabac=0 ref=1 deblock=0:0:0 analyse=0:0 me=dia subme=0 psy=1 psy_rd=1.00:0.00 mixed_ref=0 me_range=16 chroma_me=1 trellis=0 8x8dct=0 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=0 threads=6 lookahead_threads=1 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=0 weightp=0 keyint=250 keyint_min=24 scenecut=0 intra_refresh=0 rc=crf mbtree=0 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=0
Output #0, mp4, to 'output.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    title           : Big Buck Bunny
    artist          : Blender Foundation
    composer        : Blender Foundation
    date            : 2008
    encoder         : Lavf57.77.100
    Stream #0:0(und): Video: h264 (libx264) (avc1 / 0x31637661), yuv420p(progressive), 320x180 [SAR 1:1 DAR 16:9], q=-1--1, 24 fps, 12288 tbn, 24 tbc (default)
    Metadata:
      handler_name    : VideoHandler
      encoder         : Lavc57.103.100 libx264
    Side data:
      cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: -1
    Stream #0:1: Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 128 kb/s (default)
    Metadata:
      encoder         : Lavc57.103.100 aac
<hang for more than 10 minutes>
Reply | Threaded
Open this post in threaded view
|

Re: amix filter hanging

Carl Eugen Hoyos-2
2017-08-24 15:38 GMT+02:00 Jonathan Girven <[hidden email]>:

> $ ffmpeg -y -i BigBuckBunny_320x180_t10.mp4
> -i full_dillon_in_pro_audio.mp3
> -filter_complex "[1:a][0:a]amix=inputs=2[m]" -map 0:v -map [m] -c:v libx264
> -preset ultrafast -c:a aac output.mp4

Is the issue also reproducible if you use the native mpeg4
encoder instead of an external library?
$ ffmpeg -i BigBuckBunny_320x180_t10.mp4
-i full_dillon_in_pro_audio.mp3
-filter_complex "[1:a][0:a]amix=inputs=2[m]" -map 0:v -map [m]
-vcodec mpeg4 -qscale 2 out.mp4

Carl Eugen
_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://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: amix filter hanging

Paul B Mahol
On 8/24/17, Carl Eugen Hoyos <[hidden email]> wrote:

> 2017-08-24 15:38 GMT+02:00 Jonathan Girven <[hidden email]>:
>
>> $ ffmpeg -y -i BigBuckBunny_320x180_t10.mp4
>> -i full_dillon_in_pro_audio.mp3
>> -filter_complex "[1:a][0:a]amix=inputs=2[m]" -map 0:v -map [m] -c:v
>> libx264
>> -preset ultrafast -c:a aac output.mp4
>
> Is the issue also reproducible if you use the native mpeg4
> encoder instead of an external library?
> $ ffmpeg -i BigBuckBunny_320x180_t10.mp4
> -i full_dillon_in_pro_audio.mp3
> -filter_complex "[1:a][0:a]amix=inputs=2[m]" -map 0:v -map [m]
> -vcodec mpeg4 -qscale 2 out.mp4

Its not reproducible if one disables video with -vn.
_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://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: amix filter hanging

Jonathan Girven
> Is the issue also reproducible if you use the native mpeg4
> encoder instead of an external library?
> $ ffmpeg -i BigBuckBunny_320x180_t10.mp4
> -i full_dillon_in_pro_audio.mp3
> -filter_complex "[1:a][0:a]amix=inputs=2[m]" -map 0:v -map [m]
> -vcodec mpeg4 -qscale 2 out.mp4

It is not reproducible with the native mpeg4 library, no. Should I
contact the x264 mailing list instead?

> Its not reproducible if one disables video with -vn.

Agreed.
_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://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: amix filter hanging

Paul B Mahol
On 8/25/17, Jonathan Girven <[hidden email]> wrote:
>> Is the issue also reproducible if you use the native mpeg4
>> encoder instead of an external library?
>> $ ffmpeg -i BigBuckBunny_320x180_t10.mp4
>> -i full_dillon_in_pro_audio.mp3
>> -filter_complex "[1:a][0:a]amix=inputs=2[m]" -map 0:v -map [m]
>> -vcodec mpeg4 -qscale 2 out.mp4
>
> It is not reproducible with the native mpeg4 library, no. Should I
> contact the x264 mailing list instead?

Nope.

>
>> Its not reproducible if one disables video with -vn.
>
> Agreed.
> _______________________________________________
> ffmpeg-user mailing list
> [hidden email]
> http://ffmpeg.org/mailman/listinfo/ffmpeg-user
>
> To unsubscribe, visit link above, or email
> [hidden email] with subject "unsubscribe".
_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://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: amix filter hanging

Paul B Mahol
In reply to this post by Jonathan Girven
On 8/25/17, Jonathan Girven <[hidden email]> wrote:

>> Is the issue also reproducible if you use the native mpeg4
>> encoder instead of an external library?
>> $ ffmpeg -i BigBuckBunny_320x180_t10.mp4
>> -i full_dillon_in_pro_audio.mp3
>> -filter_complex "[1:a][0:a]amix=inputs=2[m]" -map 0:v -map [m]
>> -vcodec mpeg4 -qscale 2 out.mp4
>
> It is not reproducible with the native mpeg4 library, no. Should I
> contact the x264 mailing list instead?
>
>> Its not reproducible if one disables video with -vn.
>
> Agreed.

Try latest FFmpeg git master and report back.
_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://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: amix filter hanging

Jonathan Girven
> Try latest FFmpeg git master and report back.

Great, that doesn't hang any more. Thanks.

Presumably fixed by:
http://ffmpeg.org/pipermail/ffmpeg-devel/2017-August/215318.html
_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

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