[FFmpeg-user] parallel filter works in mp4 but not mkv or other audio formats.

siamaketezadi siamaketezadi at yahoo.com
Thu Jun 14 10:56:49 EEST 2018

Following command works with ONLY input as mp4 or mkv if -acodec is set libvorbis. But fails with any other input. I would like to run this command to run parallel filters then merge to a final a audio/video or just audio in a batch script for any type of input format (aiff, m4a,flac,wav or mka)

ffmpeg -i 1.mkv -map_metadata 0 -write_id3v2 1 -f matroska -max_muxing_queue_size 400 -map 0:v? -c:v copy -map 0:s? -filter_complex "[0:a]asplit=4 [audio1][audio2][audio3][audio4];[audio1]highpass=f=48[audio1];[audio2]bandpass=f=2700[audio2];[audio3]bandpass=f=3000[audio3];[audio4]highpass=f=26[audio4];[audio1][audio2][audio3][audio4]amerge=inputs=4[x]" -map "[x]":a -ac 2 -acodec pcm_f32le -y out.mkv
I get the following errors:

    COMPATIBLE_BRANDS: isomiso2avc1mp41
    MAJOR_BRAND     : isom
    MINOR_VERSION   : 512
    ENCODER         : Lavf58.12.100
  Duration: 00:04:05.34, start: 0.000000, bitrate: 4645 kb/s
    Stream #0:0: Video: h264 (High), yuv420p(tv, bt709, progressive), 1920x1080 [SAR 1:1 DAR 16:9], 25 fps, 25 tbr, 1k tbn, 50 tbc (default)
      HANDLER_NAME    : VideoHandler
      DURATION        : 00:04:05.240000000
    Stream #0:1: Subtitle: ass (default)
      HANDLER_NAME    : SubtitleHandler
      ENCODER         : Lavc58.18.100 ssa
      DURATION        : 00:04:05.343000000
    Stream #0:2: Audio: pcm_f32le, 44100 Hz, stereo, flt, 2822 kb/s (default)
      ENCODER         : Lavc58.18.100 pcm_f32le
      DURATION        : 00:04:05.295000000
Stream mapping:
  Stream #0:2 (pcm_f32le) -> asplit (graph 0)
  Stream #0:0 -> #0:0 (copy)
  Stream #0:1 -> #0:1 (ass (ssa) -> ass (ssa))
  Stream #0:2 -> #0:2 (pcm_f32le (native) -> pcm_f32le (native))
  amerge (graph 0) -> Stream #0:3 (pcm_f32le)
Press [q] to stop, [?] for help
[Parsed_amerge_5 @ 0x7f9db1f00980] No channel layout for input 1
    Last message repeated 1 times
[AVFilterGraph @ 0x7f9db1e3a480] The following filters could not choose their formats: Parsed_amerge_5
Consider inserting the (a)format filter near their input or output.
Error reinitializing filters!
Failed to inject frame into filter network: Input/output error
Error while processing the decoded data for stream #0:2
Conversion failed!

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: Message signed with OpenPGP
URL: <http://ffmpeg.org/pipermail/ffmpeg-user/attachments/20180614/ad19f609/attachment.sig>

More information about the ffmpeg-user mailing list