[FFmpeg-user] ffmpeg-lambda-layer and concat protocol

Maksym Portianoi portimaksym at gmail.com
Wed Feb 24 22:12:49 EET 2021


Hi!

I am trying to concatenate two .mp3 files using ffmpeg lambda-layer. I have
what I think is the correct command, but I struggle to represent it in code
so that it is formatted correctly for the lambda layer. Here is a piece of
code that I am struggling to get right:


spawnSync(

  '/opt/ffmpeg/ffmpeg',

  [

    '-i',

    '"concat:/tmp/pt1.mp3|/tmp/pt2.mp3"',

    '-acodec',

    'copy',

    `/tmp/${fileName}`

  ],

  { stdio: 'inherit' }

)


The error I'm getting: "concat:/tmp/pt1.mp3|/tmp/pt2.mp3": No such file or
directory.


I tried to list files in /tmp/ folder - both files listed in the input are
there, not sure why lambda layer can't find them.


Similar question:
https://lists.ffmpeg.org/pipermail/ffmpeg-user/2019-December/046299.html.
Ffmpeg concatenate protocol documentation:
https://trac.ffmpeg.org/wiki/Concatenate#protocol.


Thanks in advance!


More information about the ffmpeg-user mailing list