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!
Am Mi., 24. Feb. 2021 um 21:44 Uhr schrieb Maksym Portianoi <portimaksym@gmail.com>:
'"concat:/tmp/pt1.mp3|/tmp/pt2.mp3"',
Unrelated to your question - I have no idea what a lambda-layer is: Above is 100% equivalent to "cat pt1.mp3 pt2.mp3 > $(fileName)", this is often not ok for mp3 files. If it is ok, you can use cat, no need for FFmpeg. In general, when asking questions here, you are expected to provide an actual FFmpeg command line that you tested in a shell of your choice together with the complete, uncut console output. Carl Eugen
Oh I see. No, cat won't solve my issue, thanks for the suggestion though. Yeah I had a feeling that this mailing list is not the right place for me to ask my question but wanted to try anyway because I found someone elses' question on the same issue. I am referring to this post: https://lists.ffmpeg.org/pipermail/ffmpeg-user/2019-December/046299.html Is there any way I can see the thread for that question? On Wed, Feb 24, 2021 at 4:18 PM Carl Eugen Hoyos <ceffmpeg@gmail.com> wrote:
Am Mi., 24. Feb. 2021 um 21:44 Uhr schrieb Maksym Portianoi <portimaksym@gmail.com>:
'"concat:/tmp/pt1.mp3|/tmp/pt2.mp3"',
Unrelated to your question - I have no idea what a lambda-layer is: Above is 100% equivalent to "cat pt1.mp3 pt2.mp3 > $(fileName)", this is often not ok for mp3 files. If it is ok, you can use cat, no need for FFmpeg.
In general, when asking questions here, you are expected to provide an actual FFmpeg command line that you tested in a shell of your choice together with the complete, uncut console output.
Carl Eugen _______________________________________________ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-user
To unsubscribe, visit link above, or email ffmpeg-user-request@ffmpeg.org with subject "unsubscribe".
Am Mi., 24. Feb. 2021 um 23:37 Uhr schrieb Maksym Portianoi <portimaksym@gmail.com>:
No, cat won't solve my issue
Then your command line most likely will not work either, independent from "lambda". The concat protocol works exactly as cat. Please find out what top-posting means and avoid it here. Carl Eugen
Carl Eugen Hoyos <ceffmpeg@gmail.com> writes:
Am Mi., 24. Feb. 2021 um 23:37 Uhr schrieb Maksym Portianoi <portimaksym@gmail.com>:
No, cat won't solve my issue
Then your command line most likely will not work either, independent from "lambda". The concat protocol works exactly as cat.
Most likely, you need to look at either the concat demuxer https://ffmpeg.org/ffmpeg-all.html#concat-1 or the concat filter https://ffmpeg.org/ffmpeg-all.html#concat-3 https://trac.ffmpeg.org/wiki/Concatenate Looking at your original post, I would suggest you get a working ffmpeg command before trying to stuff it into some pipeline. Leo
On 2021-02-24 14:36, Maksym Portianoi wrote:
…Yeah I had a feeling that this mailing list is not the right place for me to ask my question but wanted to try anyway because I found someone elses' question on the same issue. I am referring to this post: https://lists.ffmpeg.org/pipermail/ffmpeg-user/2019-December/046299.html
Hello, Maksym, and welcome to the ffmpeg-users email list. Yes, it also seems to me that this is the wrong place to ask questions about "ffmpeg-lambda-layer". If I look at the URL mentioned in the ffmpeg-user message you linked to, <https://serverlessrepo.aws.amazon.com/applications/arn:aws:serverlessrepo:us -east-1:145266761615:applications~ffmpeg-lambda-layer <https://serverlessrepo.aws.amazon.com/applications/arn:aws:serverlessrepo:us-east-1:145266761615:applications~ffmpeg-lambda-layer>> I see a page which says, "FFmpeg/FFprobe Lambda Layer for Amazon Linux 2 AMIs. Static build of FFmpeg/FFprobe for Amazon Linux 2, packaged as a Lambda layer." That says to me that the Lambda Layer is a mechanism defined by Amazon AWS. This list is about ffmpeg, as invoked on a command line on conventional PCs and similar. Thus it's reasonable that this is not the right place to get support for either the Lambda Layer mechanism or the ffmpeg-lambda-layer application.
Is there any way I can see the thread for that question?
Yes. If you look at the header of that archived message, you see a link, "Next message (by thread): [FFmpeg-user] Problem with configuring with yasm". The fact that the title of the next message is different than the title of the archived message says that there are no (more) replies in that thread. Also, the next line of the archived message is: " Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] " If you click on the link, "[ thread ]", the archive takes you to a page listing all the messages to that list for that month, sorted by message thread. Find the original message in that listing. It is the only one in its thread. The FFmpeg-user list archive behaves similarly to a number of other list archives. The same approach may work for you with other lists. Good luck concatenating your mp3 files! Best regards, —Jim DeLaHunt
participants (4)
-
Carl Eugen Hoyos -
Jim DeLaHunt -
Leo Butler -
Maksym Portianoi