Node-red-contrib-ffmpeg-spawn dev

...continued from Node-red-contrib-ffmpeg-spawn

I am currently working on adding support for credentials in node-red-contrib-ffmpeg-spawn.

The situation is that many people, myself included, use ffmpeg to connect to an ip camera that has the username and password embedded in the url, such as rtsp://username:password@192.168.1.33:554/cam/realmonitor?channel=1&subtype=1. It bothers me a bit that I can't easily share my flows without having to painstakingly redact the url by hand and then share it.

I am toying with the option of allowing 1 SECRET to be used in the args that will be replaced by the credential, such as the pictures illustrate:


If you choose to use a secret value, the string literal SECRET in the args array will be replaced by the secret stored as a credential.

I think this may also help to more safely store some sensitive info when using projects, but I am not 100% sure on that. I was also considering having it as a password box instead of text to obscure it from being visible, but I DO like being able to see the secret.

Also, this does not apply for when the args are injected from an inject node. That can be managed by some external node that handles credentials.

*updated category

1 Like

That is a pitty, otherwise you could have used the Node-RED build-in credential mechanism. Then indeed your credentials are also not shared when you export yor flow, and other nodes cannot access it. But if course you cannot see the credentials.
I have not used yet the TypedInput type "cred", so not sure what its possibilities are...
Now I am off. Have a nice new year!!

Alas, the pity has been averted. Thanks for the concern, but it is using the credential mechanism, which comes in 2 flavors, text and password. Currently i was using it as text because it makes it convenient to see the value in the editor, while still encrypting it in the node-red credential system and excluding it when exporting flows (I think).

Of course, it would be convenient if the user could pick whether to use the password or text version, but i do not believe the type can be changed at runtime. That might be something I can do if a user sets some value in the settings.js file, which would then apply to all of the instances.

Happy new year!

1 Like

Latest version uses typedInput cred for better input styling.

The type of credential can be updated via settings.js to change between text or password, based on the user's preference:

ffmpegSpawn: {
  cmdPath: require('ffmpeg-for-homebridge'),
  cmdOutputsMax: 10,
  secretType: 'text' // or 'password'
}
3 Likes

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.