Anyone know why the following command does not seem to work?
gst-launch-1.0 udpsrc port=[port_num] ! tee name=t ! queue ! filesink location=/some/path/test.mpg t. ! queue ! tsparse ! tsdemux ! h264parse ! omxh264dec ! nveglglessink -e
output:
Setting pipeline to PAUSED …
Pipeline is live and does not need PREROLL …
Got context from element ‘eglglessink0’: gst.egl.EGLDisplay=context, display=(GstEGLDisplay)NULL;
Setting pipeline to PLAYING …
New clock: GstSystemClock
It just stall here and does not do anything as far as I can tell. There is an empty test.mpg file created, but it does not get written to. I’ve written the gstreamer c code equivalent and it does the same exact thing.
gst-launch-1.0 filesrc location=/some/path/test.mpg ! tee name=t ! queue ! filesink location=/some/path/t_test.mpg t. ! queue ! tsparse ! tsdemux ! h264parse ! omxh264dec ! nveglglessink -e
where the test.mpg is the same exact type of file being sent over udp.
gst-launch-1.0 udpsrc port=[port_num] ! tee name=t ! queue ! filesink location=/some/path/t_test.mpg t. ! queue ! fakesink
This one writes to the file.
Thanks for replying. Unfortunately, I do not have access to the server side code. Do you think there are elements I can change in the current client side to make it work?
Not sure but you may try to configure ‘config-interval’ in h264parse element.
$ gst-inspect-1.0 h264parse
(...skip...)
Element Properties:
name : The name of the object
flags: readable, writable
String. Default: "h264parse0"
parent : The parent of the object
flags: readable, writable
Object of type "GstObject"
disable-passthrough : Force processing (disables passthrough)
flags: readable, writable
Boolean. Default: false
config-interval : Send SPS and PPS Insertion Interval in seconds (sprop parameter sets will be multiplexed in the data stream when detected.) (0 = disabled)
flags: readable, writable
Unsigned Integer. Range: 0 - 3600 Default: 0
Solution:
"
That is because the queue before filesink is full, make it bigger and
it will work.
udpsrc produce 1 buffer
“queue ! filesink” received it and preroll
“queue ! dec” will queue, but not produce anything yet
“queue ! filesink”" stores data
happens again
…
N) “queue ! filesink” the queue is full, we are blocked on pre-roll.
Considering you don’t really care if you start writing to disk before
you have reached play, I’d just set async=FALSE on filesink, and safe a
some RAM.