Questions about using multiple parsers within a single adaptivedemux2 pipeline

Out of curiosity,the above is a pipeline for hlsdemux2. I noticed that within the hlsdemux2 bin, there is an aacparse0 and an h264parse0, and another aacparse1 and h264parse1 are added in parsebin. I am wondering whether the aacparse1 and h264parse1 also participate in the parsing of every frame, and whether every frame of audio and video data is parsed twice, resulting in redundant use of computational resources? The aacparse1 and h264parse1 inside parsebin seem intuitively to be candidates for optimization. Could there be many other contexts that I am overlooking?


This was fixed already : adaptivedemux2 : Avoid double usage of parsebin (!6690) · Merge requests · GStreamer / gstreamer · GitLab

And backported in 1.24.3

@bilboed Thank you for your suggestion.
I immediately pulled the code to verify it. When playing an HLS stream, it seems there is no difference compared to before. I once suspected that the patch might not have been compiled in, but debugging it separately confirmed that the patch indeed took effect and entered the newly added codes.

As a newcomer to this forum, I’m not sure how to upload logs. Instead, I will re-upload the regenerated dot file for comparison.

You can generate a log file with GST_DEBUG_FILE=/tmp/log GST_DEBUG=2,urisourcebin:6,*decodebin3:6 The log will be in /tmp/log and you might be able to attach it here (compressed)

Uploading other non-image formats will only bring up this:

Sorry, the file you are trying to upload is not authorized (authorized extensions: jpg, jpeg, png, gif, heic, heif, webp, avif).

@bilboed gst.log

Ah yes, that is another issue I saw. I have a WIP series of patches to fix that. Not sure if I’ll be able to backport it to 1.24 though

1 Like

That’s been a massive help, thanks :sparkling_heart:

I’m getting it merged : decodebin3: Properly support changing input collections (!6774) · Merge requests · GStreamer / gstreamer · GitLab

That includes the fix for avoiding double-parsing

it appears that the issue is still present. log.txt

GST_DEBUG_COLOR_MODE=off GST_DEBUG=2,urisourcebin:6,*decodebin3:6 GST_DEBUG_FILE=/home/$USER/work/log/gst.log GST_DEBUG_DUMP_DOT_DIR=/home/$USER/work/log gst-launch-1.0 playbin3 uri=