How can I transfer an image captured by gstreamer to another machine without writing a file?

0

I am capturing an image using gstreamer:

gst-launch-0.10 v4l2src ! ffmpegcolorspace ! pngenc ! filesink location=$date.png

I am then scping the file to a remote server:

scp $date.png remote:pics

What I would like to do is skip the file on the local filesystem step. Can I do something like

gst-launch-0.10 v4l2src ! ffmpegcolorspace ! pngenc | ssh remote "cat > pics/$date.png"

Chas. Owens

Posted 2010-09-24T14:44:19.060

Reputation: 1 842

Answers

1

I am reading that

cat file | ssh uid@remotehost 'cat > /full/path/file'

should do what you need (replace cat file with your plumbing), but I am not sure how much of a hack is it (how will it perform on decently sized streams.

Alternative is to somehow mount the remote point - sshfs, cifs, nfs and then no magic is necessary.

Unreason

Posted 2010-09-24T14:44:19.060

Reputation: 353

The trick is getting the file contents to come out on stdout (thay is what I don't know, this is more of a gstreamer question than a how does ssh work question). The sshfs idea has merit though, that should be easy enough to setup – Chas. Owens – 2010-09-24T17:41:06.203