Reading from named pipe continuously

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

Reading from named pipe continuously

Hi All,

I want to stream rtp in pcap file to udpsink continuously. so i am trying
the following approach.

I am trying to read from namedpipe using gst-launch and there is another
script which is writing to namedpipe by reading binary file  and writing it
in to pipe. The file i am reading is pcap, once read completes i seek back
to 0 and read from the beginning. Following is the example python script
writing to namedpipe in loop for 10 times

import os, sys
# Path to be created
path = "videopipe"
    print("Path is created")
except OSError as e:
    print("Failed to create FIFO: %s" % e)

rf = open('video.pcap', 'rb', 0)
wf = open(path, 'wb', 0)
for i in range(10):
    for data in iter(lambda:,b""):
    print("Read complete")

following is the gstreamer command:

gst-launch-1.0 filesrc location=videopipe ! pcapparse ! application/x-rtp !
rtph264depay ! rtph264pay pt=96 ssrc=3940036475 seqnum-offset=0
timestamp-offset=0 ! srtpenc
key=137c17f42f48ae171cb21d31f6366b7cad00efb2f96e4aab0b543426f559 ! queue !
udpsink host=localhost port=60000

The first iteration works fine, gstreamer reads from namedpiped and sends it
to udpsink and client is able to decode the video, the issue am facing is
that after first iteration gstreamer stops reading from the pipe.
Can anyone help me how to resolve this?

Thanks in advance,

Sent from:
gstreamer-devel mailing list
[hidden email]