i shared it above
So this is code 2 I believe (converting .oga to .mp3):
ffmpeg -i {{ $node[“Telegram”].binary.data.fileName }} {{ $node[“Telegram”].binary.data.fileName.replace(‘.oga’,‘.mp3’) }}
What is code 1 and code?
How to upload the file and download the file (and later delete it)?
I got n8n on a docker
Also currently have ffmpeg installed on my server but when trying to run ffmpeg -i through the command node it doesn’t recognize it
the first one simply uploads the file via ssh the last one downloads it.
scp {{ $(‘Telegram_get_file_private’).item.json.result.file_path }} [email protected]:/voice/tmp
and
ERROR: Command failed: scp voice/file_0.oga [email protected]:/voice/tmp Host key verification failed. scp: Connection closed
thats a SSH error
@RedPacketSec so i fixed that and can successfully upload a file through ssh node.
But what node did you use for the
"ffmpeg -i {{ $json.fileName }} {{ $json.fileName.replace(‘.oga’,‘.mp3’) }} "
I used the command node but it fails
First one is the ssh node the other is the command node. The ssh node only allows upload and download, not running other commands. so i used the ffmpeg
Found the “Execute command” option for command node. Successfully converted it, downloaded it, now how did you pass on the “value” for file in the Whisper node?
- Just changed “body content type to form/data” and it worked
Thx @RedPacketSec (your examples here were quite helpful. Appreciate it :))
All commands are done on the box you are ssh ing to.