9

My problem is this. I have access to a server that hosts many video files, most of them are very large and not well compressed. I intend to make a reduced quality smaller size copy of these on my local machine for better access.

The problem is that the server does not have ftp access. I can scp the files to my machine and then use ffmpeg to reduce the size, but I'll run out of space if I copy all of the files locally.

I am looking for a way to directly input a network file to ffmpeg, that way I'll be able to write a script that will overnight get me all the videos in reduced size.

2
  • You should edit the question : As it stands, its a "XYProblem": asking to do Y, when you really want to do X. You really want to input a network file remotely, not "using scp" (It sounds like: "how can I shave my beard using a bycicle" : the real need is shaving the beard, not really using a bycicle ^^) Don't mix your need with the means to do so (so that you can find better means, using people's feedback!) Commented Mar 27, 2014 at 13:49
  • See answers by Flup and cpugeniusmv for the right ways to do it. However, if you have a network bottleneck, it would make sense to compress on the server-side and then transfer the compressed version over network (if ffmpeg exists on that machine).
    – orion
    Commented Jan 22, 2015 at 11:33

2 Answers 2

11

You can use sshfs to make the remote files appear in a directory on the local machine.

You don't say what distro you're using on your client, but this is cribbed from the Ubuntu sshfs documentation:

  1. Install the sshfs package (aptitude install sshfs)
  2. Add your user to the fuse group (sudo gpasswd -a username fuse)
  3. Mount the filesystem using the sshfs command

To use sshfs, make yourself a directory (we'll call this /mountpoint), and do

sshfs -o idmap=user remote_user@remote_server:/remote/directory /mountpoint

The remote files will now appear in /mountpoint, but are in fact still on the remote server. Any changes you make will be made remotely and not locally.

To unmount the directory, do

fusermount -u /mountpoint
7

If you have ssh access to the remote system, you could do something like

ssh server cat path/to/video | ffmpeg -i - [...]

The - causes ffmpeg to read from stdin instead of a file.

Caveat, though, not all formats support pipes. See https://stackoverflow.com/questions/12999674/ffmpeg-which-file-formats-support-stdin-usage

1

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .