@kevingodell/node-red-ffmpeg published to npm

I wonder if there was a breaking change in this latest version? Not sure but here is my experience, thoughts & questions

In a larger HSS solution I have a pretty advanced sub-flow where I had configured ffmpeg-spawn nodes (now upgraded to ffmpeg nodes) for the purpose to take snapshots from a video stream

Previously I had it working fine with the following args configured in the nodes:

[
    "-f",
    "mp4",
    "-i",
    "pipe:0",
    "-c",
    "mjpeg",
    "-f",
    "image2pipe",
    "-vframes",
    "1",
    "pipe:1"
]

So when the buffer/stream in the msg.payload arrived on the input it worked even though there was no action.command.start included in that msg. But with the latest ffmpeg node version I just noticed it did not

Struggeling and thinking, debugging, long story, I finally added a change node in front that adds msg.action.command "start" to the incoming msg. Then it started working again!

So my question is, is this expected? The start command is now required? If so, fine but I we then need to update our flows.

I also tried to be smarter by defining the following args directly in the ffmpeg node but that was not valid ("Error: cmdArgs "[object Object]" is invalid"):

{
    "command": "start",
    "args": [
        "-f",
        "mp4",
        "-i",
        "pipe:0",
        "-c",
        "mjpeg",
        "-f",
        "image2pipe",
        "-vframes",
        "1",
        "pipe:1"
    ]
}

So just to summarize, is it now necessary to add the start command and is it possible to configure it directly in the node settings to avoid the additional change nodes I temporarily added?

Best regards, Walter

1 Like