Internal data stream error

Hey,

this code takes a internal data as a video feed, converts it to YUV, compresses it with h.264 , and sends it through a real-time transfer protocol (RTSP) to a sink on a remote computer. I really struggled with the problem.The program reporting an errors always,“internal data flow error”, Let me know if you have any questions or suggestions.
in addition , I want to thank all those that helped me get to this point.


encode.cpp (9.6 KB)

Hi,
The pipeline is

appsrc ! videoconvert ! capsfilter ! omxh264enc ! capsfilter ! h264parse ! rtph264pay ! udpsink

We suggest you break it down with fakesink:

appsrc ! videoconvert ! capsfilter ! omxh264enc ! capsfilter ! h264parse ! rtph264pay ! fakesink
appsrc ! videoconvert ! capsfilter ! omxh264enc ! capsfilter ! h264parse ! fakesink
appsrc ! videoconvert ! capsfilter ! omxh264enc ! capsfilter ! fakesink
...

To know which element is not correctly linked.

Hi,DaneLLL,Thank you. I’m really sorry. Forgive me for writing the software code for the first time. Yesterday, I found the error ,it do not reporting the internal data flow error,Because the data format is not RGB but BRGx or RGBA.

Judging from the execution results, the data should have been sent out. I am now trying to receive this data stream at another host to prove whether the data can be displayed normally.
I use the pipeline:
gst-launch-1.0 udpsrc port=5000 ! rtph264depay ! h264parse ! omxh264dec ! nveglglessink ! filesink location= test.mpg
It is wrong.

My original idea want to send the encoded video data through rtsp stream and decode it with another computer, but I really struggled with the problem whether to use this udpsink to encapsulate the data into rtsp stream and whether the other party can decode it with rtspsrc. Thank you very much.

I am Sorry, disturb you for many times. I transmitted the data to another computer through udp today, The data path should be correct. I will study it later and thank you for your guidance.

Hi,
Good to know that you figure out a solution.

There is a post about udp streaming. FYR.
https://devtalk.nvidia.com/default/topic/1027423/jetson-tx2/gstreamer-issue-on-tx2/post/5225972/#5225972

Hi,DaneLLL
Now I test the video transmission with UDP. There have two questions:
1:After the video decompression, the color bar display dither. I test it directly with the pipeline command.
Host:“gst-launch-1.0 videotestsrc ! nvvidconv ! omxh264enc ! ‘video/x-h264,stream-format=byte-stream’ ! h264parse ! rtph264pay ! udpsink host=192.168.70.122 port=5000”
Slave:gst-launch-1.0 udpsrc port=5000 ! application/x-rtp,encoding-name=H264, payload = 96 ! rtph264depay ! h264parse ! queue ! avdec_h264 ! xvimagesink sync=false async=false -e
It displays normal. This explain that there is a problem with C code control?

2: It’s strange that I need to Send multiple commands to the slave it can display the color bar,Has anyone ever been in this situation ?

Hi,
Probably it is due to unstable network. You should not see dithering color bar in saving to a mp4.

gst-launch-1.0 videotestsrc ! nvvidconv ! omxh264enc ! 'video/x-h264,stream-format=byte-stream' ! h264parse ! qtmux ! filesink location=a.mp4