TCP + TIFF
Marianna Smidth Buschle
msb at qtec.com
Wed Jan 5 10:26:18 UTC 2022
Is it possible to send TIFF images over TCP?
Fx for JPEG I can do:
-Send:
gst-launch-1.0 v4l2src device=/dev/video4
selection=crop,left=0,width=1024,top=0,height=1024 ! video/x-raw,
width=1024, height=1024, framerate=24000/1000, format=GRAY8 ! jpegenc !
tcpserversink host=0.0.0.0 port=5000 buffers-max=48 buffers-soft-max=24
recover-policy=1 --gst-debug=*:3
-Receive:
gst-launch-1.0 tcpclientsrc host=10.10.150.227 port=5000 ! jpegdec !
videoconvert ! autovideosink sync=0 --gst-debug=*:
But I get problems when I try the same with TIFF:
-Send:
gst-launch-1.0 v4l2src device=/dev/video4
selection=crop,left=0,width=1024,top=0,height=1024 ! video/x-raw,
width=1024, height=1024, framerate=24000/1000, format=GRAY8 ! avenc_tiff
compression-algo=raw ! tcpserversink host=0.0.0.0 port=5000
buffers-max=48 buffers-soft-max=24 recover-policy=1 --gst-debug=*:3
-Receive:
gst-launch-1.0 tcpclientsrc host=10.10.150.227 port=5000 ! avdec_tiff !
fakesink dump=1 --gst-debug=*:3
0:00:00.061036289 48696 0x5569f7c20860 WARN videodecoder
gstvideodecoder.c:2598:gst_video_decoder_chain:<avdec_tiff0> error:
decoder not initialized
0:00:00.061140509 48696 0x5569f7c20860 WARN basesrc
gstbasesrc.c:3127:gst_base_src_loop:<tcpclientsrc0> error: streaming
stopped, reason not-negotiated (-4)
If I try:
gst-launch-1.0 tcpclientsrc host=10.10.150.227 port=5000 ! image/tiff !
avdec_tiff ! fakesink dump=1 --gst-debug=*:3
0:00:01.230105809 48720 0x564728525860 WARN libav
gstavviddec.c:1955:gst_ffmpegviddec_handle_frame:<avdec_tiff0> Failed to
send data for decoding
0:00:01.230299137 48720 0x7f9f7c003440 ERROR libav :0:: Invalid TIFF header
Same with parsebin:
gst-launch-1.0 tcpclientsrc host=10.10.150.227 port=5000 ! parsebin !
avdec_tiff ! fakesink dump=1 --gst-debug=*:3
0:00:01.260515317 48740 0x5605ea3a5980 WARN libav
gstavviddec.c:1955:gst_ffmpegviddec_handle_frame:<avdec_tiff0> Failed to
send data for decoding
0:00:01.260643524 48740 0x7fcdd0002ed0 ERROR libav :0:: Invalid TIFF header
And decodebin just stalls:
gst-launch-1.0 tcpclientsrc host=10.10.150.227 port=5000 ! decodebin !
fakesink dump=1 --gst-debug=*:3
Moreover if I just save/load to/from file:
gst-launch-1.0 v4l2src num-buffers=1 device=/dev/video4
selection=crop,left=0,width=1024,top=0,height=1024 ! video/x-raw,
width=1024, height=1024, framerate=24000/1000, format=GRAY8 ! avenc_tiff
compression-algo=raw ! filesink location=/tmp/test.tiff
Works with decodebin:
gst-launch-1.0 filesrc location=test.tiff ! decodebin ! videoconvert !
imagefreeze ! autovideosink sync=0 --gst-debug=*:3
Doesn't without. Same errors if trying parsebin, typefind, etc.
So I guess it has to do with being able to read the correct amount of
data out?
I manage to make it work for files if I use both blocksize and CAPS:
gst-launch-1.0 filesrc location=test.tiff blocksize=1049964 !
image/tiff,width=1024,height=1024,framerate=1/1 ! avdec_tiff !
videoconvert ! imagefreeze ! autovideosink sync=0 --gst-debug=*:3
But it still doesnt work for TCP:
gst-launch-1.0 tcpclientsrc host=10.10.150.227 port=5000
blocksize=1049964 ! image/tiff,width=1024,height=1024,framerate=1/1 !
avdec_tiff ! videoconvert ! autovideosink sync=0 --gst-debug=*:3
Best Regards
Marianna
More information about the gstreamer-devel
mailing list