Re: 4k preview freezing while decoding/rendering
Hariharan J via gstreamer-devel <[email protected]> Thu, 29 May 2025 15:30:05 +0000
| Newsgroups | gmane.comp.video.gstreamer.devel |
|---|---|
| Message-ID | <SI2PR03MB56590CAD581A45B39CFF6393CB66A@SI2PR03MB5659.apcprd03.prod.outlook.com> |
--_000_SI2PR03MB56590CAD581A45B39CFF6393CB66ASI2PR03MB5659apcp_ Content-Type: text/plain; charset="Windows-1252" Content-Transfer-Encoding: quoted-printable Hi Jonas Danielsson, Thank you for your suggestion regarding the udp-buffer-size parameter and t= he system-level rmem_max configuration. I have applied the recommended changes as follows: * Set udp-buffer-size=3D16777216 in the GStreamer pipeline * Updated the system parameter using: sysctl -w net.core.rmem_max=3D16777216 However, the playback issue still persists=97particularly stuttering and oc= casional freezing when playing back the recorded 4K stream. Additionally, w= e double-checked and confirmed that the stream is H.264 encoded, not AV1, s= o we are in the process of updating our playback pipeline to use the correc= t decoder. We would appreciate any further guidance you could provide, especially on: * Recommended decoding pipelines for 4K H.264 video with low latency * Any known limitations or best practices for high-resolution RTSP decoding a= nd playback * Whether additional buffering, pipeline synchronization, or format adjustmen= ts may help improve smoothness Thanks again for your support. Best regards, Hariharan J. ________________________________ From: Jonas Danielsson <[email protected]> Sent: Wednesday, May 28, 2025 1:57 PM To: Discussion of the development of and with GStreamer <gstreamer-devel@li= sts.freedesktop.org> Cc: Manikandan Valaguru <[email protected]>; Sandheepkumar M <s= [email protected]>; Suryaprakash DP <suryaprakash.dp@e-consys= tems.com>; Hariharan J <[email protected]> Subject: Re: 4k preview freezing while decoding/rendering [You don't often get email from [email protected]. Learn why thi= s is important at https://aka.ms/LearnAboutSenderIdentification ] Hello, I suspect you need to set the udp-buffer-size property of the rtspsrc to handle the large 4K images: https://gstreamer.freedesktop.org/documentation/rtsp/rtspsrc.html?gi-langua= ge=3Dc#rtspsrc:udp-buffer-size As well as make sure you allow large UDP buffer-size on your host: Example: sysctl -w net.core.rmem_max=3D16777216 rtspsrc udp-buffer-size=3D16777216 All the best Jonas On Wed, 28 May 2025 at 09:40, Manikandan Valaguru via gstreamer-devel <[email protected]> wrote: > > Hi, > We're currently using the following GStreamer pipeline to store 4K video = from an RTSP stream: > "gst-launch-1.0 -e rtspsrc latency=3D0 location=3Drtsp://192.168.1.13:500= 5/videodata ! rtph264depay ! h264parse ! mp4mux ! filesink location=3Dfile.= mp4" > The recorded video is then played back using the following pipeline: > "gst-launch-1.0 filesrc location=3Dvideoplayback.mp4 ! qtdemux ! av1parse= ! av1dec ! videoconvert ! xvimagesink sync=3Dfalse " > However, during playback, we are experiencing stuttering and occasional f= reezing in the video output. We've attached the video file that exhibits th= e issue for your reference. > > https://drive.google.com/drive/folders/1GvWKAHgY297onzoTD6ff0h17F_6aEWSM > We suspect the problem might be related to decoding or rendering limitati= ons, possibly due to incorrect pipeline elements or playback configuration.= We're especially unsure about the use of av1parse and av1dec, given that t= he original stream is H.264 encoded. > We would greatly appreciate your insights on: > > Whether the playback pipeline is appropriate for the saved file format. > If any optimizations or changes can improve the smoothness of playback. > Any known issues with hardware/software decoding of high-resolution strea= ms. > > Thanks in advance for your help! > Regards, > Manikandan > > This email and any files transmitted with it are confidential and intende= d solely for the use of the individual or entity to whom they are addressed= . If you are not the named addressee you should not disseminate, distribute= or copy this e-mail. Taking any action in reliance on the contents of this= information is strictly prohibited. Please notify the sender immediately b= y e-mail if you have received this e-mail by mistake and delete this e-mail= from your system. WARNING: Although the company has taken reasonable preca= utions to ensure no viruses are present in this email, e-con cannot accept = responsibility for any loss or damage arising from the use of this email or= attachment. This email and any files transmitted with it are confidential and intended = solely for the use of the individual or entity to whom they are addressed. = If you are not the named addressee you should not disseminate, distribute o= r copy this e-mail. Taking any action in reliance on the contents of this i= nformation is strictly prohibited. Please notify the sender immediately by = e-mail if you have received this e-mail by mistake and delete this e-mail f= rom your system. WARNING: Although the company has taken reasonable precaut= ions to ensure no viruses are present in this email, e-con cannot accept re= sponsibility for any loss or damage arising from the use of this email or a= ttachment. --_000_SI2PR03MB56590CAD581A45B39CFF6393CB66ASI2PR03MB5659apcp_ Content-Type: text/html; charset="Windows-1252" Content-Transfer-Encoding: quoted-printable <html> <head> <meta http-equiv=3D"Content-Type" content=3D"text/html; charset=3DWindows-1= 252"> <style type=3D"text/css" style=3D"display:none;"> P {margin-top:0;margin-bo= ttom:0;} </style> </head> <body dir=3D"ltr"> <div class=3D"elementToProof" style=3D"margin-top: 1em; margin-bottom: 1em;= font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helv= etica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);"> Hi Jonas Danielsson,</div> <div class=3D"elementToProof" style=3D"margin-top: 1em; margin-bottom: 1em;= font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helv= etica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);"> Thank you for your suggestion regarding the <code>udp-buffer-size</code>&nb= sp;parameter and the system-level <code>rmem_max</code> configuration.</div> <div class=3D"elementToProof" style=3D"margin-top: 1em; margin-bottom: 1em;= font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helv= etica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);"> I have applied the recommended changes as follows:</div> <ul data-end=3D"559" data-start=3D"420"> <li style=3D"font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, C= alibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);"> <div style=3D"margin-top: 1em; margin-bottom: 1em;">Set <code>udp-buffer-si= ze=3D16777216</code> in the GStreamer pipeline</div> </li><li style=3D"font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontServi= ce, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);"> <div style=3D"margin-top: 1em; margin-bottom: 1em;">Updated the system para= meter using:<br> <code>sysctl -w net.core.rmem_max=3D16777216</code></div> </li></ul> <div class=3D"elementToProof" style=3D"margin-top: 1em; margin-bottom: 1em;= font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helv= etica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);"> However, the playback issue still persists=97particularly stuttering and oc= casional freezing when playing back the recorded 4K stream. Additionally, w= e double-checked and confirmed that the stream is H.264 encoded, not AV1, s= o we are in the process of updating our playback pipeline to use the correct decoder.</div> <div class=3D"elementToProof" style=3D"margin-top: 1em; margin-bottom: 1em;= font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helv= etica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);"> We would appreciate any further guidance you could provide, especially on:<= /div> <ul data-end=3D"1196" data-start=3D"947"> <li style=3D"font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, C= alibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);"> <div class=3D"elementToProof" style=3D"margin-top: 1em; margin-bottom: 1em;= ">Recommended decoding pipelines for 4K H.264 video with low latency</div> </li><li style=3D"font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontServi= ce, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);"> <div class=3D"elementToProof" style=3D"margin-top: 1em; margin-bottom: 1em;= ">Any known limitations or best practices for high-resolution RTSP decoding= and playback</div> </li><li style=3D"font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontServi= ce, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);"> <div class=3D"elementToProof" style=3D"margin-top: 1em; margin-bottom: 1em;= ">Whether additional buffering, pipeline synchronization, or format adjustm= ents may help improve smoothness</div> </li></ul> <div class=3D"elementToProof" style=3D"margin-top: 1em; margin-bottom: 1em;= font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helv= etica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);"> Thanks again for your support.</div> <div class=3D"elementToProof" style=3D"margin-top: 1em; margin-bottom: 1em;= font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helv= etica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);"> Best regards,<br> Hariharan J.</div> <div class=3D"elementToProof" style=3D"font-family: Aptos, Aptos_EmbeddedFo= nt, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; c= olor: rgb(0, 0, 0);"> <br> </div> <div id=3D"appendonsend"></div> <hr style=3D"display:inline-block;width:98%" tabindex=3D"-1"> <div id=3D"divRplyFwdMsg" dir=3D"ltr"><font face=3D"Calibri, sans-serif" st= yle=3D"font-size:11pt" color=3D"#000000"><b>From:</b> Jonas Danielsson <= [email protected]><br> <b>Sent:</b> Wednesday, May 28, 2025 1:57 PM<br> <b>To:</b> Discussion of the development of and with GStreamer <gstreame= [email protected]><br> <b>Cc:</b> Manikandan Valaguru <[email protected]>; Sandh= eepkumar M <[email protected]>; Suryaprakash DP <su= [email protected]>; Hariharan J <hariharan.j@e-consystem= s.com><br> <b>Subject:</b> Re: 4k preview freezing while decoding/rendering</font> <div> </div> </div> <div class=3D"BodyFragment"><font size=3D"2"><span style=3D"font-size:11pt;= "> <div class=3D"PlainText">[You don't often get email from jonas.danielsson@s= piideo.com. Learn why this is important at <a href=3D"https://aka.ms/LearnAboutSenderIdentification">https://aka.ms/Le= arnAboutSenderIdentification</a> ]<br> <br> Hello,<br> <br> I suspect you need to set the udp-buffer-size property of the rtspsrc= <br> to handle the large 4K images:<br> <a href=3D"https://gstreamer.freedesktop.org/documentation/rtsp/rtspsrc.htm= l?gi-language=3Dc#rtspsrc:udp-buffer-size">https://gstreamer.freedesktop.or= g/documentation/rtsp/rtspsrc.html?gi-language=3Dc#rtspsrc:udp-buffer-size</= a><br> <br> As well as make sure you allow large UDP buffer-size on your host:<br> <br> Example:<br> sysctl -w net.core.rmem_max=3D16777216<br> rtspsrc udp-buffer-size=3D16777216<br> <br> All the best<br> Jonas<br> <br> On Wed, 28 May 2025 at 09:40, Manikandan Valaguru via gstreamer-devel<br> <[email protected]> wrote:<br> ><br> > Hi,<br> > We're currently using the following GStreamer pipeline to store 4K vid= eo from an RTSP stream:<br> > "gst-launch-1.0 -e rtspsrc latency=3D0 location=3Drtsp://192.168.= 1.13:5005/videodata ! rtph264depay ! h264parse ! mp4mux ! filesink location= =3Dfile.mp4"<br> > The recorded video is then played back using the following pipeline:<b= r> > "gst-launch-1.0 filesrc location=3Dvideoplayback.mp4 ! qtdemux ! = av1parse ! av1dec ! videoconvert ! xvimagesink sync=3Dfalse "<br> > However, during playback, we are experiencing stuttering and occasiona= l freezing in the video output. We've attached the video file that exhibits= the issue for your reference.<br> ><br> > <a href=3D"https://drive.google.com/drive/folders/1GvWKAHgY297onzoTD6f= f0h17F_6aEWSM"> https://drive.google.com/drive/folders/1GvWKAHgY297onzoTD6ff0h17F_6aEWSM</a= ><br> > We suspect the problem might be related to decoding or rendering limit= ations, possibly due to incorrect pipeline elements or playback configurati= on. We're especially unsure about the use of av1parse and av1dec, given tha= t the original stream is H.264 encoded.<br> > We would greatly appreciate your insights on:<br> ><br> > Whether the playback pipeline is appropriate for the saved file format= .<br> > If any optimizations or changes can improve the smoothness of playback= .<br> > Any known issues with hardware/software decoding of high-resolution st= reams.<br> ><br> > Thanks in advance for your help!<br> > Regards,<br> > Manikandan<br> ><br> > This email and any files transmitted with it are confidential and inte= nded solely for the use of the individual or entity to whom they are addres= sed. If you are not the named addressee you should not disseminate, distrib= ute or copy this e-mail. Taking any action in reliance on the contents of this information is strictly prohibi= ted. Please notify the sender immediately by e-mail if you have received th= is e-mail by mistake and delete this e-mail from your system. WARNING: Alth= ough the company has taken reasonable precautions to ensure no viruses are present in this email, e-con cannot a= ccept responsibility for any loss or damage arising from the use of this em= ail or attachment.<br> </div> </span></font></div> This email and any files transmitted with it are confidential and intended = solely for the use of the individual or entity to whom they are addressed. = If you are not the named addressee you should not disseminate, distribute o= r copy this e-mail. Taking any action in reliance on the contents of this information is strictly prohibited. Pl= ease notify the sender immediately by e-mail if you have received this e-ma= il by mistake and delete this e-mail from your system. WARNING: Although th= e company has taken reasonable precautions to ensure no viruses are present in this email, e-con cannot accept respon= sibility for any loss or damage arising from the use of this email or attac= hment. </body> </html> --_000_SI2PR03MB56590CAD581A45B39CFF6393CB66ASI2PR03MB5659apcp_--