0

h265 raw files not decoding to image format from RTSP stream

I want to store each raw frame from rtsp stream and copy this file to another system and decode that frames from H265 to jpeg. because I have three client systems with low configuration so I want to decode some frames from another system.

I am trying to use the below pipeline but not decode the frame.

Pipeline from client system : gst-launch-1.0 rtspsrc location=rtsp://(camera) latency=0 ! rtph265depay ! h265parse ! multifilesink location="C:/img/RAW%d.raw"

Pipeline from main system : gst-launch-1.0 filesrc location="C:/img/RAW15.raw" ! d3d11h265dec ! video/x-raw,format=NV12,width=3840,height=2160 ! jpegenc ! filesink location="C:/img/DEC15.jpeg"

I am stucking from last 3 months but my problem does not resolve, please help me

  • According to the documentation of [multifilesink](https://gstreamer.freedesktop.org/documentation/multifile/multifilesink.html?gi-language=c#multifilesink-page): *"This element is usually used with data where each buffer is an independent unit of data in its own right (e.g. raw video buffers or encoded JPEG or PNG images) or with streamable container formats such as MPEG-TS or MPEG-PS"*. It looks like it's not supposed to work with H.265 streams (each file part of `RAW%d.raw` is not independently playable (it is dependent on the previous parts). – Rotem Dec 05 '22 at 21:50
  • Thanks for your reply! Yes, I have tried both methods which you have suggested, but its impact on my client system resources. When I use a raw video buffer then the frame size is too large(approx 12Mb/f) so my disk does not write that data. Or use jpegenc to compress the frame but it is highly used a CPU of the system(because D3D11 doesnt have a jpegenc method). Raw video:...`(camera) ! rtph265depay ! h265parse ! d3d11h265dec ! multifi`... Jpeg encode: ...`(camera) ! rtph265depay ! h265parse ! d3d11h265dec ! jpegenc quality=100 ! multifi`.. Can you please suggest any other possibilities? – Vejanand Chavda Dec 07 '22 at 07:32
  • These are not suggestions, I was just quoting the documentation of GStreamer. I don't have enough experience with GStreamer for giving you any suggestions... In my comment I was just trying to explain why your current solution is not working. In case you have to cut H.265 "independently playable" segments, you make sure that the stream in cut in GOP boundaries - each segment must start with a **key frame**. (I don't know if it's possible using GStreamer). – Rotem Dec 07 '22 at 09:50

0 Answers0