<div dir="ltr">I experience this exact same problem - though in my case the video is coming via webrtcbin. It's been a defect on my backlog for a while now, but I'm just now getting around to dealing with it. I've got some code put together that works, but needs serious polish, but the sequence is: <div><br></div><div>* add a probe (EVENT_DOWNSTREAM) on the webmmux video sink pad to filter for Caps events</div><div>* [if the pad has current caps] get the resolution from the current caps, and the new caps, and compare</div><div>* If they differ (they will - that's the point here):</div><div>** unlink webmmux from its upstream element</div><div>** remove webmmux and filesink elements from container (a bin in my case, not the root pipeline)</div><div>** set states of both elements to Null</div><div>** create new webmmux and filesink (to a new file) elements, link them, add them to parent container</div><div>** set states to Playing</div><div>* repeat (add probe, etc)</div><div><br></div><div>A few notes about this approach:</div><div>* I had hoped that calling query_accept_caps on the pad with the new caps would return false; but it doesn't. So I have to manually compare resolutions</div><div>* I had hoped that unlinking the video sink pad and requesting a new video sinking pad would work - effectively creating a new chapter in the target file. Unfortunately that was not supported either. </div><div>* this approach creates N number of files for the source stream. My requirements allow this; yours may not.</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Jun 30, 2020 at 2:17 PM <<a href="mailto:ogurin@auritek.com">ogurin@auritek.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div lang="EN-US"><div class="gmail-m_906282275604240722WordSection1"><p class="MsoNormal">Hello, I have a question.<u></u><u></u></p><p class="MsoNormal"><span lang="RU"><u></u> <u></u></span></p><p class="MsoNormal">The task is to save VP8 from RTP packets into the webm file.<u></u><u></u></p><p class="MsoNormal">There are all RTP packets already saved into the file.<u></u><u></u></p><p class="MsoNormal">I am using pipeline like:<u></u><u></u></p><p class="MsoNormal"><span style="font-size:9.5pt;font-family:Consolas;color:rgb(163,21,21)">appsrc block=true do-timestamp=true format=3 is-live=true name=video_appsrc  "</span><span style="font-size:9.5pt;font-family:Consolas;color:black"><u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:9.5pt;font-family:Consolas;color:black">                     </span><span style="font-size:9.5pt;font-family:Consolas;color:rgb(163,21,21)">"caps=\"application/x-rtp, media=(string)video, payload=(int)96, clock-rate=(int)90000, encoding-name=(string)VP8-DRAFT-IETF-01\" ! "</span><span style="font-size:9.5pt;font-family:Consolas;color:black"><u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:9.5pt;font-family:Consolas;color:black">                     </span><span style="font-size:9.5pt;font-family:Consolas;color:rgb(163,21,21)">"rtpvp8depay wait-for-keyframe=true ! webmmux name=mux ! filesink location=%s<u></u><u></u></span></p><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">I assume that I get an error when resolution of the video changes into the stream:<u></u><u></u></p><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal"><span style="font-size:9pt;font-family:Consolas">matroskamux matroska-mux.c:975:gst_matroska_mux_video_pad_setcaps:<mux> error: Caps changes are not supported by Matroska<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:9pt;font-family:Consolas">0:00:00.371142012 26321       0xdcb8f0 INFO        GST_ERROR_SYSTEM gstelement.c:2224:gst_element_message_full_with_details:<mux> posting message: Could not multiplex stream.<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:9pt;font-family:Consolas">0:00:00.371155378 26321       0xdcb8f0 INFO        GST_ERROR_SYSTEM gstelement.c:2251:gst_element_message_full_with_details:<mux> posted error message: Could not multiplex stream.<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:9pt;font-family:Consolas">0:00:00.371169976 26321       0xdcb8f0 WARN             matroskamux matroska-mux.c:1356:gst_matroska_mux_video_pad_setcaps:<mux> pad video_0 refused caps video/x-vp8, framerate=(fraction)0/1, height=(int)180, width=(int)320, profile=(string)0<u></u><u></u></span></p><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">Please advise what I am doing wrong or maybe point me on error in pipeline<u></u><u></u></p><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">Thank you in advance<u></u><u></u></p><p class="MsoNormal"><u></u> <u></u></p></div></div>_______________________________________________<br>
gstreamer-devel mailing list<br>
<a href="mailto:gstreamer-devel@lists.freedesktop.org" target="_blank">gstreamer-devel@lists.freedesktop.org</a><br>
<a href="https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel" rel="noreferrer" target="_blank">https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel</a><br>
</blockquote></div>