Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

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.

share|improve this question
    
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!) –  Olivier Dulac Mar 27 at 13:49
add comment

2 Answers 2

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
share|improve this answer
add comment

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 http://stackoverflow.com/questions/12999674/ffmpeg-which-file-formats-support-stdin-usage

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.