Jump to content

LibMISB/Examples/Example Application: Difference between revisions

Line 347: Line 347:
===How to execute the application===
===How to execute the application===


1. Execute the code to create the binary file to be streamed from the JSON file </br>
1. Open a terminal to run the GStreamer pipeline who will get the streaming from the application. </br>
1.1 Go to the same working directory where you created the main.c file.
Run this command:
1.2 Run this command:
<pre>
<pre>
./misb-converter --verbose --encode -i misb_ST0601_sample.json -o klv.bin
gst-launch-1.0 -e udpsrc port=5000 ! 'video/mpegts, systemstream=(boolean)true, packetsize=(int)188' ! tsdemux name=demux demux. ! queue !  h264parse ! 'video/x-h264, stream-format=byte-stream, alignment=au' ! avdec_h264 ! autovideosink sync=false demux. ! queue ! 'meta/x-klv' ! metasink async=false
</pre>
</pre>


2. Open a terminal to run the GStreamer pipeline who will get the streaming from the application
2. Open a different terminal to run the GStreamer application. </br>
2.1 Run this command:
To run it you must provide an IP address, port and the JSON file path where that you want to encode and send through the streaming, for default we recommend to use 127.0.0.1 for the IP address, and 5000 for the port. The command to run it is:
<pre>
<pre>
gst-launch-1.0 udpscr port=5000 caps = "application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)H264, payload=(int)96" ! rtph254depay ! decodebin ! videoconvert ! autovideosink
./main 127.0.0.1 5000 misb_ST0601_sample.json
</pre>
 
3. Open a different terminal to run the GStreamer application.
3.1. To run it you must provide an IP address and port, for default we recommend to use 127.0.0.1 for the IP address, and 5000 for the port. The command to run it is:
<pre>
./main 127.0.0.1 5000
</pre>
</pre>


Cookies help us deliver our services. By using our services, you agree to our use of cookies.