1

i want to developing a service of online converter in local network by ffmpeg.

the service receives address of file to converting and output address for put converted file to it.

can ffmpeg do saving output file in another system in local network ?

or i must first saving output file and then moving to another system ?

soroush
  • 365
  • 1
  • 3
  • 6

2 Answers2

0

Yes, you can mount remote system to directory. And save output file to mounted directory.

0

mount

Filesystem mounting options:

  1. NFS is more normal in UNIX/Linux world
  2. SMB is more normal in the Windows world.

It isn't clear which context you are in. There isn't anything specific to ffmpeg about either of those.

ssh

Another option if you are in UNIX/Linux world or simulating Linux under Windows is to stream over ssh. Most commands will send their output to STDOUT if you specify - as the output file. So you could do something like:

ffmpeg <your options> - | ssh user@remote 'cat > /tmp/ffmpeg.out'

(I use that technique with tar as the input pretty often.) The ffmpeg docs say that the last arguement is the output file, so as weird as it may be you should put the - (dash) with spaces around it as the last argument to ffmpeg, after all of your other options are specified.

performance

Writing your output to a remote system can cause the processing on the original system to slow down because the buffers fill up faster due to the slower IO. If all of the buffers fill up the ffmpeg process will have to wait until it can process more. If you can run more processes in parallel it might help, but sooner or later you'll probably saturate the network connection and more processes/CPU's won't help.

chicks
  • 3,639
  • 10
  • 26
  • 36
  • thanks for your answer. i try this command ffmpeg -i video.mp4 | ssh root@192.168.1.1 -p 12345 'cat > /tmp/ffmpeg.avi' but output file in 192.168.1.1 is empty and 0byte size. @chicks – soroush Jul 02 '18 at 05:25
  • You left out the `-` (dash) as the output file. I added a bit to my answer to emphasize the importance and placement of the `-`. – chicks Jul 02 '18 at 20:43