TAPPAS fastdepth Demo

I am running fastdepth model with TAPPAS following the official guide. However the video displayed is in fast speed. Is there a way I could display the resulting videos in normal speed?

Also, is it possible to save the result depth video as mp4?

Hey @ShingHin.Hung

To resolve the issue of fast video playback when running the FastDepth model using TAPPAS and save the output in MP4 format, you can modify your GStreamer pipeline as follows:

  1. Display the video at normal speed:

The fast video playback is likely due to the sync property in the GStreamer pipeline being set to false by default for faster processing. To play the video at normal speed, change sync to true:

gst-launch-1.0 -v udpsrc port=5000 address=0.0.0.0 ! application/x-rtp,encoding-name=H264 ! queue ! rtph264depay ! queue ! h264parse ! avdec_h264 ! queue ! videoconvert ! fpsdisplaysink video-sink=autovideosink sync=true

This ensures the frames are synchronized with the actual playback speed.

  1. Save the depth video as MP4:

Modify the GStreamer pipeline to encode the video to H264 and save it in MP4 format:

gst-launch-1.0 -v udpsrc port=5000 address=0.0.0.0 ! application/x-rtp,encoding-name=H264 ! queue ! rtph264depay ! queue ! h264parse ! avdec_h264 ! queue ! videoconvert ! x264enc ! mp4mux ! filesink location=output_depth.mp4

This pipeline does the following:

  1. Captures the video stream via UDP
  2. Processes the RTP H264 stream
  3. Decodes the H264 video
  4. Converts the video format
  5. Encodes to H264
  6. Muxes into an MP4 container
  7. Saves to the file output_depth.mp4

With these modifications, you should be able to display the depth video at normal speed and save it as an MP4 file for later use.

Let me know if you have any other questions!
Regards